I am trying to migrate my current set up of a bunch of datasets across
2 old zpools (4x 1TB [zpool1], 4x 2TB[bigpool])
to a single new zpool (4x4TB) [hugepool]
I used the following to copy my zpool datasets
zfs snapshot -r bigpool@migrate
zfs send -R bigpool@migrate | zfs recv -Fv hugepool
This seems to have copied the datasets off one pool on to the new one.
When I tried to then do the same for zpool1, I get an error saying there is already a snapshot on the destination drive.
I don't really understand snapshots and despite reading the documentation on Oracle I am still struggling. If I delete the snapshot will that delete the datasets on the new system as well?
Reading around some other threads it would seem the correct approach is to
a) Make the snapshot
b) Replicate the snapshot
c) Make the snapshot a clone - so it is now writable
d) Promote the clone so the old zpool is a clone of the new zpool
e) destroy the old zpool
f) Now I can destroy the snapshots on the new zpool
g) repeat with the second old zpool
Is this correct or is there a better method of migrating datasets to new zpools(disks)?
It would be useful to know as in a months time, I would like to take the disks from the destroyed pool and bring them back in as a new zpool into the system. So knowing how to migrate a zpool or datsset from one device to another would be good.
thanks
2 old zpools (4x 1TB [zpool1], 4x 2TB[bigpool])
to a single new zpool (4x4TB) [hugepool]
I used the following to copy my zpool datasets
zfs snapshot -r bigpool@migrate
zfs send -R bigpool@migrate | zfs recv -Fv hugepool
This seems to have copied the datasets off one pool on to the new one.
When I tried to then do the same for zpool1, I get an error saying there is already a snapshot on the destination drive.
I don't really understand snapshots and despite reading the documentation on Oracle I am still struggling. If I delete the snapshot will that delete the datasets on the new system as well?
Reading around some other threads it would seem the correct approach is to
a) Make the snapshot
b) Replicate the snapshot
c) Make the snapshot a clone - so it is now writable
d) Promote the clone so the old zpool is a clone of the new zpool
e) destroy the old zpool
f) Now I can destroy the snapshots on the new zpool
g) repeat with the second old zpool
Is this correct or is there a better method of migrating datasets to new zpools(disks)?
It would be useful to know as in a months time, I would like to take the disks from the destroyed pool and bring them back in as a new zpool into the system. So knowing how to migrate a zpool or datsset from one device to another would be good.
thanks