Page 1 of 1
[SOLVED] Resize ZFS does not work
Posted: 08 May 2013 16:40
by Roi
Hello all,
I tried to resize my ZFS array and followed this article:
http://harryd71.blogspot.de/2009/02/how ... world.html
Other hits on the Google search said similar things, so it seems to work or seemed to work.
In my case, I do not get a bigger array.
I changed my five 1.5TB drives to five 2TB drives and as described changed the drives one by one and resilvered between every change. This worked, the data is still there, but the size is also still the same.
Then I thought that encryption might be the problem and I did the same as with changing the drives. Killed the encryption on one drive, then resilvered, then the next and so on. So now the array is a non encrypted array.
Any ideas?
Cheers,
Roi
Re: Resize ZFS does not work
Posted: 08 May 2013 16:43
by raulfg3
Re: Resize ZFS does not work
Posted: 08 May 2013 17:38
by Roi
Thank you for your reply. Sounds promising, but does not work.
basis:~# zpool status zfs-pool-1
pool: zfs-pool-1
state: ONLINE
scan: resilvered 230K in 0h0m with 0 errors on Mon May 6 08:09:49 2013
config:
NAME STATE READ WRITE CKSUM
zfs-pool-1 ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0
ada5 ONLINE 0 0 0
ada6 ONLINE 0 0 0
errors: No known data errors
basis:~# zfs set autoexpand=on zfs-pool-1
cannot set property for 'zfs-pool-1': invalid property 'autoexpand'
I am using the latest (9.1.0.1 - Sandstorm (revision 636)) version of NAS4Free, so a too old ZFS cannot be the reason, right?
Cheers,
Roi
Re: Resize ZFS does not work
Posted: 08 May 2013 17:54
by raulfg3
Roi wrote: am using the latest (9.1.0.1 - Sandstorm (revision 636)) version of NAS4Free, so a too old ZFS cannot be the reason, right?
right, the reason is that you can't modify autoexpand.
try this:
Code: Select all
zpool set autoexpand=on zfs-pool-1
http://docs.oracle.com/cd/E19253-01/819 ... index.html
Re: Resize ZFS does not work
Posted: 08 May 2013 18:29
by Roi
Thank you - but still, I do not have much luck... I also tried the export/import thing:
basis:~# zpool set autoexpand=on zfs-pool-1
basis:~# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
zfs-pool-1 6.81T 6.22T 607G 91% 1.00x ONLINE -
basis:~# zpool export zfs-pool-1
basis:~# zpool import zfs-pool-1
basis:~# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
zfs-pool-1 6.81T 6.22T 607G 91% 1.00x ONLINE -
Re: Resize ZFS does not work
Posted: 08 May 2013 19:52
by raulfg3
first you need to check your pool (change NAS-A for zfs-pool-1 because NAS-A is my pool)
Code: Select all
rnas:~# zpool get all NAS-A
NAME PROPERTY VALUE SOURCE
NAS-A size 19T -
NAS-A capacity 68% -
NAS-A altroot - default
NAS-A health ONLINE -
NAS-A guid 17550733601870243541 default
NAS-A version 28 default
NAS-A bootfs - default
NAS-A delegation on default
NAS-A autoreplace off default
NAS-A cachefile - default
NAS-A failmode wait default
NAS-A listsnapshots off default
NAS-A autoexpand off default
NAS-A dedupditto 0 default
NAS-A dedupratio 1.00x -
NAS-A free 5.96T -
NAS-A allocated 13.0T -
NAS-A readonly off -
NAS-A comment - default
NAS-A expandsize 0 -
rnas:~#
as you can see I have autoexpand=off
now change to on and revise that is changed:
Code: Select all
rnas:~# zpool set autoexpand=on NAS-A
rnas:~# zpool get all NAS-A
NAME PROPERTY VALUE SOURCE
NAS-A size 19T -
NAS-A capacity 68% -
NAS-A altroot - default
NAS-A health ONLINE -
NAS-A guid 17550733601870243541 default
NAS-A version 28 default
NAS-A bootfs - default
NAS-A delegation on default
NAS-A autoreplace off default
NAS-A cachefile - default
NAS-A failmode wait default
NAS-A listsnapshots off default
NAS-A autoexpand on local
NAS-A dedupditto 0 default
NAS-A dedupratio 1.00x -
NAS-A free 5.96T -
NAS-A allocated 13.0T -
NAS-A readonly off -
NAS-A comment - default
NAS-A expandsize 0 -
rnas:~#
once done, try to do a scrub or export import to actualice size.
PD: revise that you change all disk, if only one disk is not changed by new ones, the entire pool can't grow
Re: Resize ZFS does not work
Posted: 08 May 2013 20:09
by Roi
Thank you again for your reply.
I did change all disks from 1.5TB to 2TB, also I changed all encrypted disks to unencrypted disks (by reformating them one by one and relacing them into the pool).
This is what I get with the "zpool get all" command:
Code: Select all
basis:~# zpool get all zfs-pool-1
NAME PROPERTY VALUE SOURCE
zfs-pool-1 size 6.81T -
zfs-pool-1 capacity 91% -
zfs-pool-1 altroot - default
zfs-pool-1 health ONLINE -
zfs-pool-1 guid 3820117156089091429 default
zfs-pool-1 version 28 default
zfs-pool-1 bootfs - default
zfs-pool-1 delegation on default
zfs-pool-1 autoreplace off default
zfs-pool-1 cachefile - default
zfs-pool-1 failmode wait default
zfs-pool-1 listsnapshots off default
zfs-pool-1 autoexpand on local
zfs-pool-1 dedupditto 0 default
zfs-pool-1 dedupratio 1.00x -
zfs-pool-1 free 607G -
zfs-pool-1 allocated 6.22T -
zfs-pool-1 readonly off -
zfs-pool-1 comment - default
zfs-pool-1 expandsize 2.27T -
So autoexpand is "on". I also find the last information interesting. Looks like the space I try to gain by replacing my disks.
As export/import did not work earlier, I started a scrub now. As you can imagine this will take a while.
Re: Resize ZFS does not work
Posted: 09 May 2013 19:30
by Roi
The scrub is finished now, still no effect on the array... :-/ What is going on here? I am still curios what the "expandsize" parameter with the value 2.27T means and why it is not expanded to the new size.
Re: Resize ZFS does not work
Posted: 09 May 2013 20:02
by raulfg3
sorry I do not understand why do not work, MUST WORK, sorry.
PD: Please if others users read this post , and have experience in growing up a zpool array, please try to help here.
Re: Resize ZFS does not work
Posted: 09 May 2013 21:12
by Roi
GOT IT!!!
I found the solution here:
http://zfsguru.com/forum/zfsgurusupport/482
Code: Select all
basis:~# zpool status zfs-pool-1
pool: zfs-pool-1
state: ONLINE
scan: scrub repaired 0 in 8h53m with 0 errors on Thu May 9 05:00:04 2013
config:
NAME STATE READ WRITE CKSUM
zfs-pool-1 ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0
ada5 ONLINE 0 0 0
ada6 ONLINE 0 0 0
errors: No known data errors
basis:~# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
zfs-pool-1 6.81T 6.22T 607G 91% 1.00x ONLINE -
basis:~# zpool online -e zfs-pool-1 ada2 ada3 ada4 ada5 ada6
basis:~# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
zfs-pool-1 9.06T 6.22T 2.84T 68% 1.00x ONLINE -
So the command
zpool online -e finally did it for me.
