Hi all, I want to backup a pool called mpool. I want to do this by doing a zfs send of a mpool snapshot and receive into a different pool called bpool. All this on the same machine. I''m sharing various filesystems via zfs sharenfs and sharesmb. Sending and receiving of the entire pool works as expected, including incremental updates. After exporting and importing bpool all shares get activated. All nfs shares get duplicated albeit with a different root. But the cifs shares really get duplicated. Looking at the output from sharemgr the share from bpool, which got mounted last, got precedence over the real share. What I want is a second pool which is a copy of the first including all properties. I don''t want to turn turn off sharing by setting sharenfs and sharesmb to off. Because when I need to restore the pool I also need to set all the sharing properties again. Currently I use the following strategy: # zpool create -m none -O canmount=noauto bpool c5t15d0 c5t16d0 # zfs snapshot -r tpool at 00 # zfs send -R tpool at 00 | zfs recv -vFud bpool # zfs set canmount=noauto [each filesystem in bpool] # zpool export bpool # zpool import bpool After the import of bpool no extra shares in sharemgr and all properties still intact except the canmount property. Can I either send or receive the canmount=noauto property? (PSARC/2009/510) I know that I need at least version 22 for that. I tried it on a b134 with version 22 pools but couldn''t get it to work. How can I prevent mounting filesystems during zpool import? I know how to mount it on a different root that doesn''t solve my problem. Why can''t the canmount zfs property be inherited? Any suggestion and / or strategy to accomplish will be more than welcome. Thank you for your interest and time, Frederik -- This message posted from opensolaris.org
Use the "-u" option on the receiving pool. From the zfs(1m) man page: -u File system that is associated with the received stream is not mounted. NB this works for root pools, too. -- richard On Apr 9, 2010, at 5:33 AM, F. Wessels wrote:> Hi all, > > I want to backup a pool called mpool. I want to do this by doing a zfs send of a mpool snapshot and receive into a different pool called bpool. All this on the same machine. > I''m sharing various filesystems via zfs sharenfs and sharesmb. > Sending and receiving of the entire pool works as expected, including incremental updates. > After exporting and importing bpool all shares get activated. All nfs shares get duplicated albeit with a different root. But the cifs shares really get duplicated. Looking at the output from sharemgr the share from bpool, which got mounted last, got precedence over the real share. > What I want is a second pool which is a copy of the first including all properties. I don''t want to turn turn off sharing by setting sharenfs and sharesmb to off. Because when I need to restore the pool I also need to set all the sharing properties again. > Currently I use the following strategy: > # zpool create -m none -O canmount=noauto bpool c5t15d0 c5t16d0 > # zfs snapshot -r tpool at 00 > # zfs send -R tpool at 00 | zfs recv -vFud bpool > # zfs set canmount=noauto [each filesystem in bpool] > # zpool export bpool > # zpool import bpool > After the import of bpool no extra shares in sharemgr and all properties still intact except the canmount property. > > Can I either send or receive the canmount=noauto property? (PSARC/2009/510) I know that I need at least version 22 for that. I tried it on a b134 with version 22 pools but couldn''t get it to work. > How can I prevent mounting filesystems during zpool import? I know how to mount it on a different root that doesn''t solve my problem. > Why can''t the canmount zfs property be inherited? > > Any suggestion and / or strategy to accomplish will be more than welcome. > > Thank you for your interest and time, > > Frederik > -- > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discussZFS storage and performance consulting at http://www.RichardElling.com ZFS training on deduplication, NexentaStor, and NAS performance Las Vegas, April 29-30, 2010 http://nexenta-vegas.eventbrite.com
Hi Richard, thanks for the reply. As you can see I already use that option. But that doesn''t prevent the filesystems in the pool from mounting when I import the pool after it was exported. I''m specifically looking for a zpool import option to prevent the filesystems from mounting automatically. Thanks, Frederik -- This message posted from opensolaris.org
try again... On Apr 9, 2010, at 5:33 AM, F. Wessels wrote:> Hi all, > > I want to backup a pool called mpool. I want to do this by doing a zfs send of a mpool snapshot and receive into a different pool called bpool. All this on the same machine. > I''m sharing various filesystems via zfs sharenfs and sharesmb. > Sending and receiving of the entire pool works as expected, including incremental updates. > After exporting and importing bpool all shares get activated. All nfs shares get duplicated albeit with a different root. But the cifs shares really get duplicated. Looking at the output from sharemgr the share from bpool, which got mounted last, got precedence over the real share. > What I want is a second pool which is a copy of the first including all properties. I don''t want to turn turn off sharing by setting sharenfs and sharesmb to off. Because when I need to restore the pool I also need to set all the sharing properties again.I''ll challenge this notion. Re-sharing the copy is a disaster recovery scenario, not a restore scenario. There should be no case where you want to share both copies simultaneously to the same client because then your copies diverge and you lose the original-to-backup relationship.> Currently I use the following strategy: > # zpool create -m none -O canmount=noauto bpool c5t15d0 c5t16d0 > # zfs snapshot -r tpool at 00 > # zfs send -R tpool at 00 | zfs recv -vFud bpool > # zfs set canmount=noauto [each filesystem in bpool]instead do zfs set sharesmb=off zfs set sharenfs=off All property settings are recorded in the zpool history, so you can''t "lose" the settings for sharenfs or sharesmb.> # zpool export bpool > # zpool import bpool > After the import of bpool no extra shares in sharemgr and all properties still intact except the canmount property. > > Can I either send or receive the canmount=noauto property? (PSARC/2009/510) I know that I need at least version 22 for that. I tried it on a b134 with version 22 pools but couldn''t get it to work.I do not know of a method for injecting property changes into a send stream. This might be an interesting RFE, but I fear the HCI for such a feature is a bigger problem.> How can I prevent mounting filesystems during zpool import? I know how to mount it on a different root that doesn''t solve my problem. > Why can''t the canmount zfs property be inherited?I don''t see any definitive statement in the ARC case logs. However, I believe that trying to teach people how to "zfs create -o canmount=noauto" is far more difficult than teaching how to set canmount on an existing file system.> Any suggestion and / or strategy to accomplish will be more than welcome.I have reservations about using "zfs send -R" because it rarely suits my needs. While it appears to save keystrokes, it makes policy management more difficult. -- richard> > Thank you for your interest and time, > > Frederik > -- > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discussZFS storage and performance consulting at http://www.RichardElling.com ZFS training on deduplication, NexentaStor, and NAS performance Las Vegas, April 29-30, 2010 http://nexenta-vegas.eventbrite.com