Saturday, January 31, 2009

Solaris ZFS CBT Notes

###Zettabyte File Sysstem (ZFS)###

Key Features:

1. 256 quadrillion zettabytes (terabytese - petabytes - exabytes - zettabytes (1024 exabytes)
2. RAID-0/1 & RAID-Z (RAID-5 with enhancements) (2- required virtual devices)
3. Snapshots (point in time backup) - read-only copies of file systems or volumes.
4. Creates volumes
5. Uses storage pools to manage storage - aggregates virtual devices
6. File systems attached to pools groe dynamically as storage is added.
7. File systems may span multiple physical disks
8. ZFS is transactional
9. Pools & file systems are auto-mounted. No need to maintain /etc/vfstab.
10. Supports file system hierarchies: /pool1/{home(5GB),var(10GB),etc.}
11. Supports reservation of storage: /pool1/{home(10GB),var}
12. Provides a secure web-based management tool - https://localhost:6789/zfs


###ZFS - CLI###
zpool list - lists know pools
zpool create pool_name(alphanumeric,_,-,;,.)

Pool Name Restraints(DO NNOT USE THESE NAMES FOR YOUR POOL NAMES):
1. mirror
2. raidz

zpool create pool_name device_name1, device_name2, device_name3, etc.
zpool create pool1 c0t1d0

or

zpool create pool1 /dev/dsk/c0t1d0

ZFS Pool Statuses:
1. ONLINE
2. DEGRADED
3. FAULTED - device inaccessible
4. OFFLINE
5. UNAVAILABLE

zfs list - returns ZFS dataset info.
zfs mount - returns pools and mount points
zpool status - returns virtual devices that constitute pools
zpool status -v pool_name - to see specific pool

Note: ZFS requires a minimum of 128MB virtual device to create pool.

zpool destroy pool1 - Destroys pool and associated file systems


###Create file systems within pool1###
zfs create pool1/home - creates files system named 'home' in pool1

Note: Defaulr action of 'zfs create pool1/home' assigns all storage available to 'pool1', to 'pool1/home'

###Set quota on existing file system##
zfs set quota=10G pool1/home

###Create user-based file system beneath pool1/home###
zfs create pool1/home/unixcbt

Note: ZFS inherits properties from immediate ancestor

zfs get -r compression pool1 - return compressiong property for file system associated with 'pool1'


###Rename File System###
zfs rename pool1/home/unixcbt pool1/home/unixcbt2


###Extending dynamically, pool storage###
zpool add pool1 c0t2d0

###ZFS Redundancy/Replication###
1. Mirroring - RAID-1
2. RAID-5 - RAID-Z


Virtual Devices:
1. c0t1d0 - 36GB
2. c0t2d0 - 36GB

Note: Redundancy/Replicationis associated directly with the pool.

zpool create -f poolmirror1 mirror c0t1d0 c0t2d0
zpool create -f poolmirror1 raidz c0t1d0 c0t2d0


###ZFS Snapshots###

Features:

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

zfs list -t snapshot - returns available snapshots

zfs snapshot poolraidz1/home@homesnap1
zfs destroy poolraidz1/home@homesnap1
zfs rename poolraidz1/home@homesnap3 poolraidz1/home@homesnapnewname
zfs rollback -f poolraidz1/home@homesnapnewname

###ZFS Clones###
Feature:

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

zfs clone poolraidz1/home@homenewsnap poolraidz1/home/homeclone1



























Readers who read this page, also read:




Bookmark and Share My Zimbio http://www.wikio.com

0 comments: