Hi Harry!
> > Both will work. Any dataset snapshot can be sent/received separately, > > if you want. But you can also use a recursive send where the dataset > > itself and all "child datasets" will be included in the stream. Check > > out the "-r" and "-R" flags in the zfs(1M) man page. > > I could not find an -r (lowercase) for send sub-command (maybe you are > only refering to zfs main cmd). No, it was a Solaris-ism that doesn't exist in illumos. Sorry for not having checked it before sending the mail. > But experimenting with send -R I seem to have > gotten myself into some trouble. > > I attempted to: > zfs send -R rpool/export/home/MYUSER |ssh oi0 zfs recv p12x OK, so you are transferring an entire dataset, not a snapshot. Not sure how this could have worked, as the -R flag only applies to snapshots, not datasets. > So the result was that rpool/export/home/MYUSER showed up on the VBox > instance of oi as p12x/export/home/MYUSER. But it attempted to > retain the mountpoint from the sending os of /export/home/reader. Works as designed. The -R flag implies -p, which retains all properties including the mountpoint. I doubt it has worked in your case since there is no -R flag for datasets. > Fortunately the mount was unsucessful since MYUSER was not empty. As it would be whenever a mountpoint isn't empty. > So the sent fs is setting there and can cbe displayed with > zfs list -r and shows the mountpoint that was refused as if it worked. Well, it did work, it just didn't mount the dataset. > On receiving OS: > > ,---- > | root # zfs list -r p12x > | NAME USED AVAIL REFER MOUNTPOINT > | p12x 3.86G 203G 3.86G /export/home/reader > | > | (Shows the data occupying 3.86 of space) > `---- Are you sure this is correct? I don't see your dataset "p12x/export /home/MYUSER" there. You only have the pool itself, with the mount- point property. > However the fs p12x/export/home/MYSUSER will not accept substitute > mount point and claims the fs does not exist: > > ,---- > | On the recv OS: > | I created an empty directory at /2x-rpool and tried: > | (2x is hostname of sending OS) > | zfs set mountpoint=/2x-rpool p12x/export/home/reader > | cannot open 'p12x/export/home/reader': dataset does not exist > `---- That's because it really doesn't exist (see above). > So I can't remount it. Or see the data in anyway I can think off. > > zfs cannot even destroy it: > > ,---- > | On recv OS: > | root # zfs destroy -r p12x/export/home/reader > | cannot open 'p12x/export/home/reader': dataset does not exist > `---- Same here: It doesn't exist. > Fortunately `zpool' still knew how: > > ,---- > | On recv OS: > | zpool destroy p12x > | (Finished with no errors) > `---- > > zfs list -r shows it gone > > > So is there a way to send rpool to a remote host without all that mess? Yes, there is. First, create a snapshot, like rpool/export/home/MYUSER@now To change a mountpoint while receiving, specify it on the "receive" side of the pipe (really only one line): zfs send -R rpool/export/home/MYUSER@now | ssh oi0 zfs recv -e -o mountpoint=/export/home/MYUSER p12x/export/home You could leave out -R since there is nothing to replicate if you only have one dataset with one snapshot. The "-e" will tell zfs recv to just use the MYUSER part of the sent dataset name. Note that p12x/export/home must already exist. If you want to be sure everything is copied before mounting it, use "zfs recv -u ..." so that datasets aren't automatically mounted on the receiving side. Hope this helps -- Volker -- ------------------------------------------------------------------------ Volker A. Brandt Consulting and Support for Solaris-based Systems Brandt & Brandt Computer GmbH WWW: http://www.bb-c.de/ Am Wiesenpfad 6, 53340 Meckenheim, GERMANY Email: [email protected] Handelsregister: Amtsgericht Bonn, HRB 10513 Schuhgröße: 46 Geschäftsführer: Rainer J.H. Brandt und Volker A. Brandt "When logic and proportion have fallen sloppy dead" _______________________________________________ openindiana-discuss mailing list [email protected] https://openindiana.org/mailman/listinfo/openindiana-discuss
