As you no doubt know, raidz is one of the supremely cool parts of OpenSolaris. Unfortunately when I was setting it up I could not find any really clear instructions on how to configure it. Below are the steps I ended up using to get it working.
First, you need to know what disks are available to you for the raid, you can find them with:
formatThis will give an output that looks like this:
Searching for disks...done
AVAILABLE DISK SELECTIONS:<br/>
0. c7t0d0 <Adaptec-3805-V1.0-698.54GB><br/>
/pci@0,0/pci8086,2845@1c,3/pci8086,370@0/pci9005,2bc@e/disk@0,0<br/>
1. c7t1d0 <Adaptec-3805-V1.0-1.36TB><br/>
/pci@0,0/pci8086,2845@1c,3/pci8086,370@0/pci9005,2bc@e/disk@1,0<br/>
2. c9d0 <WDC WD20- WD-WCAVY085017-0001-1.82TB><br/>
/pci@0,0/pci-ide@1f,2/ide@0/cmdk@0,0<br/>To escape that, just press ctrl+c
Now we can create the RAIDZ with that information:
zpool create -f backup raidz1 c7t1d0 c9d0 c7t0d0Working through that, this is what the switches mean:
- -f: Force, in this case I dont care about errors, just make the pool. If you are unsure about overwriting a disk, just omit this switch
- backup:This is the name of the storage pool I want to make
- raidz1: I want to create a raidz level 1 (what the levels mean are outlined at the bottom of this)
- c7t1d0 c9d0 c7t0d0:Selecting the disks that I want to use
Now we can view the result of the above command with:
zpool statusYou should now see your new raidz pool "backup" in the list.
NAME SIZE USED AVAIL CAP HEALTH ALTROOT<br/>
backup 3.41T 223K 3.41T 0% ONLINE -<br/>
rpool 1.81T 4.22G 1.81T 0% ONLINE -<br/>If you want to know how the individual members are doing you can run:
zpool status<br/>
pool: backup<br/>
state: ONLINE<br/>
scrub: none requested<br/>
config:<br/>
<br/>
NAME STATE READ WRITE CKSUM<br/>
backup ONLINE 0 0 0<br/>
raidz1 ONLINE 0 0 0<br/>
c7t1d0 ONLINE 0 0 0<br/>
c9d0 ONLINE 0 0 0<br/>
c7t0d0 ONLINE 0 0 0<br/>That looks like all of our disks are now online, now if you want, you can try adding some options to your new pool.
Add ISCSI
zfs create -V 100G backup/lun1<br/>
pfexec pkg install pkg:/SUNWiscsitgt<br/>
zfs set shareiscsi=on backup/lun1<br/>
iscsitadm list target<br/>Change lun1 size (Expand volume)
zfs set volsize=200G backup/lun1Samba (CIFS) share
zfs set sharesmb=on backup/lun1Links
Here are some great links that helped me
- http://www.solarisinternals.com/wiki/index.php/ZFS_Configuration_Guide
- http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide#ZFS_Administration_Considerations
- http://southbrain.com/south/2009/08/zfs-shares-part-ii-iscsi-nfs-a.html