OpenSolaris ZFS Setup

I will have a completed project called OpenSolaris NAS device once I get the testing finished but for now here are some directions for setting up a ZFS file system. I am using VMware fusion for Mac and created the main system and then 4 additional 1GB drives. I set them up at SATA drives which would be like I would have in the final product.

First thing I had to do what install the software and then after I install everything I opened the terminal and begin hacking away. Here are my commands that I ran:

Get the ID for each of the attached drives.
iostat -En
Create a simple mirror of just 2 drives. (drive_id = id from command above)
zpool create your_pool_name mirror drive_id drive_id
SAMPLE of script above
zpool create your_pool_name mirror c4t1d0 c4t2d0
Check your work
zpool list
zpool status
create a folder
zfs create your_pool_name/folder_name
Adding more space to the storage pool
zpool add your_pool_name mirror drive_id drive_id
Checking all of the drives that make up the zfs pool
zpool status -v
Setting reserve limits of space
zfs set reservation=157m your_pool_name/folder
Show any of the reservations on the system
zfs get reservation your_pool_name/folder
Remove a reservation from a folder
zfs set reservation=none your_pool_name/folder
Setting Quotas
zfs set quota=3M your_pool_name/folder
Show Quotas
zfs get quota your_pool_name/folder
Removing the Quote
zfs set quota=none your_pool_name/folder
Changing Permissions (I am sure there is a ZFS one, I used Unix)
chown user:group /your_pool_name
Always check the pool to see if it is already compressed
zfs get compression your_pool_name/folder
Start compression
zfs set compression=on your_pool_name/folder
Turn off compresstion
zfs set compression=off your_pool_name/folder
Look for more articles on ZFS.


Popular posts from this blog

Console over SSH (ONTAP)

Brocade Zone Setup