嘿嘿,zfs,开玩

嗯,首先用uname查看下版本。
bash-3.00# uname -srv
SunOS 5.10 Generic_120012-14
然后,卸载各分区。
bash-3.00# umount /data1
bash-3.00# umount /data2
bash-3.00# umount /data0
然后,创建zpool
bash-3.00# zpool create snnn_data mirror /dev/dsk/c1t1d0s2 /dev/dsk/c1t2d0s2
invalid vdev specification
use '-f' to override the following errors:
/dev/dsk/c1t1d0s2 contains a ufs filesystem.
/dev/dsk/c1t1d0s2 is normally mounted on /data1 according to /etc/vfstab. Please remove this entry to use this device.
/dev/dsk/c1t1d0s2 overlaps with /dev/dsk/c1t1d0s8
修改/etc/vfstab,注释掉相关行后重试
# zpool create snnn_data mirror c1t1d0s2 c1t2d0s2
invalid vdev specification
use '-f' to override the following errors:
/dev/dsk/c1t1d0s2 contains a ufs filesystem.
/dev/dsk/c1t1d0s2 overlaps with /dev/dsk/c1t1d0s8
嗯,是的,以前有一个ufs了。那么,强制重试
bash-3.00# zpool create -f snnn_data mirror c1t1d0s2 c1t2d0s2
嗯,看看结果:
bash-3.00# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
snnn_data 68G 89K 68.0G 0% ONLINE -
bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
snnn_data 86K 66.9G 24.5K /snnn_data
默认的挂载点是根据zpool的名称而定的。
bash-3.00# ls /snnn_data/
可以修改下:
bash-3.00# zfs set mountpoint=/data0 snnn_data
bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
snnn_data 92K 66.9G 24.5K /data0
bash-3.00# ls /data0
bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 3.9G 387M 3.5G 10% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 2.6G 872K 2.6G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/dev/dsk/c1t0d0s6 20G 3.4G 16G 18% /usr
/usr/lib/libc/libc_hwcap1.so.1
20G 3.4G 16G 18% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c1t0d0s3 3.9G 68M 3.8G 2% /var
swap 2.6G 16K 2.6G 1% /tmp
swap 2.6G 24K 2.6G 1% /var/run
/dev/dsk/c1t0d0s5 7.9G 69M 7.7G 1% /home
/dev/dsk/c1t0d0s4 5.9G 6.1M 5.8G 1% /opt
snnn_data 67G 24K 67G 1% /data0
如果df -h的时候发现没有找到我们的zpool/zfs,那么
1、查zpool的状态
# zpool status -x
所有池运行状况良好
2、查下zfs是不是被挂载了
# zfs get mounted snnn_data
名称 属性 值 来源
snnn_data mounted no -
如果mounted为no,那么这样挂载
# zfs mount
然后再查一遍
# zfs get mounted snnn_data
名称 属性 值 来源
snnn_data mounted yes -
然后用df再查。

此博客中的热门博文

少写代码,多读别人写的代码

在windows下使用llvm+clang

tensorflow distributed runtime初窥