I have just finished a round of testing which has left me a little confused.
I was under the impression that if you increased the size of all the harddrives in a zfs pool/raidz setup, that once you had replaced the last small drive, the extra space of the new drives would be available.
After running a test, I have found that not to be the case. Can someone tell me what I am doing wrong?
First off, I created 5 100mb files
Code:
# mkfile 100m /disk1
# mkfile 100m /disk2
# mkfile 100m /disk3
# mkfile 100m /disk4
# mkfile 100m /disk5
Then I created 5x 200mb files
Code:
# mkfile 200m /disk6
# mkfile 200m /disk7
# mkfile 200m /disk8
# mkfile 200m /disk9
# mkfile 200m /disk10
I created the pool:
Code:
# zpool create test raidz /disk1 /disk2 /disk3 /disk4 /disk5
End result:
Code:
# ls -lrt disk*
-rw------T 1 root root 104857600 Mar 17 14:59 disk1
-rw------T 1 root root 104857600 Mar 17 15:00 disk2
-rw------T 1 root root 104857600 Mar 17 15:00 disk3
-rw------T 1 root root 104857600 Mar 17 15:01 disk4
-rw------T 1 root root 104857600 Mar 17 15:02 disk5
-rw------T 1 root root 209715200 Mar 17 15:05 disk6
-rw------T 1 root root 209715200 Mar 17 15:05 disk7
-rw------T 1 root root 209715200 Mar 17 15:05 disk8
-rw------T 1 root root 209715200 Mar 17 15:05 disk9
-rw------T 1 root root 209715200 Mar 17 15:05 disk10
I then one by one replaced all the (pseudo) drives with the larger ones
Code:
# zpool replace test /disk1 /disk6
# zpool replace test /disk2 /disk7
#... and so on
I did a
zfs list between each change, and there was no change (as expected), but when I changed the last drive, I thought the new size would be visible. It wasn't.
Code:
# zpool status test
pool: test
state: ONLINE
scrub: scrub completed with 0 errors on Mon Mar 17 15:04:05 2008
config:
NAME STATE READ WRITE CKSUM
test ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/disk6 ONLINE 0 0 0
/disk7 ONLINE 0 0 0
/disk8 ONLINE 0 0 0
/disk9 ONLINE 0 0 0
/disk10 ONLINE 0 0 0
errors: No known data errors
# zpool list test
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
test 476M 12.7M 463M 2% ONLINE -
# zfs list test
NAME USED AVAIL REFER MOUNTPOINT
test 10.1M 338M 10.0M /test
I now have 5 drives of 200mb each, 1gb (confirmed in the
ls back up the page a bit). I would have expected 750-800mb, but there is less than 350mb there. I threw a 10mb file in there for good measure and even tried scrubbing it. Are my commands wrong? I performed a scrub, but to no avail? What do you have to do for the zfs/zpool to update?