Monday, November 30, 2009

Just a quick note about mounting ZFS resource in a non-global zone...

This is in response to a question that was posted in the SUN Solaris Experts group on LinkedIn:

I keep running into people who think that you have to reboot a non-global zone to add a ZFS mountpoint. Not true.

After you add the zfs resource to your zone.xml (use zonecfg, if you follow recomendation, heh) you perform the following on the Global Zone (not within the non-global zone). Be sure to define the type as "legacy":

root@global-zone# mount -F zfs your_zpool/your_filesystem_name /zones/non_global_zonename/root/your_mountpoint

Log into your zone and you should now see the new filesystem (DF or whatever).

Wednesday, November 18, 2009

Gzip with ZFS pools and Datasets..Mmmm. Tasty!

In case you weren't aware, Gzip compression is now available (has been, for a bit now) with ZFS Datasets in Solaris 10. Yay!

To set:

Identify the existing pool/dataset you want to enable the compression on:
root@Yourbox-> zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
adminpool 980G 81K 980G 0% ONLINE -
rpool 29.8G 20.7G 9.09G 69% ONLINE -

root@Yourbox-> zpool status adminpool
pool: adminpool
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
adminpool ONLINE 0 0 0
c1t1d0 ONLINE 0 0 0
c1t2d0 ONLINE 0 0 0
c1t3d0 ONLINE 0 0 0
c1t4d0 ONLINE 0 0 0

errors: No known data errors

root@Yourbox-> zfs get compression adminpool
NAME PROPERTY VALUE SOURCE
adminpool compression on local

Turn on or change compression algorithm:
root@Yourbox-> zfs set compression=gzip-9 adminpool

Check if set:
root@Yourbox-> zfs get compression adminpool
NAME PROPERTY VALUE SOURCE
adminpool compression gzip-9 local

You can also set at dataset creation time (See example, further below).



You can also choose the level of Gzip compression (1-9). Default is level 6, basically, where 1 is fastest and 9 is most compressed.

You don't have to set the whole pool and rely on inheritance (datasets under the pool) for subsequent datasets, adn the pool's level can differ from the child dataset: You can specify for each dataset, under the pool, specifically. This is useful where you may have several datasets maintained under the same pool, and one may need more compression, whereas another may need better performance.


root@Yourbox-> zfs create -o compression=gzip adminpool/yourdata

root@Yourbox-> zfs get compression adminpool/yourdata
NAME PROPERTY VALUE SOURCE
adminpool/yourdata compression gzip local

root@Yourbox-> zfs get compression adminpool
NAME PROPERTY VALUE SOURCE
adminpool compression gzip-9 local


Compression in ZFS improves I/O.

There are a ton of articles and comparisons out there now, so just google for it.

One thing to note is that the default lzjb may be better suited for run-time apps, whereas Gzip may be better suited for archival. There's some debate on this, out there. Try it out and you can make the determination, for yourself, after some testing.

Have fun!

Tuesday, November 17, 2009

Puppy dog tales...

So last Friday, the GF brought home a stray she found. She (The dog) was wondering around a busy parking lot, at Hobby Lobby.

I am a HUGE animal lover, especially when it comes to dogs, but we already have a large-breed (Rhodesian Ridgeback) spoiled-rotten-and-much-loved furry son and taking on another dog, another large-breed (she's def has Lab in her), at that, doesn't make for a happy Wrex.

So, I am trying to give her away to a good home. It's hard. I totally understand why she rescued the dog and I am actually happy that the dog is safe. I just don't want to get sucked-in, into wanting to keep her. She's so damn cute and adorable!

I've got to get rid of her soon, else I won't be able to part with her, lol.

Alright, don't take my man-card away. Just look at her and see what I mean.

Monday, November 02, 2009

ZFS Deduplication Is In!

If you've been waiting (as I have) for Dedup capability in ZFS, then the wait is close to over. See Jeff Bonwick's blog: http://blogs.sun.com/bonwick/en_US/entry/zfs_dedup

I can't wait to test it, as soon as I can find out how to get my hands on it, lol. It's not in Sol10 update 8, nor is it in the most recent snapshot of OpenSolaris, but I suspect it will be out soon.

Edit:

Seems my rss feed is slow. It's currently in OpenSolaris, as of last night!
http://mail.opensolaris.org/pipermail/onnv-notify/2009-November/010683.html