Quantcast
Viewing all articles
Browse latest Browse all 92

Solaris 11 ZFS Administration

This concise post aims to cover the basics of ZFS administration on Solaris.  Excuse the brevity, it is for reference rather than a detailed explanation.

ZFS Pools

zpool list && zpool status rpool

Image may be NSFW.
Clik here to view.

In a lab environment, files can replace actual physical disks

cd /dev/dsk && mkfile 200m disk {0..9}

Create a ZPool and Expand a ZPool

zpool create labpool raidz disk0 disk1 disk2 && zpool list && zpool list labpool

zpool add labpool raidz disk4 disk5 disk6 && zpool list && zfs list labpool

Image may be NSFW.
Clik here to view.

ZFS Compression

zfs create labpool/zman && zfs set compression=gzip labpool/zman

Image may be NSFW.
Clik here to view.

You can copy files to this zfs filesystem that has gzip compression enabled and save nearly half your disk space.

ZFS Deduplication

zfs create -o dedup=on -o compression=gzip labpool/archive

zfs create labpool/archive/a  (b, c d)

Image may be NSFW.
Clik here to view.

By copying multiple instances of the same file into /labpool/archive/a, b, c and d whereby the /labpool/archive filesystem has deduplication turned on, you’ll see that zpool list labpool will increment the value in the DEDUP column to reflect the deduplication ratio as more and more similar files are added.

Image may be NSFW.
Clik here to view.

Note also that compression is enabled at the zfs file system level but copying an already gzipped file will not result in further gains – the value returned by zfs get compressratio labpool/archive stays at 1.00x.

ZFS Snapshots

zfs snapshot -r labpool/archive@snap1 && zfs list -r -t all labpool

zfs rollback labpool/archive/a@snap1

Image may be NSFW.
Clik here to view.

Snapshots can be created that copy-on-write (or any other kind of IO) such that changes made can be rolled back.   As a result, snapshots don’t take up a lot of space, unless left in place for filesystems with high IO of course.

ZFS Clones

zfs clone labpool/archive/a@snap1 labpool/a_work

zfs list -r -t all labpool

Image may be NSFW.
Clik here to view.

zfs list -r -t all labpool will show all the zfs filesystems including snapshots and clones.  Changes can be made to the clone filesystem without affecting the original.

Image may be NSFW.
Clik here to view.
Facebook
Image may be NSFW.
Clik here to view.
twitter
Image may be NSFW.
Clik here to view.
google_plus
Image may be NSFW.
Clik here to view.
reddit
Image may be NSFW.
Clik here to view.
pinterest
Image may be NSFW.
Clik here to view.
linkedin
Image may be NSFW.
Clik here to view.
mail

The post Solaris 11 ZFS Administration appeared first on Cyberfella Ltd.


Viewing all articles
Browse latest Browse all 92

Trending Articles