preventing deadlocks in snapshot directories - unexplained

user user at dhp.com
Thu Jan 12 13:30:04 PST 2006


I have asked this before, but nobody answered ...

If you have multiple snapshots, how do you segregate them in order to
avoid the deadlocks that the ".snap" directory is supposed to fix ?

I understand why a snapshot is created in (mount)/.snap - but what if I
have multiple snapshots running simultaneously ?  My instinct was that
they just needed to be in different, non-recursive directories - like
this:

/.snap/snap1/snapshot_file
/.snap/snap2/snapshot_file
/.snap/snap3/snapshot_file

However, I just noticed that when I:

cd /.snap
rm -rf snap3

the _entire_ /.snap directory locks up until that command completes.  If I
go in with another shell and:

cd /.snap
ls -asl

that command hangs until the deletion of /.snap/snap3 completes.  So, this
leads me to conclude that actually, I need to do this:

/.snap/snapshot_file
/.snap2/snapshot_file
/.snap3/snapshot_file

Am I correct ?  Why did my first strategy fail ?  Why did /.snap lock up
even when the snapshot files were a full directory level deeper ?

Is there _anything else_ I should know about running multiple snapshots ?

Thanks.



More information about the freebsd-fs mailing list