iSCSIでマウントしな領域にzpoolを切ったメモ
自分向けメモ。
root@owncloud:/etc # iscsictl -L Target name Target portal State iqn.2014-04.ReadyNAS:owncloud 192.168.xx.xx Connected: da1 root@owncloud:/etc # zpool create -n octank /dev/da1 would create 'octank' with the following layout: octank da1 root@owncloud:/etc # zpool create octank /dev/da1 root@owncloud:/etc # zpool list -v NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT octank 99.5G 63.5K 99.5G 0% - 0% 1.00x ONLINE - da1 99.5G 63.5K 99.5G 0% - zroot 37.8G 36.6G 1.18G 59% - 96% 1.00x ONLINE - gpt/zfs0 37.8G 36.6G 1.18G 59% - root@owncloud:/etc # df Filesystem 1K-blocks Used Avail Capacity Mounted on zroot/ROOT/default 2460512 2459816 696 100% / devfs 1 1 0 100% /dev zroot/tmp 33937476 33936780 696 100% /tmp zroot/usr/home 137180 136484 696 99% /usr/home zroot/usr/ports 1273944 1273248 696 100% /usr/ports zroot/usr/src 524732 524036 696 100% /usr/src zroot/var/crash 792 96 696 12% /var/crash zroot/var/log 2148 1452 696 68% /var/log zroot/var/mail 4472 3776 696 84% /var/mail zroot/var/tmp 3276 2580 696 79% /var/tmp octank 101072860 19 101072841 0% /octank root@owncloud:/etc # zfs set mountpoint=none octank root@owncloud:/etc # df Filesystem 1K-blocks Used Avail Capacity Mounted on zroot/ROOT/default 2460500 2459816 684 100% / devfs 1 1 0 100% /dev zroot/tmp 33937464 33936780 684 100% /tmp zroot/usr/home 137168 136484 684 100% /usr/home zroot/usr/ports 1273932 1273248 684 100% /usr/ports zroot/usr/src 524720 524036 684 100% /usr/src zroot/var/crash 780 96 684 12% /var/crash zroot/var/log 2136 1452 684 68% /var/log zroot/var/mail 4460 3776 684 85% /var/mail zroot/var/tmp 3264 2580 684 79% /var/tmp root@owncloud:/etc # zfs list NAME USED AVAIL REFER MOUNTPOINT octank 73K 96.4G 19K none zroot 36.6G 684K 96K none zroot/ROOT 2.35G 684K 96K none zroot/ROOT/default 2.35G 684K 2.35G / zroot/tmp 32.4G 684K 32.4G /tmp zroot/usr 1.84G 684K 96K /usr zroot/usr/home 133M 684K 133M /usr/home zroot/usr/ports 1.21G 684K 1.21G /usr/ports zroot/usr/src 512M 684K 512M /usr/src zroot/var 7.81M 684K 96K /var zroot/var/crash 96K 684K 96K /var/crash zroot/var/log 1.42M 684K 1.42M /var/log zroot/var/mail 3.69M 684K 3.69M /var/mail zroot/var/tmp 2.52M 684K 2.52M /var/tmp root@owncloud:/etc # zpool status octank pool: octank state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM octank ONLINE 0 0 0 da1 ONLINE 0 0 0 errors: No known data errors root@owncloud:/etc # zfs create -o mountpoint=/usr/local/www/owncloud/data octank/data root@owncloud:/etc # df | grep octank octank/data 101072808 19 101072789 0% /usr/local/www/owncloud/data root@owncloud:/etc # zfs set atime=off octank/data root@owncloud:/etc # zfs get atime NAME PROPERTY VALUE SOURCE octank atime on default octank/data atime off local zroot atime off local zroot/ROOT atime off inherited from zroot zroot/ROOT/default atime off inherited from zroot zroot/tmp atime off inherited from zroot zroot/usr atime off inherited from zroot zroot/usr/home atime off inherited from zroot zroot/usr/ports atime off inherited from zroot zroot/usr/src atime off inherited from zroot zroot/var atime off inherited from zroot zroot/var/crash atime off inherited from zroot zroot/var/log atime off inherited from zroot zroot/var/mail atime on local zroot/var/tmp atime off inherited from zroot
atime属性は最終参照時刻の記録オプションのため、offにすることでパフォーマンスが向上する。