Escolar Documentos
Profissional Documentos
Cultura Documentos
HOME ALL ARTIC LES SOLARIS 11 LINUX VERITAS VMWARE SHELL SC RIPTS ESX ADVERTISE
Advertise Here
ZFS-Zetta Byte filesystem is introduced on Solaris 10 Release.To develop this filesystem cum volume
manager,Sun Micro-systems had spend lot of years and some billion dollars money. ZFS has many cool
features over traditional volume managers like SVM,LVM,VXVM.
Here is the some of the advantages listed below.
Advantages:
1.Zpool Capacity of 256 zettabytes
2.ZFS snapshots,clones and Sending-receiving snapshots
3.Lightweight filesystem creation
4.Encryption
5.Software RAID
6.Data integrity
7.Integrated Volume management (No need an additional volume manager)
Disadvantages:
1.No way to reduce the zpool capacity
2. Re-silver takes more time in zpool raid.
Here i would like to share some of the basis ZFS commands syntax.I hope it will help you to begin on ZFS
administration.
The first task will be creating of different type of zpools. This is like a diskgroup or volume-
group creation in other volume managers.
To Create a simple zpool.
In this second task we are going to see how to create new dataset under zpool.This is like creating new
volumes in vxvm or LVM.
To create zfs dataset: You can see after creating the volume,automatically dataset is mounted on
/szpool/vol1 and zfs doesn't require any vfstab entry for this.
To set manual mount point: If you want to set specific mount point for zfs dataset,use the below
command
www.unixarena.com/2012/07/zfs-quick-command-reference-with.html 1/8
11/5/13 UnixArena: ZFS quick command reference with examples
bash-3.00# df -h /ora_vol1
Filesystem size used avail capacity Mounted on
szpool/vol1 57M 21K 57M 1% /ora_vol1
To share dataset through NFS: We can share the zfs dataset by modifying the zfs attribute.
To compress dataset ZFS has default compression option.You can enable it using zfs set command.
By doing the above,you can see 20M is reserved for oraarch and this space can't be used by other
dataset. Setting quota to dataset:
pool: rzpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rzpool ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
c1t2d0 ONLINE 0 0 0
c1t1d0 ONLINE 0 0 0
c1t8d0 ONLINE 0 0 0
errors: No known data errors
pool: mzpool
state: ONLINE
www.unixarena.com/2012/07/zfs-quick-command-reference-with.html 2/8
11/5/13 UnixArena: ZFS quick command reference with examples
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
mzpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c1t5d0 ONLINE 0 0 0
c1t6d0 ONLINE 0 0 0
errors: No known data errors
# /usr/sbin/smcwebserver start
# /usr/sbin/smcwebserver enable
sometimes smcwebserver will not able accessed remotly. In this case, please follow the below steps to
enable the remote access.
If you want to create dataset with different mount point,use the following command.
# zpool create -m /export/zfs home c1t0d0
This is the example, zeepool is an existing two-way mirror that is transformed to a three-way
mirror by attaching c2t1d0, the new device, to the existing device, c1t1d0.
# zpool attach zeepool c1t1d0 c2t1d0
# zpool detach zeepool c2t1d0
# zpool status -x
all pools are healthy
www.unixarena.com/2012/07/zfs-quick-command-reference-with.html 3/8
11/5/13 UnixArena: ZFS quick command reference with examples
Replacing Devices
# zpool replace datapool c0t0d0 c0t0d1
In the above example, the previous device, c0t0d0, is replaced by c0t0d1
IOSTAT:
# zpool iostat
capacity operations bandwidth
pool used avail read write read write
---------- ----- ----- ----- ----- ----- -----
datapool 100G 20.0G 1.2M 102K 1.2M 3.45K
dozer 12.3G 67.7G 132K 15.2K 32.1K 1.20K
Exporting a Pool
# zpool export datapool
cannot unmount /export/home/eschrock: Device busy
# zpool export -f datapool
Importing Pools
# zpool import datapool
To delete dataset
# zfs destroy datapool/home/tabriz
To rename dataset
# zfs rename datapool/home/kustarz datapool/home/kustarz_old
The -a option can be used to mount all ZFS managed filesystems. Legacy managed filesystems are not
mounted.
# zfs mount -a
If the sharenfs property is off, then ZFS does not attempt to share or unshare the
filesystem at any time.
This allows the filesystem to be administered through
traditional means such as the /etc/dfs/dfstab file.
A ZFS reservation is an allocation of space from the pool that is guaranteed to be available to a dataset.
# zfs set reservation=5G datapool/home/moore
# zfs get reservation datapool/home/moore
Quotas
# zfs set quota=10G datapool/home/oracle1
# zfs get quota datapool/home/oracle1
www.unixarena.com/2012/07/zfs-quick-command-reference-with.html 4/8
11/5/13 UnixArena: ZFS quick command reference with examples
# zfs backup datapool/web1@111505 > /dev/rmt/0
# zfs restore datapool/test2@today < /dev/rmt/0
# zfs rename datapool/test datapool/test.old
# zfs rename datapool/test2 datapool/test
# zfs rollback datapool/web1@111505
cannot rollback to datapool/web1@111505: more recent snapshots exist
use -r to force deletion of the following snapshots:
datapool/web1@now
# zfs rollback -r datapool/web1@111505
# zfs restore datapool/web1 < /dev/rmt/0
During the incremental restore process, the filesystem is unmounted and cannot be
accessed.
ZFS Clones
# zfs clone pool/ws/gate@yesterday pool/home/ahrens/bug123
The following example creates a cloned work space from the
projects/newproject@today snapshot for a temporary user as
projects/teamA/tempuser and then sets properties on the cloned work space.
# zfs snapshot projects/newproject@today
# zfs clone projects/newproject@today projects/teamA/tempuser
# zfs set sharenfs=on projects/teamA/tempuser
# zfs set quota=5G projects/teamA/tempuser
Destroying a Clone
ZFS clones are destroyed with the zfs destroy command.
# zfs destroy pool/home/ahrens/bug123
Clones must be destroyed before the parent snapshot can be destroyed
Please leave a comment if you have any doubt ,i will get back to you as soon as possible.
www.unixarena.com/2012/07/zfs-quick-command-reference-with.html 5/8
11/5/13 UnixArena: ZFS quick command reference with examples
0 comments 0
Leave a message...
Su b s cri b e Ad d D i s q u s to yo u r s i te
SPONSORS
FOLLOW
UNIXARENA
ON
Advertise Here FACEBOOK
Get RSS
Feed from
FeedBurner
FREE WHITEPAPERS/WEBCASTS
POPULAR POSTS
www.unixarena.com/2012/07/zfs-quick-command-reference-with.html 6/8
11/5/13 UnixArena: ZFS quick command reference with examples
Veritas cluster concepts
BLOG ARCHIVE
2013 (115)
October (9)
September (7)
August (13)
July (24)
June (15)
May (26)
April (8)
March (12)
February (1)
2012 (64)
September (2)
August (7)
July (50)
Solaris 10 installation on
vmware workstation
How to change the Solaris host
name on fly
How to share the windows
folders to vmware guest
How to install vmware tools on
Solaris guest OS
How to create sparse root zone
in Solaris
How to create new CPU
resource pool in Solaris
How to configure password less
authentication usin...
How to check currently using
semaphores in Solaris...
How to create Solaris virtual
machine in vmware wo...
Performance issues -Network
Solaris run levels
VI Editor- Command Reference
Live upgrade patch installation
before OS patching...
Unix File's - hard link and soft
link
How to add new filesystem in
VCS cluster ?
Veritas cluster concepts
How to fix the corrupted VXFS
Filesystem with Syma...
How to use the mirror VXVM
volume for backout reas...
cfg2html on Solaris - OS
configuration Backup
Performance issues-Solaris
Part2-CPU
How to concatenate two tar
files in Solaris
IO Bottleneck - Disk
performance issue
How to enable SAR(System
Activity Reporter) in Sol...
veritas cluster-LLT
configuration & Removing LLT
l...
Demonstration ZFS snapshots
on Solaris
How to cleanup veritas volume
manager device tree ...
VXVM Failures
how to configure Sun X86 Blade
ILOM ?
Sun ILOM T5220, T5240,
x4600, X4450 configure
www.unixarena.com/2012/07/zfs-quick-command-reference-with.html 7/8
11/5/13 UnixArena: ZFS quick command reference with examples
how to boot Solaris local zone
in single user mode...
ZFS quick command reference
with examples
How to add new SWAP in
Solaris 10 on fly
Difference between Crash
dumps and Core dumps - So...
How to take console of SUN
hardware ?
How to recover the OS using
ZFS snapshot
How to recover a destroyed zfs
storage pool
ifconfig:Error:Cannot assign
requested address-sol...
Dtrace-To find high kernal
usage
Solaris OS and veritas patching
procedure with VCS...
RedhatLinux SAN Migration using
LVM
Preventing zone core files on
Global zone -Solaris...
Solaris 10- OS patching using
Live-upgrade
DF command shows incorrect
usage in VXFS
How to plumb new IP in the
zone on fly
UFS to ZFS conversion-Using
Live upgrade
Solaris ZONE + Liveupgrade
compatibility model So...
Oracle server-Virtualization
Technologies
Solaris 10's Resource
Management:Controlling
proce...
Solaris 10's Resource
Management and Shell Limit(u...
lucreate failed due to - Zones
residing on top lev...
June (5)
About UnixArena
UnixArena was built by Lingeswaran R on
June 2012 to help Unix system
administrators by sharing various technical TAGS
articles and tutorials. Get Subscribed to
RSS of UnixArena or Get updates via C ERTIFIC ATIONS ( 3) HOW TO ARTIC LES- LINUX ( 8) INFRA PRODUC TS ( 4)
Email.Free OS related E-Books can be INTERVIEW QUESTIONS ( 10) LIVE UPGRADE ( 6) LVM ( 7) OPENFILER ( 4)
download from Here. Find UnixArena on PERFORMANC E ISSUES ( 6) REDHAT-LINUX ( 21) RESOURC E MANAGEMENT ( 6)
Twitter and Facebook as well.
SOLARIS 10 ( 64) SOLARIS11 ( 13) TRAINING ( 13) TUTORIALS ( 2) VC S ( 14)
Know More>>>
VMWARE ESXI 5 ( 7) VXVM ( 26) ZFS ( 16) ZONES ( 21)
SHARETHIS
Copyright 2012-2013 UnixArena | Privacy Policy | Contact US Theme Designed by designhuntr.Powered by Blogger
www.unixarena.com/2012/07/zfs-quick-command-reference-with.html 8/8