Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

New to OpenZFS on OS X (Or ZFS in general)? Ask your questions here!

Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby racer » Mon May 15, 2017 8:26 am

I have a four disk (2TB each) raidz zpool on my mac.
Connected via Thunderbolt to my Akitio box.

The zpool looks like this at the moment:

Code: Select all
zpool list
NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
tank  7.25T  6.23T  1.02T         -    26%    85%  1.00x  ONLINE  -

zpool status
  pool: tank
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
   still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
   the pool may no longer be accessible by software that does not support
   the features. See zpool-features(5) for details.
  scan: resilvered 448K in 0h0m with 0 errors on Thu Nov  5 14:58:49 2015
config:

   NAME                                            STATE     READ WRITE CKSUM
   tank                                            ONLINE       0     0     0
     raidz1-0                                      ONLINE       0     0     0
       media-2AE443BD-2C4D-C242-9B25-FD8BC2B33FCD  ONLINE       0     0     0
       media-3BC14A30-04F1-5340-8DA5-08DDCF699663  ONLINE       0     0     0
       media-E5A2562B-8AC7-AD47-A012-17D08A7C455E  ONLINE       0     0     0
       media-8127DF33-9A3D-0A46-A5F7-7B47BA5E490E  ONLINE       0     0     0

errors: No known data errors


My question is, can I replace my 2TB drives one by one with new 4TB drives with the following procedure:
Power down the mac
replace 2TB drive with new 4TB
power up
execute zpool replace command
wait for resilvering
goto step 1 and do another 3 times

Will this work?

Thanks.
racer
 
Posts: 4
Joined: Sat Jul 04, 2015 9:42 pm

Re: Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby lundman » Tue May 16, 2017 4:22 pm

As long as you do just one drive at a time, and let it finish resilver, then yes, that is the standard way to increase space.

You can generally do it without rebooting if your hardware supports hot-swap, but I do not think any macs do (unless they are on usb/thunder).

Once all HDDs are larger, it will grow, but you might need to help it do that, depending on pool "autoexpand" setting and so on.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby racer » Wed May 17, 2017 2:40 am

lundman wrote:As long as you do just one drive at a time, and let it finish resilver, then yes, that is the standard way to increase space.

You can generally do it without rebooting if your hardware supports hot-swap, but I do not think any macs do (unless they are on usb/thunder).

Once all HDDs are larger, it will grow, but you might need to help it do that, depending on pool "autoexpand" setting and so on.


Thanks lundman for the confirmation.

Already resilvering first drive.
racer
 
Posts: 4
Joined: Sat Jul 04, 2015 9:42 pm

Re: Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby racer » Thu May 18, 2017 4:04 am

So all finished with the swap ins and swap outs, everything went fine, took about 6h to resilver each drive and the zpool is online with the new 4TB drives.

Now I am having trouble expanding the zpool.

First I tried, as mentioned in an other post doing setting
Code: Select all
zpool set autoexpand=on tank

but nothing happened. Tried reboot (usually a good idea) nothing, same zpool list numbers.

Set autoexpand to off, and tried
Code: Select all
zpool offline tank disk1
zpool online -e tank disk1

this produced a "cannot relabel '/private/var/run/disk/by-id/media-88365926-930A-7E41-8648-E6865FD72010': unable to read disk capacity"

if I set autoexpand to on and try the offline-online command it won't let me online the disk with the "unable to read disk capacity" message.

Any ideas, kinda stumped.
racer
 
Posts: 4
Joined: Sat Jul 04, 2015 9:42 pm

Re: Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby lundman » Fri May 19, 2017 2:20 am

Oh yeah, you have to import it as /dev/disk names, then run the online -e, then re-import it as /var/run again
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby racer » Sun May 21, 2017 1:06 am

lundman wrote:Oh yeah, you have to import it as /dev/disk names, then run the online -e, then re-import it as /var/run again


Yeap, the export-import thing did the trick.

Many thanks.
racer
 
Posts: 4
Joined: Sat Jul 04, 2015 9:42 pm

Re: Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby jwilliams108 » Wed Dec 20, 2017 5:13 pm

Any chance either of you could expand a bit on what commands should be run when you say 'you have to import it as /dev/disk names, then run the online -e, then re-import it as /var/run again'?

I'm in the same situation where I'm going to be upgrading my 4 x 2TB pool to a 4 x 4TB, and am not entirely clear on what I should be running to make sure my pool gets expanded. Thanks in advance.
jwilliams108
 
Posts: 6
Joined: Sat Jul 26, 2014 12:22 am

Re: Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby lundman » Sun Dec 24, 2017 2:43 pm

zpool export POOLNAME
zpool import -d /dev POOLNAME
zpool online -e POOLNAME /dev/diskX
<confirm expansion>
zpool export POOLNAME
zpool import -d /var/run/dsk/by-id POOLNAME # was that the path?
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby jwilliams108 » Wed Dec 27, 2017 5:03 pm

Thanks! Seems like having autoexpand set was enough, I only needed to do the zpool replace, and once the vdev had 2 of the higher capacity drives the extra space was available. Cheers.
jwilliams108
 
Posts: 6
Joined: Sat Jul 26, 2014 12:22 am

Re: Is it possible to upgrade a 4 X 2TB zpool to 4 X 4TB?

Postby BB86-142 » Tue Feb 14, 2023 11:43 am

New ZFS user here.

I'm halfway through an upgrade like this myself. 2/4 drives went smoothly but I'm having trouble with the last two drives.

I'm getting an error code of:
cannot label 'disk1' : cannot label 'dev/disk1/: unable to open device: 16

The command I've been trying is zpool replace:

Code: Select all
 sudo zpool replace -f Z4 10471030020862961544 /dev/disk1
BB86-142
 
Posts: 2
Joined: Tue Feb 14, 2023 11:27 am

Next

Return to Absolute Beginners Section

Who is online

Users browsing this forum: No registered users and 12 guests