Migrate pool to another disk(s).

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I have a pool called "SSD", it contains my Virtual machines dataset, all my jails etc.
I have some more storage now and I'd like to migrate to another SSD AND give the new SSD the same name.


The current "SSD is 2x500GB, could I just pull one of these, swap in with the new 1TB one, let them reslive, then pull the other 500GB? Would it auto expand to the size of the 1TB disk I'd used to replace earlier.

Alternatively what are my other options?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
could I just pull one of these, swap in with the new 1TB one, let them reslive, then pull the other 500GB? Would it auto expand to the size of the 1TB disk I'd used to replace earlier.
Yes, this will work. After the second resilver you will have the larger capacity available.

Alternatively what are my other options?
Create the new pool (name it newpool or something).
You can use zfs send | zfs recv to get the data from the old pool to the new pool.

Stop all services/jails/VMs using the pool.

Then export the old pool with zpool export

Import the old pool again, but rename it (zpool import oldpool newname) so you won't have issues with it in future.

Export it again, zpool export newname (optionally import it with the GUI later if you still want it there.

Then do more-or-less the same with the new pool (export it, re-import with the old name of the original pool, re-expert and import with the GUI).

Start your services/jails/VMs.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I don't suppose there's a way I can drop the disk, without actually physically unplugging is there? I'm not accustomed to the menus offering malicious options to break pools normally.

I can't see a way to wipe disk or remove one from pool
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Never mind - I found the option! It's weirdly hidden inside the status menu. Weird choice.

VERY WEIRD BEHAVIOUR coming up,... was this intended?

Drop disk 2 (ok fine)
REPLACE disk 2 with 1TB disk.
It syncs the disks
It then (on its own!?) drops disk #1 when the resliver is complete


So now I have a single, 1TB disk, despite not dropping the first 500GB disk myself.
I thought it would run, safely, with 1x500 and 1x1000GB disks at only 500GB total size and wouldn't expand, until *I* specified dropping the first disk?

So now my pool is only single disk. Thast's fine - I wanted that, but it's a bit surprising to not keep my data safe?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It then (on its own!?) drops disk #1 when the resliver is complete
That's not normal.
I don't know exactly what you did to cause a deviation from the intended behavior, but what you expected is what should have happened.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Yeah I don't know perhaps I misclicked - I'm quite serious though

Drop disk #2 within the status menu
Go back to disks, confirm which ADA to use (1TB disk)
Find the pool, status again - choose the disk to add, - 1TB adds and off we go.

Disk #1 drops
Should I save a debug and pass it to the team?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Maybe it could help... not sure the logs will have all that's needed, but give it a go.
 
Top