Date: Fri, 13 Jan 2006 17:57:59 -0500 (EST) From: user <user@dhp.com> To: Eric Anderson <anderson@centtech.com> Cc: freebsd-fs@freebsd.org Subject: Re: preventing deadlocks in snapshot directories - unexplained Message-ID: <Pine.LNX.4.21.0601131751230.8684-100000@shell.dhp.com> In-Reply-To: <43C819C1.1060706@centtech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 13 Jan 2006, Eric Anderson wrote: > What happens if you do: > > rm -f snap_directory1/snapshot > rmdir snap_directory1 > > Does the same thing happen? I will try that as I try to reproduce the problem. I am aware that there are two "lags" when creating a snapshot - the lock that occurs in the snapshot directory for the entire course of creation/destruction, and also a short system-wide lag that occurs for a small portion of the time of creation/destruction. It is possible that on a heavily taxed system, the two could be confused for one another, which is possibly what happened when I noticed the one-deep directory "locking" when I deleted a two-deep directory snapshot. I think the main, conceptual question I am asking is this - what is the difference between these three strategies: #1: /.snap/snapshot1 /.snap/snapshot2 /.snap/snapshot3 #2 /.snap/snapdir1/snapshot1 /.snap/snapdir2/snapshot2 /.snap/snapdir3/snapshot3 #3 /.snap/snapshot1 /.snap2/snapshot2 /.snap3/snapshot3 Now, so far in this thread, some have claimed that #2 and #3 are identical, which seems reasonable. My only problem is that I _think_ I am seeing problems with #2. We'll see. However, what about #1 above ? In that case, all of the snapshots are in one directory, and I feel that this is dangerous, or at least poorly done - isn't there a very real possibility of a deadlock there, because you could be creating a snapshot in /.snap at the same time as you delete one (or create a different one ?) The man page says nothing about multiple snapshots, etc., and I want to know if, one way or another, it is a good instinct on my part to make sure multiple snapshots do not end up in the exact same directory... thanks.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0601131751230.8684-100000>