I''m trying to use zfs send/receive to replicate the root pool of a system and I can''t think of a way to stop the received copy attempting to mount the filesystem over the root of the destination pool. For example, if I try zfs send rpool/ROOT/10ZFS at thu | zfs receive -d backup It fails with cannot mount ''/a/mnt'': directory is not empty. /a/mnt is the root of the pool backup. -- Ian.
On Thu, 21 May 2009, Ian Collins wrote:> I''m trying to use zfs send/receive to replicate the root pool of a system and > I can''t think of a way to stop the received copy attempting to mount the > filesystem over the root of the destination pool.If you''re using build 107 or later, there''s a hidden -u option available for zfs receive to tell it not to mount the dataset. See http://tinyurl.com/crgog8 for more details. Regards, markm
Hi Ian, This procedure identifies the zfs send/receive syntax: http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Complete_Solaris_ZFS_Root_Pool_Recovery Cindy Ian Collins wrote:> I''m trying to use zfs send/receive to replicate the root pool of a > system and I can''t think of a way to stop the received copy attempting > to mount the filesystem over the root of the destination pool. > > For example, if I try > > zfs send rpool/ROOT/10ZFS at thu | zfs receive -d backup > > It fails with > > cannot mount ''/a/mnt'': directory is not empty. > > /a/mnt is the root of the pool backup. >
Mark J Musante wrote:> On Thu, 21 May 2009, Ian Collins wrote: > >> I''m trying to use zfs send/receive to replicate the root pool of a >> system and I can''t think of a way to stop the received copy >> attempting to mount the filesystem over the root of the destination >> pool. > > If you''re using build 107 or later, there''s a hidden -u option > available for zfs receive to tell it not to mount the dataset. See > http://tinyurl.com/crgog8 for more details. >Thanks for the tip Mark, unfortunately I''m stuck with Solaris 10 on this system. -- Ian.
On Fri, May 22, 2009 at 12:40 AM, Ian Collins <ian at ianshome.com> wrote:> Mark J Musante wrote: > >> On Thu, 21 May 2009, Ian Collins wrote: >> >> I''m trying to use zfs send/receive to replicate the root pool of a system >>> and I can''t think of a way to stop the received copy attempting to mount the >>> filesystem over the root of the destination pool. >>> >> >> If you''re using build 107 or later, there''s a hidden -u option available >> for zfs receive to tell it not to mount the dataset. See >> http://tinyurl.com/crgog8 for more details. >> >> Thanks for the tip Mark, unfortunately I''m stuck with Solaris 10 on this > system.I just did this the old way, and it wasn''t that hard. I didn''t even script it (yet), but it seems like it should be easy to do if you use the solarisinternals recipe. Blake -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090522/e9e27791/attachment.html>
On 05/21/09 22:40, Ian Collins wrote:> Mark J Musante wrote: >> On Thu, 21 May 2009, Ian Collins wrote: >> >>> I''m trying to use zfs send/receive to replicate the root pool of a >>> system and I can''t think of a way to stop the received copy >>> attempting to mount the filesystem over the root of the destination >>> pool. >> >> If you''re using build 107 or later, there''s a hidden -u option >> available for zfs receive to tell it not to mount the dataset. See >> http://tinyurl.com/crgog8 for more details. >> > Thanks for the tip Mark, unfortunately I''m stuck with Solaris 10 on > this system.Actually, the -u option has been integrated into Update 7 of S10. Lori
Lori Alt wrote:> On 05/21/09 22:40, Ian Collins wrote: >> Mark J Musante wrote: >>> On Thu, 21 May 2009, Ian Collins wrote: >>> >>>> I''m trying to use zfs send/receive to replicate the root pool of a >>>> system and I can''t think of a way to stop the received copy >>>> attempting to mount the filesystem over the root of the destination >>>> pool. >>> >>> If you''re using build 107 or later, there''s a hidden -u option >>> available for zfs receive to tell it not to mount the dataset. See >>> http://tinyurl.com/crgog8 for more details. >>> >> Thanks for the tip Mark, unfortunately I''m stuck with Solaris 10 on >> this system. > Actually, the -u option has been integrated into Update 7 of S10. >That''s good to know, but you can guess what''s coming next - the box uses update 6! I think I''ll just use cpio for now. Cheers, -- Ian.