November 2010

Creating a small zpool for testing

tdh@ultralord:/$ sudo su -
Sun Microsystems Inc.   SunOS 5.11      snv_133 February 2010
You have new mail.
root@ultralord:~# cd /
root@ultralord:/# mkdir ztmp
root@ultralord:/# cd ztmp
root@ultralord:/ztmp# mkfile 100m vdev1
root@ultralord:/ztmp# mkfile 100m vdev2
root@ultralord:/ztmp# zpool create zoo /ztmp/vdev1 /ztmp/vdev2
root@ultralord:/ztmp# zfs list
rpool                   4.84G  10.8G  77.5K  /rpool
rpool/ROOT              3.72G  10.8G    21K  legacy
rpool/ROOT/opensolaris  3.72G  10.8G  3.60G  /
rpool/dump               511M  10.8G   511M  -
rpool/export            89.9M  10.8G    23K  /export
rpool/export/home       89.8M  10.8G    23K  /export/home
rpool/export/home/tdh   89.8M  10.8G  89.8M  /export/home/tdh
rpool/swap               544M  11.2G   144M  -
zoo                     73.5K   159M    21K  /zoo
You have mail in /var/mail/root
root@ultralord:/ztmp# zfs set sharenfs=rw= zoo
root@ultralord:/ztmp# zfs create -o sharenfs=rw= zoo/fs1
root@ultralord:/ztmp# zfs create -o sharenfs=rw= zoo/fs2
root@ultralord:/ztmp# share
-@zoo           /zoo   sec=sys,rw=   ""
-@zoo/fs1       /zoo/fs1   sec=sys,rw=   ""
-@zoo/fs2       /zoo/fs2   sec=sys,rw=   ""
root@ultralord:/ztmp# touch /zoo/file
root@ultralord:/ztmp# ls -la /zoo
total 7
drwxr-xr-x  4 root root  5 2010-11-03 16:51 .
drwxr-xr-x 29 root root 31 2010-11-03 16:50 ..
-rw-r--r--  1 root root  0 2010-11-03 16:51 file
drwxr-xr-x  2 root root  2 2010-11-03 16:51 fs1
drwxr-xr-x  2 root root  2 2010-11-03 16:51 fs2