Promoxzfstips
Jan 21, 2020
Technology
Steps
之前:
ssh登录:
./MegaCli64 -LDInfo -LALL -aAll
查看VD信息, 其中VD0(600G)不需要动.
./MegaCli64 -PDList -aAll | grep -i adapter
得到adapter数值:
删除VD1-VD3:
# ./MegaCli64 -cfglddel -L1 -a0
# ./MegaCli64 -cfglddel -L2 -a0
# ./MegaCli64 -cfglddel -L3 -a0
当前VD:
查看PD对应磁盘:
# ./MegaCli64 -PDList -aAll | more
两个600G的是0和1, 其他的随便动
查看多少块盘:
# ./MegaCli64 -PDList -aAll | grep 'Slot Number'
这里注意,2,3
是没有,从4~27
为slot number.
得到Enclosure ID:
# ./MegaCli64 -PDList -aAll | grep 'Enclosure'
为9
开始做24个raid0:
# ./MegaCli64 -CfgLdAdd -r0 [9:4] -a0
# ./MegaCli64 -CfgLdAdd -r0 [9:5] -a0
......
# ./MegaCli64 -CfgLdAdd -r0 [9:26] -a0
# ./MegaCli64 -CfgLdAdd -r0 [9:27] -a0
脚本:
lsblk
查看磁盘信息:
删除多余分区, sdb/sdn/sdr:
add zfs pool
命令行下添加:
# zpool create -f -o ashift=12 vmpool raidz2 /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi
# zpool add -f -o ashift=12 vmpool raidz2 /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp /dev/sdq
# zpool add -f -o ashift=12 vmpool raidz2 /dev/sdr /dev/sds /dev/sdt /dev/sdu /dev/sdv /dev/sdw /dev/sdx /dev/sdy
# zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
vmpool 130T 1.97M 130T - 0% 0% 1.00x ONLINE -
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
vmpool 819K 89.9T 205K /vmpool
Add in proxmox:
设置参数:
可用:
使用方法: