You must have zpool (ZFS pool) before you work with ZFS file system. When you create zpool, you also automatically create ZFS file system. Below is tips to about ZFS filesystem.
- See ZFS file system on your host.bash-3.00# zfs listNAME USED AVAIL REFER MOUNTPOINTmirrpool 106K 976M 18K /mirrpool
- Create a new filesystem under /mirrpool. In this example you create a new file system named fs1.bash-3.00# zfs create mirrpool/fs1bash-3.00# zfs listNAME USED AVAIL REFER MOUNTPOINTmirrpool 130K 976M 18K /mirrpoolmirrpool/fs1 18K 976M 18K /mirrpool/fs1
- See that your new file system is mounted.bash-3.00# mount.../mirrpool on mirrpool read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d50004 on Tue Nov 2 11:41:14 2010/mirrpool/fs1 on mirrpool/fs1 read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d50005 on Tue Nov 2 11:54:00 2010
- Try to create a new file on there. See you do not need to use newfs command as previous UFS.bash-3.00# touch /mirrpool/fs1/data1bash-3.00# ls -al /mirrpool/fs1/total 7drwxr-xr-x 2 root root 3 Nov 2 11:54 .drwxr-xr-x 3 root root 3 Nov 2 11:54 ..-rw-r--r-- 1 root root 0 Nov 2 11:54 data1
- See all properties of new file system.bash-3.00# zfs get all mirrpool/fs1NAME PROPERTY VALUE SOURCEmirrpool/fs1 type filesystem -mirrpool/fs1 creation Tue Nov 2 11:54 2010 -mirrpool/fs1 used 18K -mirrpool/fs1 available 976M -mirrpool/fs1 referenced 18K -mirrpool/fs1 compressratio 1.00x -mirrpool/fs1 mounted yes -mirrpool/fs1 quota none defaultmirrpool/fs1 reservation none defaultmirrpool/fs1 recordsize 128K defaultmirrpool/fs1 mountpoint /mirrpool/fs1 defaultmirrpool/fs1 sharenfs off defaultmirrpool/fs1 checksum on defaultmirrpool/fs1 compression off defaultmirrpool/fs1 atime on defaultmirrpool/fs1 devices on defaultmirrpool/fs1 exec on defaultmirrpool/fs1 setuid on defaultmirrpool/fs1 readonly off defaultmirrpool/fs1 zoned off defaultmirrpool/fs1 snapdir hidden defaultmirrpool/fs1 aclmode groupmask defaultmirrpool/fs1 aclinherit restricted defaultmirrpool/fs1 canmount on defaultmirrpool/fs1 shareiscsi off defaultmirrpool/fs1 xattr on defaultmirrpool/fs1 copies 1 defaultmirrpool/fs1 version 3 -mirrpool/fs1 utf8only off -mirrpool/fs1 normalization none -mirrpool/fs1 casesensitivity sensitive -mirrpool/fs1 vscan off defaultmirrpool/fs1 nbmand off defaultmirrpool/fs1 sharesmb off defaultmirrpool/fs1 refquota none defaultmirrpool/fs1 refreservation none default
No comments:
Post a Comment