This was posted earlier but i guess it got lost in the shuffle i still think its a good idea. Even thought you can put 10x32 snapshots, doesn''t mean we should have to. snapshot subdirectories enhancement that could make dealing with snapshots better, perhaps we can create a directory structure under .zfs/snapshot so the user can organise the snapshots for instance. cd .zfs/snapshot mkdir daily mkdir monthly mkdir important then the user could use unix commands like mv to put snapshots where he needs them it would also make snapshot management easier if i want to delete all daily snapshots older than a week. find .zfs/snapshot/daily -ctime +7d and to create snapshots and place in the special directories zfs snapshot data/myfilesystem at daily/05-05-2006 all snapshot directories would start under .zfs/snapshot James Dickens uadmin.blogspot.com
On Wed, May 10, 2006 at 02:22:27PM -0500, James Dickens wrote:> This was posted earlier but i guess it got lost in the shuffle i still > think its a good idea. Even thought you can put 10x32 snapshots, > doesn''t mean we should have to. > > snapshot subdirectories enhancement that could make dealing with > snapshots better, perhaps we can create a directory structure under > .zfs/snapshot so the user can organise the snapshots for instance. > > cd .zfs/snapshot > mkdir daily > mkdir monthly > mkdir important > > then the user could use unix commands like mv to put snapshots where > he needs them it would also make snapshot management easier if i want > to delete all daily snapshots older than a week. > > find .zfs/snapshot/daily -ctime +7d > > and to create snapshots and place in the special directories > > zfs snapshot data/myfilesystem at daily/05-05-2006 > > all snapshot directories would start under .zfs/snapshotYou can do all of this except the "subdirectory snapshots" today. You can use a different delimiter (eg. ''-'') to accomplish much the same thing. We''ll consider adding the subdirectory snapshots, which could potentially make managing a large number of snapshot easier. For example, today you can do: # zfs snapshot data/myfilesystem at daily-2006-05-10 # find .zfs/snapshot -name "daily-*" -ctime +7d # rmdir `find .zfs/snapshot -name "daily-*" -ctime +7d` # mv .zfs/snapshot/today .zfs/snapshot/daily-2006-05-10 The ''rmdir'' effectively does a ''zfs destroy'', and the ''mv'' effectively does a ''zfs rename''. --matt
[u][b]Snapshot Management:[/b][/u] With all the talk of snapshots as of late, is there an interest for a ZFS discuss sub-group for Snapshots? Perhaps this may prevent further anything getting "lost in the shuffle". This message posted from opensolaris.org
> For example, today you can do: > > # zfs snapshot data/myfilesystem at daily-2006-05-10 > # find .zfs/snapshot -name "daily-*" -ctime +7dDoes the actual snapshot creation time appear as one of the stat() times of the snap directory? When I tried it, they all reflected the actual times of the original directory.> # rmdir `find .zfs/snapshot -name "daily-*" -ctime +7d` > # mv .zfs/snapshot/today .zfs/snapshot/daily-2006-05-10 > > The ''rmdir'' effectively does a ''zfs destroy'', and the ''mv'' effectively > does a ''zfs rename''.Wow. Did I miss where that is documented? I for one appreciate that snapshots are "different" from normal files and protected in some ways. I find it odd that I can destroy a snapshot through a standard filesystem access. When does this feature work and when does it fail? If I don''t access a snapshot I can remove it pretty easily, but stat()ing the contents seems to lock it... # zfs snapshot zpool/test at snap1 # zfs snapshot zpool/test at snap2 # ls snap1 a b c d e # ls -l snap2 total 5 -rw-r--r-- 1 root root 0 May 10 15:37 a -rw-r--r-- 1 root root 0 May 10 15:37 b -rw-r--r-- 1 root root 0 May 10 15:37 c -rw-r--r-- 1 root root 0 May 10 15:37 d -rw-r--r-- 1 root root 0 May 10 15:37 e # rmdir snap1 snap2 rmdir: directory "snap2": Directory is a mount point or in use # zfs destroy zpool/test at snap2 # -- Darren Dunham ddunham at taos.com Senior Technical Consultant TAOS http://www.taos.com/ Got some Dr Pepper? San Francisco, CA bay area < This line left intentionally blank to confuse you. >