Monday, August 15, 2011

How to create ZFS storage in FreeBSD 7.4

1. Edit /etc/rc.conf. Add
zfs_enable="YES"

2. Shutdown machine and plug all hard drives.

3. Create storage pool
#   zpool create PoolName raidz ad1 ad2 ad3 ...

4. Create volume
# zfs create PoolName/VolumeName

5. Set mount point
# zfs set mountpoint=/Path/To/Mount/Point PoolName/VolumeName

6. Setup daily check
# echo 'daily_status_zfs_enable="YES"' >> /etc/periodic.conf

7. Setup volume compression
# zfs set compression=gzip PoolName/VolumeName

8. Check ZFS pool status
# zpool status

9. Check ZFS command history
# zpool history

10. Check ZFS mounting point
# zfs get mountpoint

11. Setup volume quota
# zfs set quota=QuotaSize PoolName/VolumeName

12. Show volume setting
# zfs get all PoolName/VolumeName

13. Show ZFS I/O status
# zfs iostat 1

No comments: