What is the correct procedure for replacing disks in zfs tank to expand volume ?

Status
Not open for further replies.

pk007_za

Dabbler
Joined
Oct 5, 2011
Messages
19
Hi,

I have FreeNAS 8.0.2 with 5 x 2.0TB Drives in a single RAIDZ1 volume. I have bought 5 x 2.5TB Drives and want to start replacing the drives one-by-one correctly to allow the RAIDZ1 to repair after a disk replacement, then after that expand the ZFS volume to take advantage of the additional space.

What is the correct procedure in doing this kind of upgrade ?

Thanks,

Pk
 

freeflow

Dabbler
Joined
May 29, 2011
Messages
38
The simplest way is to set up a temporary 2nd Freenas box. Create your ZFS raid1. copy all data across. export the raid1 on both freenas boxes then transfer the new discs to the old import the new raid1 on the old freenas box.
 

freeflow

Dabbler
Joined
May 29, 2011
Messages
38
and without a second FreeNAS box you would read the ZFS administrators guide and follow the guidance therein. The advice I gave previously works for any type of zfs raid.

The second freenas setup is only needed for as long as it takes to create the new array and copy. So provided you have access to a second PC with a sufficient number of ports you just need to ask politely for a ****.
 

pk007_za

Dabbler
Joined
Oct 5, 2011
Messages
19
Okay,

here was the path I used:

1. shutdown freenas, replace 1 x 2TB Drive with a 2.5TB Drive, start up box.
2. Go to WebUI/Storage/Volumes/View All Volumes/View Disks.
The missing 2TB drive is marked "unknown", click on the "Replace" button and choose the available 2.5TB.
The missing disk will still be shown, but with a wierd numeric name like 3232423454552234 - choose "remove" or "delete" on this defunct drive.
Doing all this through the GUI is better, since the correct Swap space is created before anything else and keeps it neat and tidy.
3. Allow the disk to resilver, you can check progress with "zpool status TANKNAME" through ssh. (The WebUI Zpool status just shows everything as "HEALTHY" but don't trust that!)

[root@freenas] ~# zpool status RAID5Z
pool: RAID5Z
state: ONLINE
scrub: resilver in progress for 0h10m, 2.93% done, 8h40m to go
config:

NAME STATE READ WRITE CKSUM
RAID5Z ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0p2 ONLINE 0 0 0
ada1p2 ONLINE 0 0 0
ada2p2 ONLINE 0 0 0
ada3p2 ONLINE 0 0 0
ada4p2 ONLINE 0 0 0 5.9G resilvered

errors: No known data errors


4. Once the disk is completed resilvering, powerdown and go back to (1.) and do the next disk.

For 5 disks took me a few days, since I was resilvering about 1TB of data per drive. Once the last disk is resilvered, just reboot and the extra space will be available:

before:

[root@freenas] ~# df -h
RAID5Z 7.1T 3.8T 3.3T 54% /mnt/RAID5Z


after:

[root@freenas] ~# df -h
RAID5Z 8.9T 3.8T 5.1T 43% /mnt/RAID5Z


During this entire process of resilvering disks, I was still able to watch 1080p movies, download stuff with sabnzbd/sickbeard/couchpotato and generally work as if nothing was going on. The ability to upgrade the disks without downtime is the reason I wanted FreeNAS in the first place.

Pk
 
Status
Not open for further replies.
Top