Tuesday Nov 03, 2009

One of the coolest features in Solaris in my opinion is the "zoned" property of the ZFS. 

What does it do?

ZFS datasets can be exported to non-global zones using the "add dataset" property in zonecfg command. Now the user in the non-global zone may set setuid/symbolic links which are o.k. inside the non-global zone but not acceptable in global zone.  So zfs sets the "zoned" property automatically once the dataset is delegated to the non-global zone.   It doesn't get cleared automatically once you remove the delegation.  It has to be manually removed. If the property is not set off, sharing and other operations don't succeed on the global zone!

bash-3.00# zonecfg -z sparse-zone
zonecfg:sparse-zone> add dataset
zonecfg:sparse-zone:dataset> set name=test/testfs
zonecfg:sparse-zone:dataset> end
zonecfg:sparse-zone> exit
bash-3.00# zoneadm -z sparse-zone reboot
bash-3.00# zlogin sparse-zone
[Connected to zone 'sparse-zone' pts/1]
Last login: Tue Nov  3 00:09:04 on pts/1
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
# bash
bash-3.00# zfs list
NAME          USED  AVAIL  REFER  MOUNTPOINT
test          122K  19.6G    23K  /test
test/testfs    22K  19.6G    22K  /global/test
bash-3.00# exit
exit
# exit

[Connection to zone 'sparse-zone' pts/1 closed]
bash-3.00# zonecfg -z sparse-zone
zonecfg:sparse-zone> remove dataset
zonecfg:sparse-zone> exit
bash-3.00# zoneadm -z sparse-zone reboot
bash-3.00# zlogin sparse-zone
[Connected to zone 'sparse-zone' pts/1]
Last login: Tue Nov  3 01:58:01 on pts/1
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
# bash
bash-3.00# zfs list
no datasets available
bash-3.00# exit
# ^D
[Connection to zone 'sparse-zone' pts/1 closed]
bash-3.00# zfs sharenfs=on test/testfs
cannot set property for 'test/testfs': 'sharenfs' cannot be set on dataset in a non-global zone
bash-3.00# zfs set zoned=off test/testfs
bash-3.00# zfs sharenfs=on test/testfs
bash-3.00# dfshares
RESOURCE                                  SERVER ACCESS    TRANSPORT
   xxxxx:/global/test                  xxxxx  -         -

Really 8-)

Thursday Aug 06, 2009

One of the common issues I face is having many pools with the same name. This happens many times I reinstall the OS for a new build of Sun Cluster software is out to test.  I use standard naming conventions and hence when I create a new pool without checking if there is already one with the same name, then I get an error on import:

bash-3.00# zpool import app
cannot import 'app': more than one matching pool
import by numeric ID instead

So how to find out which pools are available?  There are 2 way.  You can either use the ZFS manager GUI if you aren't too comfortable using the CLI or you can execute zpool import command which will list all the potential pools that can be imported:

bash-3.00# zpool import
  pool: app
    id: 17303573419851088164
 state: ONLINE
status: The pool was last accessed by another system.
action: The pool can be imported using its name or numeric identifier and
    the '-f' flag.
   see: http://www.sun.com/msg/ZFS-8000-EY
config:

    app         ONLINE
      raidz1    ONLINE
        c2t1d3  ONLINE
        c2t1d2  ONLINE

  pool: app
    id: 13179891989473835286
 state: ONLINE
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
    some features will not be available without an explicit 'zpool upgrade'.
config:

    app         ONLINE
      c2t1d1    ONLINE

  pool: mysql
    id: 6396206132307901430
 state: ONLINE
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
    some features will not be available without an explicit 'zpool upgrade'.
config:

    mysql       ONLINE
      c2t1d0    ONLINE

  pool: post
    id: 11620670201616239827
 state: ONLINE
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
    some features will not be available without an explicit 'zpool upgrade'.
config:

    post        ONLINE
      c2t0d2    ONLINE

Now that I know the pools and their IDs,

bash-3.00# zpool import 13179891989473835286
bash-3.00# zpool destroy app

Voila!

Monday Sep 29, 2008

The title says it all!  Hopefully, that would result in fewer delays!

FAA upgrades its Air Traffic Systems to ZFS and Open Storage.

Wednesday Sep 17, 2008

A startup called greenBytes has come up with an enhancement that would enable ZFS to save more power on SunÅ› x4540 line.  You can find more details at http://storage.blogs.techtarget.com/2008/09/15/suns-thumper-finds-a-new-green-friend/.

This news validates the Open Source approach Sun has taken to storage.  I bet more such startups will emerge driving down the cost of storage similar to the way x86 servers brought down the price of servers. 

Thursday Mar 20, 2008

Some important patches for ZFS on Solaris has been released.  The patch ids are 127729-07 (x86) and 127728-06 (SPARC).  

The list of the bugs are:

Problem Description: 
6355623 zfs rename to valid dataset name, but if snapshot name becomes too long, panics system
6393769 client panic with mutex_enter: bad mutex, at get_lock_list
6513209 destroying pools under stress causes hang in arc_flush
6523336 panic dr->dt.dl.dr_override_state == DR_NOT_OVERRIDDEN,
file: ../../ common/fs/zfs/dbuf.c line: 2195
6533813 recursive snapshotting resulted in bad stack overflow
6535160 lock contention on zl_lock from zil_commit
6544140 assertion failed: err == 0 (0x11 == 0x0), file: ../../common/fs/zfs/zfs_znode.c, line: 555
6549634 dn_dbfs_mtx should be held when calling list_link_active() in dbuf_destroy()
6557767 assertion failed: error == 17 || lr->lr_length <= zp->z_blksz
6565044 small race condition between zfs_umount() and ZFS_ENTER()
6565574 zvol read perf problem
6569719 panic dangling dbufs (dn=ffffffff28814d30, dbuf=ffffffff20756008)
6573361 panic turnstile_block, unowned mutex
6577156 zfs_putapage discards pages too easily
6581978 assertion failed: koff <= filesz, file: ../../common/fs/zfs/zfs_vnops.c, line: 2834
6585265 need bonus resize interface
6586422 deadlock occurs when nfsv4 recover thread calls nfs4_start_fop
6587723 BAD TRAP: type=e (#pf Page fault) occurred in module "zfs" due to NULL pointer dereference
6589799 dangling dbuf after zinject
6594025 panic: dangling dbufs during shutdown
6596239 stop issuing IOs to vdev that is going to be removed
6617844 seems bug 4901380 has not been fixed in Solaris 10
6618868 ASSERT: di->dr_txg == tx->tx_txg (0x148 == 0x147), dbuf.c, line 1088
6620864 BAD TRAP panic in vn_invalid() called through znode_pageout_func()
6637030 kernel heap corruption detected during stress


 

This blog copyright 2009 by maddy