Tuesday, April 15, 2014

ZFS in Solaris 10

Features:
•    256 quadrillion zettabytes
•    RAID 0/1 & RAID Z (RAID 5 with enhancements) (2 required virtual devices)
•    Snapshots – read-only copies of file systems or volumes
•    Creates volumes
•    Uses storage pools to manage storage – aggregates virtual devices
•    File systems attached to pools grow dynamically as storage is added
•    File systems may span multiple physical disks
•    ZFS is transactional
•    Pools & file systems are auto-mounted. No need to maintain /etc/vfstab
•    Supports file system hierarchies: /pool1/{home(5GB),var(10GB),etc.}
•    Supports reservation of storage: /pool1/{home(10GB),var}
•    Provides a secure web-based management tool
•    Requires devices of min size 128mb
•    Web GUI - https://localhost:6789/zfs - served by smcwebserver




### Storage Pool ###

Commands:

1. To list the known pools :
# zpool list

2. To create a pool using a disk :
# zpool create pool1 c0t1d0s2

3. To  add a disk to an existing pool :
# zpool add pool1 /dev/dsk/c1t2d2

4. To list pools and the associated mount points :
# zfs mount 

5. To show the virtual devices that constitues all the pools :
# zpool status

6. To show the virtual devices associated with pool1 :
# zpool status –v pool1

7.To destroy a pool and its associated file systems :
# zpool destroy pool1

8. To change the mount point of a pool :

# zfs set mountpoint=/firstpool pool1



### File System ###

Commands :
 
1. To create ‘home’ file system in pool1 :
# zfs create pool1/home         

2. To set 10G quota to pool1/home :
# zfs set quota=10G pool1/home       

3. To create a file system under pool1/home :
# zfs create pool1/home/unixcbt       

4. To list quota related values for pool1 and its file systems :
# zfs get –r quota pool1           

5.  To list compression property for file systems associated with pool1 :
# zfs get –r compression pool1       

6. To rename a file system :
# zfs rename pool1/home1 pool1/home2



### ZFS Redundany/Replication ###

1.    Mirroring – RAID-1
2.    RAID-Z    - RAID-5

Note: Redundancy/Replication is associated with the pool

Commands :

1. To create a mirror pool :
# zpool create pool1 mirror c0t1d0 c0t2d0    Creates a mirror pool

2. To create a RAID-Z pool :

# zpool create pool2 raidz c0t1d0 c0t2d



### ZFS Snapshots ###

1.    Read only copies of volumes or file systems
2.    Use no additional space, initially

Commands :

1. To list the available snapshots :
# zfs list –t snapshot     

2. To create a snapshot for pool1/home :
# zfs snapshot pool1/home@homesnap1   

3.To destroy a snapshot :
# zfs destroy pool1/home@homesnap1  

4. To rename homesnap2 to homesnap3 :
# zfs rename pool1/home@homesnap2 pool1/home@homesnap3

5.  To rollback a file system using a snapshot :
# zfs rollback –f pool1/home@homesnap3   


### ZFS Clone ###

1.    Writable file systems or volumes
2.    Linked to a snapshot
3.    Clone can be stored anywhere in ZFS hierarchy

Commands :

1. Creates a clone file system using a snapshot :
# zfs clone pool1/home@homesnap3 pool2/home 

No comments:

Post a Comment