On Mon, 01 Sep 2008 01:51:51 -0400, Shaya Potter wrote:
> As I mentioned a while ago, we jury rigged writable snapshots by 
> combining nilfs w/ unionfs.

Yeah, I remember.
It sounds much better at least than switching with rsync :)

> Instead of writing to the root of the file system, you right to a subdir.
> 
> so we start w/ /nilfs/t0
> 
> when we want to rollback and continue to work
> 
> we mount the ro snapshot on /s0 and create /nilfs/t1 use unionfs to 
> union together /s0 (ro) and /nilfs/t1 (rw).

I've tried this without making sub directories:

 # mkdir /nilfs /snap-ro /snap-rw /change
 # mount -t nilfs2 /dev/sdb1 /nilfs
 ...
 # mkcp -s
 # lscp
             CNO        DATE     TIME  MODE  SKT   NBLKINC       ICNT
             ...
           62305  2008-09-01 16:13:28  ss     -        488         39
           62306  2008-09-01 16:13:33  cp     -          8         39

 # mount -t nilfs2 -o ro,cp=62305 /dev/sdb1 /snap-ro
 # mount -t unionfs -o dirs=/snap-ro=rw unionfs /snap-rw
 # unionctl /snap-rw --add --before /snap-ro --mode rw /change
 <use /snap-rw as a writable snapshot mount>

 # mount
 ...
 /dev/sdb1 on /nilfs type nilfs2 (rw,gcpid=9512)
 /dev/sdb1 on /snap-ro type nilfs2 (ro,cp=62305)
 unionfs on /snap-rw type unionfs (rw,dirs=/snap-ro=rw)

It's working fine.
Is there a quicker way?  (Or something to add?)

Cheers,
Ryusuke
_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users

Reply via email to