Moving data from degraded RAID-Z to a new volume

Status
Not open for further replies.

sjmurdoch

Cadet
Joined
Aug 30, 2012
Messages
5
I've currently got a FreeNAS 8.2 system with a 1TB and 2TB drive making a 1TB mirrored ZFS. I have a new 2TB drive, and would like to create a new 2TB volume then move all the data to it.

The approach I was considering was to install the new 2TB drive, then remove the old 2TB drive from the existing volume but leave the disk physically installed. At this point I'll have a 1TB degraded ZFS volume and 2 unused disks. Then I create a new 2TB mirrored ZFS volume over the old 2TB disk and the new 2TB disk. Finally I copy all the data over from the 1TB volume to the new 2TB volume.

Obviously the 1TB disk will not have any resiliency to failure during the copy, but if all goes wrong I have an off-site backup.

Does this sound like the right solution to the problem, and are there any gotchas I should watch out for?

Is this something I should do in FreeNAS 8.2 or should I upgraded to 9.2 first (this is also on my TODO list)?
 

sjmurdoch

Cadet
Joined
Aug 30, 2012
Messages
5
I started trying myself in a VM, and I am glad I did.

The first attempt was to offline the old 2TB disk then create a new pool from it and the new 2TB disk. That failed because ZFS recognized that one disk was part of an already-existing ZFS pool.

The second attempt was to "zpool detach" the old 2TB disk (rather than offlining it). That failed because of this bug: https://bugs.freenas.org/issues/4037

So I guess I'm waiting for this bug to get fixed before I go ahead with my plan.
 

sjmurdoch

Cadet
Joined
Aug 30, 2012
Messages
5
You should be able to use the FreeNAS GUI replace disk functionality to replace the 1TB drive with the new 2TB drive. The pool should autoexpand

Thanks, that was very helpful. It looks like this feature was on by default in 8.3.1 so I missed that when planning.

I did hit a problem when using the GUI though in my VM test. When I tried to offline the old disk I got the message "cannot offline gptid:... no such device in pool". This looks like the problem here: https://forums.freebsd.org/viewtopic.php?&t=39410

I ended up using zdb and gpart to map between device name and ZFS GUID and offline'd the disk on the command line.
 
Status
Not open for further replies.
Top