I thought I recalled reading somewhere that in the situation where you have several zfs filesystems under one top level directory like this: rpool rpool/ROOT/osol-112 rpool/export rpool/export/home rpool/export/home/reader you could do a shapshot encompassing everything below zpool instead of having to do it at each level. (Maybe it was in a dream...)
Harry Putnam wrote:> I thought I recalled reading somewhere that in the situation where you > have several zfs filesystems under one top level directory like this: > rpool > rpool/ROOT/osol-112 > rpool/export > rpool/export/home > rpool/export/home/reader > > you could do a shapshot encompassing everything below zpool instead of > having to do it at each level. > (Maybe it was in a dream...)zfs snapshot -r rpool at mysnapshotnamegoeshere -- Darren J Moffat
On 23 Jun 2009, at 23:59 , Darren J Moffat wrote:> Harry Putnam wrote: >> I thought I recalled reading somewhere that in the situation where >> you >> have several zfs filesystems under one top level directory like this: >> rpool >> rpool/ROOT/osol-112 >> rpool/export >> rpool/export/home >> rpool/export/home/reader >> you could do a shapshot encompassing everything below zpool instead >> of >> having to do it at each level. (Maybe it was in a dream...) > > zfs snapshot -r rpool at mysnapshotnamegoesherePersonally, I''d like to see it have a property to exclude filesystems like: zfs set nosnap=yes rpool/swap zfs set nosnap=yes rpool/dump In order to exclude file systems I don''t really care about snapshots. That would be handier than having to remove them every time. Cheers, Mike --- Michael Sullivan michael.p.sullivan at me.com http://www.kamiogi.net/ Japan Mobile: +81-80-3202-2599 US Phone: +1-561-283-2034
Darren J Moffat <darrenm at opensolaris.org> writes:> Harry Putnam wrote: >> I thought I recalled reading somewhere that in the situation where you >> have several zfs filesystems under one top level directory like this: >> rpool >> rpool/ROOT/osol-112 >> rpool/export >> rpool/export/home >> rpool/export/home/reader >> >> you could do a shapshot encompassing everything below zpool instead of >> having to do it at each level. (Maybe it was in a dream...) > > zfs snapshot -r rpool at mysnapshotnamegoeshereWell no, I posted the question because that doesn''t do it. zfs list -r rpool [...] rpool/dump 1.50G 292G 1.50G - rpool/export 15.9G 292G 21K /export rpool/export/home 15.9G 292G 22K /export/home rpool/export/home/reader 15.9G 292G 11.5G /export/home/reader [...] # zfs snapshot -r rpool at somedate # zfs snapthot rpool/someotherdate cd /rpool/.zfs/snapshot diff -r somedate someotherdate No difference, and there is no rpool/dump rpool/export rpool/export/home rpool/export/home/reader under either snapshot... not to mention all the other stuff shown with zfs list -r rpool that I snipped.
Harry Putnam wrote:> Darren J Moffat <darrenm at opensolaris.org> writes: > >> Harry Putnam wrote: >>> I thought I recalled reading somewhere that in the situation where you >>> have several zfs filesystems under one top level directory like this: >>> rpool >>> rpool/ROOT/osol-112 >>> rpool/export >>> rpool/export/home >>> rpool/export/home/reader >>> >>> you could do a shapshot encompassing everything below zpool instead of >>> having to do it at each level. (Maybe it was in a dream...) >> zfs snapshot -r rpool at mysnapshotnamegoeshere > > Well no, I posted the question because that doesn''t do it.Well yes actually you aren''t looking for the snapshots the correct way.> zfs list -r rpool > > [...] > rpool/dump 1.50G 292G 1.50G - > rpool/export 15.9G 292G 21K /export > rpool/export/home 15.9G 292G 22K /export/home > rpool/export/home/reader 15.9G 292G 11.5G /export/home/reader > [...] > > # zfs snapshot -r rpool at somedate > # zfs snapthot rpool/someotherdate > > cd /rpool/.zfs/snapshot > diff -r somedate someotherdateThe /rpool directory wouldn''t have changed because nothing is actually stored in the rpool filesystem. Do this first to verify you really do have the snapshots: zfs list -r -t snapshot rpool> No difference, and there is no > rpool/dump > rpool/export > rpool/export/home > rpool/export/home/reader > > under either snapshot... not to mention all the other stuff shown with > zfs list -r rpool > that I snipped.That is correct for several reasons. 1. some of those are ZVOLS 2. The .zfs directory is in the root of each filesystem 3. The /rpool directory isn''t actually used to store anything in the case of the ZFS root pool for an OpenSolaris install. 4. You can''t cross filesystem bounaries in a .zfs directory. Try: cd /export/home/.zfs/snapshot && ls cd /export/home/reader/.zfs/snapshot && ls A snapshot of rpool/dump and rpool/swap is pointless anyway but since those are ZVOLs you can''t ''cd'' into a .zfs/snapshot directory for them since that concept doesn''t exist for a ZVOL. -- Darren J Moffat
Mike --- Michael Sullivan michael.p.sullivan at me.com http://www.kamiogi.net/ Japan Mobile: +81-80-3202-2599 US Phone: +1-561-283-2034 On 24 Jun 2009, at 01:01 , Harry Putnam wrote:> Darren J Moffat <darrenm at opensolaris.org> writes: > >> Harry Putnam wrote: >>> I thought I recalled reading somewhere that in the situation where >>> you >>> have several zfs filesystems under one top level directory like >>> this: >>> rpool >>> rpool/ROOT/osol-112 >>> rpool/export >>> rpool/export/home >>> rpool/export/home/reader >>> >>> you could do a shapshot encompassing everything below zpool >>> instead of >>> having to do it at each level. (Maybe it was in a dream...) >> >> zfs snapshot -r rpool at mysnapshotnamegoeshere > > Well no, I posted the question because that doesn''t do it. > > zfs list -r rpool > > [...] > rpool/dump 1.50G 292G 1.50G - > rpool/export 15.9G 292G 21K /export > rpool/export/home 15.9G 292G 22K /export/home > rpool/export/home/reader 15.9G 292G 11.5G /export/home/reader > [...] > > # zfs snapshot -r rpool at somedate > # zfs snapthot rpool/someotherdate > > cd /rpool/.zfs/snapshot > diff -r somedate someotherdate > > No difference, and there is no > rpool/dump > rpool/export > rpool/export/home > rpool/export/home/reader > > under either snapshot... not to mention all the other stuff shown with > zfs list -r rpool > that I snipped.Try: zfs list -t all or zfs list -t snapshot You could also set the property for snapshots to be listed in zfs list. The default is off. zpool set listsnaps=on rpool Cheers, Mike --- Michael Sullivan michael.p.sullivan at me.com http://www.kamiogi.net/ Japan Mobile: +81-80-3202-2599 US Phone: +1-561-283-2034
[...]> > Well yes actually you aren''t looking for the snapshots the correct way.[...]>> No difference, and there is no rpool/dump >> rpool/export >> rpool/export/home >> rpool/export/home/reader >> >> under either snapshot... not to mention all the other stuff shown >> with zfs list -r rpool >> that I snipped. > > That is correct for several reasons. > > 1. some of those are ZVOLS > 2. The .zfs directory is in the root of each filesystem > 3. The /rpool directory isn''t actually used to store anything in > the case of the ZFS root pool for an OpenSolaris install. > 4. You can''t cross filesystem bounaries in a .zfs directory. > > Try: > > cd /export/home/.zfs/snapshot && ls > cd /export/home/reader/.zfs/snapshot && lsAhhh I see how it works now... sure enough the snaps are in all the filesystems top directories... all with the same name ... I think that is probably quite useful.> > A snapshot of rpool/dump and rpool/swap is pointless anyway but since > those are ZVOLs you can''t ''cd'' into a .zfs/snapshot directory for them > since that concept doesn''t exist for a ZVOL.Yes of course.. you must have noticed I was trying to make a different point ... not arguing to include useless snaps. Thank for straightening me out on how the -r flag works when creating snapshots.