Help answer threads with 0 replies.
Go Back > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.


  Search this Thread
Old 03-18-2008, 05:15 AM   #1
Registered: Jan 2007
Posts: 70

Rep: Reputation: 15
autoexpanding zfs on adding larger drives

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
# mkfile 100m /disk1
# mkfile 100m /disk2
# mkfile 100m /disk3
# mkfile 100m /disk4
# mkfile 100m /disk5
Then I created 5x 200mb files
# mkfile 200m /disk6
# mkfile 200m /disk7
# mkfile 200m /disk8
# mkfile 200m /disk9
# mkfile 200m /disk10
I created the pool:
# zpool create test raidz /disk1 /disk2 /disk3 /disk4 /disk5
End result:
# 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
# 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.

# zpool status test
  pool: test
 state: ONLINE
 scrub: scrub completed with 0 errors on Mon Mar 17 15:04:05 2008

        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
test   476M  12.7M   463M     2%  ONLINE  -

# zfs list test
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?
Old 03-19-2008, 03:42 AM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,703

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Indeed, there seem to be no way to enlarge the raidz in site.
The alternative would be to create a new pool with the new devices and migrate the data from the older to the newer. That would require twice more disk slots during the process though.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use larger hard drives? JosephS Linux - Hardware 6 08-16-2007 08:23 AM
ZFS Root / Boot into ZFS from a usb flash drive Kataku Solaris / OpenSolaris 1 07-15-2006 04:13 AM
Adding SATA drives The_JinJ Linux - General 2 01-04-2006 03:38 PM
Adding additional drives/resizing drives in RAID arrays kheldar Linux - Hardware 1 10-19-2005 01:21 PM
adding drives to fstab kurrupt Debian 1 08-09-2004 12:17 AM > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:21 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration