Using whiteouts

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

Using whiteouts

#1 Post by jpeps »

I was experimenting with a script that writes whiteouts for files on a list, so that I can try out varying combinations by simply adding/removing the whiteouts. The whiteouts (in the "snap" layer) save (at least on my grub install) across boots, so I can restore or delete the files anytime I want.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#2 Post by jpeps »

Kind of interesting playing with this to learn about whiteouts. Checking it "ON" sets a new mark. Any new files created in /usr will get a whiteout when you push the "Block" button. They can then be permanently deleted or restored.

If you reboot, the whiteout files aren't in the "save" layer, so they won't work. On a flash install, I don't think anything is saved from the snap layer, so even the whiteouts will be gone. On a regular grub install, the whiteouts remain, and the files can be restored or deleted as before the boot.

I limited the files to /usr for safety reasons, but other directories could be included.
Attachments
Gno-Save.png
(16.02 KiB) Downloaded 484 times
gno-save-1.0.pet
(1.88 KiB) Downloaded 354 times

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#3 Post by big_bass »

jpeps

white outs is an interesting subject since we have mounted sfs'

a lot of things have already been done
this will interest you with more information

Dougal author
http://www.murga-linux.com/puppy/viewto ... 0ac12510b9
note that there is no package linked it was removed but....


this has a link to the original package
Ray MK posted a link
http://www.murga-linux.com/puppy/viewto ... 2&start=10
note I was credited for both links on this page but I did not write the white outs script
the author of that is Dougal * I however wrote the memory cleaner linked there


Joe

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#4 Post by jpeps »

big_bass wrote:jpeps

white outs is an interesting subject since we have mounted sfs'

a lot of things have already been done
this will interest you with more information
Hi Joe,

I recall getting involved in this during the development of sfs-on-the-fly, and wrote my own scripts to monitor and/or delete them so things would load correctly. Since we have them, I thought maybe there was some other usefulness.

I updated this so it works with all directories. Various buttons:

set mark: check to add a new mark. New files are anything written after setting the mark.

Files: finds new files in selected directory (can edit)
Build: Adds files from the "files" list to a build list (can edit)
Block: Creates whiteouts for files on the list. For "/mnt" directory, it simply moves files to .files.swp so they can be restored if desired.
Restore: Restores files by removing the whiteouts, or in /mnt/ moving the .swp file back to it's original name
Delete: Deletes the whiteout and files.

edit: one use is easy management of .mozilla caches

note: for cli usage, run "no-save -h" for options (works for /usr files).
Attachments
gno-save-2.0.pet
(2.64 KiB) Downloaded 439 times
gno-save.png
(12.75 KiB) Downloaded 833 times

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#5 Post by sunburnt »

Whiteouts and other necessities of unions are signs of induced complication.
When you have to patch holes in something like this, it`s not a good thing.

Unions work well and have come a long way, but they`re not necessary.
In the spirit of KISS... Why complicate things when it`s not an advantage?

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#6 Post by jpeps »

sunburnt wrote: In the spirit of KISS... Why complicate things when it`s not an advantage?
To use it to my advantage

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#7 Post by sunburnt »

Hi jpeps; I understand what you mean.

I`m sure you understand what I mean also... 8)

Post Reply