Expanding physical drives

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

Expanding physical drives

Postby rpammeraal » Sun Jan 03, 2016 6:38 pm

Next topic -- expanding a drive.
Replaced a failing drive with a bigger one.

Auto expand property on the pool is on:
Code: Select all
sun:~ root# zpool get autoexpand
NAME     PROPERTY    VALUE   SOURCE
sunDATA  autoexpand  on      local


Having imported the pool as follows:
Code: Select all
sun:~ root# zpool import -d /dev sunDATA
sun:~ root# zpool status
  pool: sunDATA
 state: ONLINE
status: One or more devices could not be used because the label is missing or
   invalid.  Sufficient replicas exist for the pool to continue
   functioning in a degraded state.
action: Replace the device using 'zpool replace'.
   see: http://zfsonlinux.org/msg/ZFS-8000-4J
  scan: resilvered 355G in 3h43m with 0 errors on Sun Jan  3 16:02:18 2016
config:

   NAME                      STATE     READ WRITE CKSUM
   sunDATA                   ONLINE       0     0     0
     raidz2-0                ONLINE       0     0     0
       disk2                 ONLINE       0     0     0
       disk0                 ONLINE       0     0     0
       14444248299805286264  UNAVAIL      0     0     0  was /private/var/run/disk/by-id/media-8A75DC38-9779-8046-B48B-8792527F9133
       disk4                 ONLINE       0     0     0
       disk10                ONLINE       0     0     0
       disk8                 ONLINE       0     0     0
       disk9                 ONLINE       0     0     0
       disk1                 ONLINE       0     0     0

errors: No known data errors


(Never mind the degraded status of the pool), I tried:

Code: Select all
sun:~ root# zpool online -e sunDATA /dev/disk2
cannot expand /dev/disk2: no such device in pool


I also tried importing this by doing the following:
Code: Select all
sun:~ root# zpool import -d /private/var/run/disk/by-id sunDATA
sun:~ root# zpool status
  pool: sunDATA
 state: ONLINE
status: One or more devices could not be used because the label is missing or
   invalid.  Sufficient replicas exist for the pool to continue
   functioning in a degraded state.
action: Replace the device using 'zpool replace'.
   see: http://zfsonlinux.org/msg/ZFS-8000-4J
  scan: resilvered 355G in 3h43m with 0 errors on Sun Jan  3 16:02:18 2016
config:

   NAME                                            STATE     READ WRITE CKSUM
   sunDATA                                         ONLINE       0     0     0
     raidz2-0                                      ONLINE       0     0     0
       media-69A4290A-125C-D440-9A01-A9809BF01214  ONLINE       0     0     0
       media-51539492-A269-E543-9642-20F5218F9522  ONLINE       0     0     0
       14444248299805286264                        UNAVAIL      0     0     0  was /private/var/run/disk/by-id/media-8A75DC38-9779-8046-B48B-8792527F9133
       media-C15B109C-D9E4-C448-A55D-7131EE0507FC  ONLINE       0     0     0
       media-12EF40F5-C7EC-A34B-897E-A51EF3841B06  ONLINE       0     0     0
       media-0FA2E86D-9C68-6942-83AD-E0279C7953AF  ONLINE       0     0     0
       media-C9A99C87-D21C-B34D-82A5-8303EDFA061A  ONLINE       0     0     0
       media-C94AA69D-4DBA-AA48-9F1F-D4A669AC4DB5  ONLINE       0     0     0

errors: No known data errors
sun:~ root# ls -las /private/var/run/disk/by-id/media-69A4290A-125C-D440-9A01-A9809BF01214
8 lrwxr-xr-x  1 root  daemon  12 Jan  3 16:29 /private/var/run/disk/by-id/media-69A4290A-125C-D440-9A01-A9809BF01214 -> /dev/disk2s1
sun:~ root# zpool online -e sunDATA /private/var/run/disk/by-id/media-69A4290A-125C-D440-9A01-A9809BF01214
cannot expand /private/var/run/disk/by-id/media-69A4290A-125C-D440-9A01-A9809BF01214: no such device in pool



What am I missing?

Thanks in advance for any replies,
Roy
rpammeraal
 
Posts: 5
Joined: Sun Nov 22, 2015 4:30 pm

Re: Expanding physical drives

Postby rpammeraal » Mon Jan 04, 2016 5:58 am

Well, stupid me.
Doing a
Code: Select all
zpool offline sunDATA <device>
first, I was able to do an
Code: Select all
zpool online -e sunDATA <device>
.
However, I still don't see the pool getting expanded.

What am I missing...?

Roy
rpammeraal
 
Posts: 5
Joined: Sun Nov 22, 2015 4:30 pm

Re: Expanding physical drives

Postby Brendon » Tue May 17, 2016 3:59 am

For raidz you have to expand all disks. The "zpool online -e <pool> <eachdisk". Increased pool capacity based on growing a single disks does not work on ZFS raidz.

- Brendon
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm


Return to Absolute Beginners Section

Who is online

Users browsing this forum: No registered users and 2 guests