Hi, I want to move all the ZFS fs from one pool to another, but I don''t want to "gain" an extra level in the folder structure on the target pool. On the source zpool I used zfs snapshot -r tank at moveTank on the root fs and I got a new snapshot in all sub fs, as expected. Now, I want to use zfs send -R tank at moveTank | zfs recv targetTank/... which would place all zfs fs one level down below targetTank. Overwriting targetTank is not an option, since the zfs fs musn''t exist prior to zfs recv. Now, I could run a little script that runs through the zpool and transfers each zfs fs over individually, but I hoped that there would be another way. Cheers, budy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20101217/c4ebed09/attachment.html>
Edward Ned Harvey
2010-Dec-18 04:44 UTC
[zfs-discuss] copy complete zpool via zfs send/recv
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Stephan Budach > > Now, I want to use zfs send -R tank at moveTank | zfs recv targetTank/... > which would place all zfs fs one level down below targetTank. > Overwriting targetTank is not an option, since the zfs fs musn''t existprior to> zfs recv.You lost me in that one. If there is a zfs filesystem at the recipient... and you don''t want to receive into a subdirectory of it ... then you have to overwrite it. And I don''t see any reason not to overwrite it. You say the destination filesystem mustn''t exist prior to receive... But did you know of the -F option? It forces the overwrite, if you want to receive and overwrite an existing filesystem. What am I missing? Or did I just answer it?
Am 18.12.10 05:44, schrieb Edward Ned Harvey:>> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- >> bounces at opensolaris.org] On Behalf Of Stephan Budach >> >> Now, I want to use zfs send -R tank at moveTank | zfs recv targetTank/... >> which would place all zfs fs one level down below targetTank. >> Overwriting targetTank is not an option, since the zfs fs musn''t exist > prior to >> zfs recv. > You lost me in that one. > > If there is a zfs filesystem at the recipient... and you don''t want to > receive into a subdirectory of it ... then you have to overwrite it. And I > don''t see any reason not to overwrite it. > > You say the destination filesystem mustn''t exist prior to receive... But > did you know of the -F option? It forces the overwrite, if you want to > receive and overwrite an existing filesystem. > > What am I missing? Or did I just answer it? >Ehh... well... you answered it... sort of. ;) I think I simply didn''t dare to overwrite the root zfs on the destination zpool with -F, but of course you''re right, that this is the way to go. Thanks, budy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20101218/d9b710b2/attachment.html>
Edward Ned Harvey
2010-Dec-18 14:14 UTC
[zfs-discuss] copy complete zpool via zfs send/recv
> From: Stephan Budach [mailto:stephan.budach at jvm.de] > > Ehh. well. you answered it. sort of. ;) > I think I simply didn''t dare to overwrite the root zfs on the destinationzpool> with -F, but of course you''re right, that this is the way to go.What are you calling the root zfs on the destination? You''re not trying to overwrite / are you? That would ... admittedly ... not be so straightforward. But I don''t think it''s impossible.
Am 18.12.10 15:14, schrieb Edward Ned Harvey:>> From: Stephan Budach [mailto:stephan.budach at jvm.de] >> >> Ehh. well. you answered it. sort of. ;) >> I think I simply didn''t dare to overwrite the root zfs on the destination > zpool >> with -F, but of course you''re right, that this is the way to go. > What are you calling the root zfs on the destination? > You''re not trying to overwrite / are you? That would ... admittedly ... not > be so straightforward. But I don''t think it''s impossible. >The root zfs, to me, is the fs that gets created once you create the zpool. So, if I create the zpool tank, I also get the zfs fs tank, no? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20101218/fc79c9b3/attachment.html>
2010/12/18 Stephan Budach <stephan.budach at jvm.de>> Am 18.12.10 15:14, schrieb Edward Ned Harvey: > > From: Stephan Budach [mailto:stephan.budach at jvm.de <stephan.budach at jvm.de>] > > Ehh. well. you answered it. sort of. ;) > I think I simply didn''t dare to overwrite the root zfs on the destination > > zpool > > with -F, but of course you''re right, that this is the way to go. > > What are you calling the root zfs on the destination? > You''re not trying to overwrite / are you? That would ... admittedly ... not > be so straightforward. But I don''t think it''s impossible. > > > The root zfs, to me, is the fs that gets created once you create the > zpool. So, if I create the zpool tank, I also get the zfs fs tank, no? > > Yes, but zfs receive can put received data only to another pool. You cannotzfs receive to RAW disk> > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20101218/4e7d4e24/attachment-0001.html>
Am 18.12.10 15:54, schrieb eXeC001er:> > > 2010/12/18 Stephan Budach <stephan.budach at jvm.de > <mailto:stephan.budach at jvm.de>> > > Am 18.12.10 15:14, schrieb Edward Ned Harvey: >>> From: Stephan Budach [mailto:stephan.budach at jvm.de] >>> >>> Ehh. well. you answered it. sort of. ;) >>> I think I simply didn''t dare to overwrite the root zfs on the destination >> zpool >>> with -F, but of course you''re right, that this is the way to go. >> What are you calling the root zfs on the destination? >> You''re not trying to overwrite / are you? That would ... admittedly ... not >> be so straightforward. But I don''t think it''s impossible. >> > The root zfs, to me, is the fs that gets created once you create > the zpool. So, if I create the zpool tank, I also get the zfs fs > tank, no? > > Yes, but zfs receive can put received data only to another pool. You > cannot zfs receive to RAW disk > >Well, in the end it is of course as Edward pointed out. Imagine a zpool called tank with 4 ZFS volumes on it: tank tank/fs1 tank/fs2 tank/fs3 This sums up to 4 volumes (maybe I should have used volumes, rather then fs). I wanted to transfer the complete zpool tank onto another zpool called backupTank by using zfs send -R tank at snap | zfs recv backupTank, which raised the error message that I can''t overwrite the existing volume. This can of course be overwritten by using -F, such as that it would replace everything on backupTank with the contents of tank - this is what I didn''t dare, since for some reason, I thought that the volume tankBackup would get destroyed, but in the end it''s not the volume that gets destroyed, but it''s contents gets overwritten. Cheers, budy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20101218/9da9ae31/attachment.html>