ZFS¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤òNFS¤Ç¶¦Í¤¹¤ë
ZFS¤Ç¤Ïsharenfs¥×¥í¥Ñ¥Æ¥£¡¼¤ò»È¤Ã¤Æ¼«Æ°Åª¤Ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¶¦Í¤Ç¤¤Þ¤¹¡£
¤³¤ÎÊýË¡¤Ç¶¦Í¤·¤Æ¤ª¤±¤Ð¿·µ¬¤Ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤òÄɲ乤ë¤È¤¤Ç¤â/etc/dfs/dfstab¥Õ¥¡¥¤¥ë¤òÊѹ¹¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£
°Ê²¼¤Ç¡¢ZFS¥¹¥È¥ì¡¼¥¸¥×¡¼¥ë¤òºîÀ®¤¹¤ë¤È¤³¤í¤«¤é¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¶¦Í¤¹¤ëή¤ì¤ò¾Ò²ð¤·¤Þ¤¹¡£
¤Þ¤º¡¢ZFS¥¹¥È¥ì¡¼¥¸¥×¡¼¥ë¤¬¸½»þÅÀ¤Ç¸ºß¤·¤Ê¤¤¤³¤È¤ò³Îǧ¤·¤Þ¤¹¡£
#
zpool list
»ÈÍѤǤ¤ë¥×¡¼¥ë¤¬¤¢¤ê¤Þ¤»¤ó
#
zfs list
»ÈÍѤǤ¤ë¥Ç¡¼¥¿¥»¥Ã¥È¤¬¤¢¤ê¤Þ¤»¤ó
#
¿·µ¬¤Ë¥×¡¼¥ë¤òºîÀ®¤·¤Þ¤¹¡£¹½À®¤Ï²¿¤Ç¤â¹½¤¤¤Þ¤»¤ó¤¬¡¢¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ã¤Ý¤¯¥ß¥é¡¼¥×¡¼¥ë¤Ë¤·¤Æ¤ª¤¤Þ¤¹¡£
#
zpool create -f mpool mirror
c2t64d0 c2t69d0 mirror c2t74d0 c2t80d0
#
zpool list
NAME
SIZE USED AVAIL
CAP HEALTH ALTROOT
mpool
16.8G 81K
16.7G 0% ¥ª¥ó¥é¥¤¥ó -
#
zfs list
NAME
USED AVAIL REFER MOUNTPOINT
mpool
78K 16.5G 24.5K /mpool
#
zpool iostat -v
capacity operations bandwidth
pool used
avail read write read write
----------- ----- ----- ----- -----
----- -----
mpool 81K
16.7G 0
9 0 17.4K
mirror 36K
8.37G 0
3 0 7.85K
c2t64d0
- -
0 8 8.62K 119K
c2t69d0
- -
0 10 8.62K 119K
mirror 45K
8.37G 0
5 0 9.51K
c2t74d0
- -
0 11 8.62K 121K
c2t80d0
- -
0 12 8.62K 121K
----------- ----- ----- ----- -----
----- -----
#
°Ê²¼¤Î¤è¤¦¤Ë¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ã¤Ý¤¯¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤òºîÀ®¤·¤Þ¤¹¡£
¤»¤Ã¤«¤¯¤Ê¤Î¤Ç¤½¤ì¤é¤·¤¯¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤â/export/home2¤ËÊѹ¹¤·¤Æ¤ß¤Þ¤·¤¿¡£
#
zfs create mpool/home
#
zfs create mpool/home/user1
#
zfs create mpool/home/user2
#
zfs create mpool/home/user3
#
zfs set mountpoint=/export/home2
mpool/home
#
zfs list
NAME
USED AVAIL REFER MOUNTPOINT
mpool
206K 16.5G 24.5K /mpool
mpool/home
102K 16.5G 28.5K /export/home2
mpool/home/user1 24.5K 16.5G
24.5K /export/home2/user1
mpool/home/user2 24.5K 16.5G
24.5K /export/home2/user2
mpool/home/user3 24.5K 16.5G
24.5K /export/home2/user3
#
¤¤¤è¤¤¤èËÜÂê¤ÎZFS¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¶¦Í¤Ç¤¹¡£
¤Þ¤º¡¢¸½»þÅÀ¤Ç¤Ï¶¦Í¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ÅöÁ³¤Ç¤¹¤¬¡£¡£¡£
#
share
#
mpool/home ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Îsharenfs¥×¥í¥Ñ¥Æ¥£¡¼¤ò³Îǧ¤·¤Þ¤¹¡£
#
zfs get sharenfs mpool/home
NAME
PROPERTY
VALUE
SOURCE
mpool/home
sharenfs
off
default
off¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤¬¤ï¤«¤ê¤Þ¤¹¡£
°Ê²¼¤Î¥³¥Þ¥ó¥É¤Çon¤Ë¤·¤Æ¡¢¤â¤¦°ìÅÙsharenfs¥×¥í¥Ñ¥Æ¥£¡¼¤ò³Îǧ¤·¤Þ¤¹¡£
#
zfs set sharenfs=on mpool/home
#
zfs get sharenfs mpool/home
NAME
PROPERTY
VALUE
SOURCE
mpool/home
sharenfs
on
local
on¤Ë¤Ê¤Ã¤Æ¤¿¤éOK¡ª¼Â¤Ï¤³¤ì¤À¤±¤Ç¤¹¤Ç¤Ë¶¦Í¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
¤Û¤é¤Í¡£
#
share
-
/export/home2 rw ""
-
/export/home2/user3 rw ""
-
/export/home2/user1 rw ""
-
/export/home2/user2 rw ""
#
¥×¥í¥Ñ¥Æ¥£¡¼¤Ï·Ñ¾µ¤µ¤ì¤ë¤Î¤Ç¡¢mpool/home¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ËÀßÄꤷ¤¿¤â¤Î¤¬ÇÛ²¼¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë¤â°ú¤·Ñ¤¬¤ì¤Æ¤ª¤ê¡¢¾åµ¤Î¤è¤¦¤Ë
user1¡Áuser3¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤â¤¹¤Ù¤Æ¶¦Í¤µ¤ì¤Æ¤¤¤ë¤ï¤±¤Ç¤¹¡£
ǰ¤Î¤¿¤á³Îǧ¤·¤Æ¸«¤ë¤È°Ê²¼¤Î¤è¤¦¤Ë¤Á¤ã¤ó¤Èon¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤·¡¢·Ñ¾µ¤·¤Æ¤¤¤ë»Ý¤âɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¡Êinherited from
mpool/home¡Ë
#
zfs get sharenfs mpool/home/user1
NAME
PROPERTY
VALUE
SOURCE
mpool/home/user1 sharenfs
on
inherited from mpool/home
#
¤Þ¤¿¡¢°Ê²¼¤Î¤è¤¦¤ËÆÍÁ³¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤òÄɲ䷤ƤâOK¡£¤¹¤°¤µ¤Þ¶¦Í¤µ¤ì¤Þ¤¹¡£
¤³¤ê¤ã³Ú¤Ç¤¹¤Ê¡£
#
zfs create mpool/home/user4
#
share
-
/export/home2 rw ""
-
/export/home2/user3 rw ""
-
/export/home2/user1 rw ""
-
/export/home2/user2 rw ""
-
/export/home2/user4 rw ""
#
ÅöÁ³¡¢°Ê²¼¤Î¤è¤¦¤ËÀßÄê¤ò¾å½ñ¤¤¹¤ì¤Ð¡¢°ìÉô¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤À¤±¶¦Í¤ò²ò½ü¤¹¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£
#
zfs set sharenfs=off
mpool/home/user3
#
share
-
/export/home2 rw ""
-
/export/home2/user1 rw ""
-
/export/home2/user2 rw ""
-
/export/home2/user4 rw ""
#
¡Ú¥¢¥ó¥±¡¼¥È¡Û
¤³¤Îµ»ö¤Ï¤¿¤á¤Ë¤Ê¤ê¤Þ¤·¤¿¤«¡©
¡¡¡¡¡¡¤Ï¤¤¡¡¡¡/¡¡¡¡¤¤¤¤¤¨