LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-18-2008, 05:15 AM   #1
madivad
Member
 
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
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?
 
Old 03-19-2008, 03:42 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 06:36 PM.

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