脚本笔记8/27/2026

zfs.sh

来源文件:zfs.sh
已自动脱敏 0 处敏感信息。

bash
zpool create -m /mnt/kuang panda raidz2 /dev/sd{a,b,c,d,e,f,g,h}


#zfs list
#zpool status
#zfs mount panda /mnt/guanyin
zpool clear panda

#zpool scrub panda

#zfs set xattr=sa panda
#zfs set acltype=posixacl panda
#zfs set compression=lz4 panda
#zfs set atime=off panda
#zfs set relatime=off panda
#zfs set recordsize=1M panda
#zfs set compression=lz4 panda
#zfs get compressratio panda
#zfs set mountpoint=/mnt/guanyin panda
#zfs mount -a

find ./ -name node_modules -exec rm {} \;
find ./ -name ".git" -exec rm {} \;
find ./ -name ".svn" -exec rm {} \;

Disk /dev/sdc: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40PURX-60G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 329BF4DF-BD99-7B4C-9879-0AD61D7C3AFB

Device Start End Sectors Size Type
/dev/sdc1 2048 7814019071 7814017024 3.6T Solaris /usr & Apple ZFS
/dev/sdc9 7814019072 7814035455 16384 8M Solaris reserved 1

Disk /dev/sde: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40PURX-89N
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: D63DECAF-96E4-E34C-AE78-406E3AED42F4

Device Start End Sectors Size Type
/dev/sde1 2048 7814019071 7814017024 3.6T Solaris /usr & Apple ZFS
/dev/sde9 7814019072 7814035455 16384 8M Solaris reserved 1

Disk /dev/sdd: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: TOSHIBA MG06ACA8
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E4229DC5-174E-B34F-BF8D-FBEDF9EFE72F