« May 2008
SunMonTueWedThuFriSat
    
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today
XML

Tom Haynes

loghyr.com
excfb.com

Blogs to Gander At

Navigation

Editing

AllMarks

Referers

Today's Page Hits: 422

Powered by Roller Weblogger.

statcounter.com

clustrmaps.com

Locations of visitors to this page

technorati.com

www.alesti.org

Add to Alesti RSS Reader

South Park as I was 10 years ago

South Park Fantasy

South Park today

South Park Reality

I have more hair and it isn't so grey. :->

10 years ago, really

Toon Tom

Today, literally

Tom Today

Site notes

This page validates as XHTML 1.0, and will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device. It was created using techniques detailed at glish.com/css/.

« [Open]Solaris and... | Main | Spring06: Game 2... »
20060329 Wednesday March 29, 2006
Getting a specific property from all ZFS filesystems

I wanted to see what all of the ZFS filesystems thought they had set for the property of sharenfs. I could do it on a piece-by-piece basis:

[tdh@wont ~coach]> zfs get sharenfs zoo/home/coach
NAME             PROPERTY       VALUE                      SOURCE
zoo/home/coach   sharenfs       rw,anon=0                  inherited from zoo/home

Or I could get all of the properties from one filesystem:

[tdh@wont ~]> zfs get all zoo/home/tdh
NAME             PROPERTY       VALUE                      SOURCE
zoo/home/tdh     type           filesystem                 -
zoo/home/tdh     creation       Mon Mar 20 23:12 2006      -
zoo/home/tdh     used           15.8M                      -
zoo/home/tdh     available      9.98G                      -
zoo/home/tdh     referenced     15.8M                      -
zoo/home/tdh     compressratio  1.36x                      -
zoo/home/tdh     mounted        yes                        -
zoo/home/tdh     quota          none                       default
zoo/home/tdh     reservation    none                       default
zoo/home/tdh     recordsize     128K                       default
zoo/home/tdh     mountpoint     /export/zfs/tdh            inherited from zoo/home
zoo/home/tdh     sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/tdh     checksum       on                         default
zoo/home/tdh     compression    on                         inherited from zoo/home
zoo/home/tdh     atime          on                         default
zoo/home/tdh     devices        on                         default
zoo/home/tdh     exec           on                         default
zoo/home/tdh     setuid         on                         default
zoo/home/tdh     readonly       off                        default
zoo/home/tdh     zoned          off                        default
zoo/home/tdh     snapdir        visible                    default
zoo/home/tdh     aclmode        groupmask                  default
zoo/home/tdh     aclinherit     secure                     default

But I couldn't figure out how to say either:

So I decided to use the scripting features in 'zfs list' to do the same thing:

[tdh@wont ~coach]> zfs list -H -o name -t filesystem | xargs zfs get sharenfs
NAME             PROPERTY       VALUE                      SOURCE
zoo              sharenfs       off                        default
zoo/home         sharenfs       rw,anon=0                  local
zoo/home/coach   sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/haynest  sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/kanigix  sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/loghyr  sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/mrx     sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/nfsv2   sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/nfsv3   sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/nfsv4   sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/spud    sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/tdh     sharenfs       rw,anon=0                  inherited from zoo/home
zoo/home/thomas  sharenfs       rw,anon=0                  inherited from zoo/home
zoo/isos         sharenfs       off                        default
zoo/x86          sharenfs       off                        default

The power here is the extensibility built on top of the Unix paradigm of small programs linked with pipes. With a lot of other OSes (and some built on top of Unix implementations) this would be a PVR or RFE to the engineering department. $$$ for the company, but an irate customer base.

Of course I think I'm pretty hot, until eshrock points out:

# zfs list -o name,sharenfs
NAME                  SHARENFS
zoo                   off
zoo/home              rw,anon=0
zoo/home/coach        rw,anon=0
zoo/home/haynest      rw,anon=0
zoo/home/kanigix      rw,anon=0
zoo/home/loghyr       rw,anon=0
zoo/home/mrx          rw,anon=0
zoo/home/nfsv2        rw,anon=0
zoo/home/nfsv3        rw,anon=0
zoo/home/nfsv4        rw,anon=0
zoo/home/nfsv4@monday  -
zoo/home/spud         rw,anon=0
zoo/home/tdh          rw,anon=0
zoo/home/thomas       rw,anon=0
zoo/isos              off
zoo/x86               off

Technorati Tags:
Orginally posted on Kool Aid Served Daily
Copyright (C) 2006, Kool Aid Served Daily

Trackback URL: http://blogs.sun.com/tdh/entry/getting_a_specific_property_from
Comments:

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed
Copyright (C) 2007, Kool Aid Served Daily