Oracle Solaris ZFS is the default root file system on Oracle Solaris 11. ZFS filesystem has integrated volume management, preserves the highest levels of data integrity and includes a wide variety of data services such as data deduplication, RAID and data encryption. Please find below quick tips to manage zfs filesystem in oracle solaris 11.
Create a ZFS pool with a single disk:
# zpool create testpool c3t2d0
Create a ZFS pool with 3 disks in RAID0 configuration:
# zpool create testpool c3t2d0 c3t3d0 c3t4d0
Create a ZFS pool with 3 disks in RAID1 configuration:
# zpool create testpool mirror c3t2d0 c3t3d0 c3t4d0
Create a ZFS pool with 3 disks in a RAIDZ configuration (single parity):
# zpool create testpool raidz c2t2d0 c3t3d0 c3t4d0
Create a ZFS pool with 1 disk and 1 disk as seperate ZIL (ZFS Intent Log):
# zpool create testpool c3t2d0 log c3t3d0
Create a ZFS pool with 1 disk and 1 disk as L2ARC (Level 2 storage cache):
# zpool create testpool c3t2d0 cache c3t3d0
Share a filesystem via NFS:
# zfs create zpool/fs1
# zfs set share=name=fs1,path=/rpool/fs1,prot=nfs rpool/fs1
# zfs set sharenfs=on rpool/fs1
Share a filesystem via CIFS:
# pkg install service/filesystem/smb
# svcadm enable -r smb/server
# echo “other password required pam_smb_passwd.so.1 nowarn” >> /etc/pam.conf
# smbadm enable-user theitblogg
# zfs set share=name=sh1,path=/rpool/fs1,prot=smb rpool/fs1
# zfs set sharesmb=on rpool/fs1
Use shadow migration:
# pkg install shadow-migration
# svcadm enable shadowd
# zfs set readonly=on path/to/data # zfs create -o shadow=file:///path/to/data/target/new/path/to/data
If you find this post is useful/helpful, please follow, like and share. Thank you for visiting my blog!!!
Leave a Reply