LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   in search of copy-on-write file system (https://www.linuxquestions.org/questions/linux-general-1/in-search-of-copy-on-write-file-system-577603/)

exponential 08-16-2007 01:56 PM

in search of copy-on-write file system
 
i need a way to keep intact the contents of a partition (root) even after other users have been using it. options are:

1. every time the machine reboots the contents are copied from another partition. i believe this is very time-consuming

2. using a file system that supports copy-on-write, like unionfs or mapfs. but the problem with these file systems is that they do it by directory. and even if i try to mount unionfs for every dir (/home, /usr, etc), it still doesn't work, because i would have to work on the read-only directory

example: mount -t unionfs -o dirs=/aux/home:/home=ro unionfs /home
in /aux is mounted another partition

3(i don't know if this works) is there a way to pass kernel options at boot time saying something like "use some partition for root, but any changes that take place store them on another partition" ?

i hope i documented the problem

thank you

MensaWater 08-17-2007 10:35 AM

What you're describing sounds like a "snapshot".

My first thought was you could probably use rsync for this. It has the beauty of only transferring the changes on subsequent runs and you can tell it to delete things on the target that are no longer on the source as well.
Since it only does differences you wouldn't have to take the time it would for a full copy like a dd would do.

Doing a Google search with the terms "snapshot", "on", "linux" (leaving out the quotes and the commas) gave me several hits the first of which describes doing a snapshot with rsync:

http://www.mikerubel.org/computers/rsync_snapshots/

Haven't gone through what he wrote but since I was already thinking "snapshot" and "rsync" it seems likely this has what you need.


All times are GMT -5. The time now is 04:29 AM.