proxmox笔记2(挂载FC-SAN存储)
1、今天终于搞通了proxmox7挂载emc vnx5100的多路径(集群每个节点都要)
需要安装的包:apt install multipath-tools
创建目录/etc/multipath/conf.d/
创建文件/etc/multipath/conf.d/multipath.conf (貌似这步非必须)
blacklist { # Skip the files under /dev that are definitely not FC/iSCSI devices # Different system may need different customization devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^hd[a-z][0-9]*" devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]" # devnode "^sda*" # Skip LUNZ device from VNX # device { # vendor "DGC" # product "LUNZ" # } } #multipaths { # multipath { # wwid 600601609b703a004686af850502e611 # alias pve-vnx5100 # } #} defaults { find_multipaths "on" user_friendly_names no flush_on_last_del yes } devices { # Device attributed for EMC CLARiiON and VNX series ALUA device { vendor "DGC" product ".*" product_blacklist "LUNZ" path_grouping_policy group_by_prio getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" #path_selector "round-robin 0" path_checker emc_clariion # features "1 queue_if_no_path" hardware_handler "1 emc" prio emc failback immediate rr_weight uniform # no_path_retry 60 } }
修改/etc/multipath/wwids文件,加入fcsan的wwid,一行一个wwid(貌似最重要的是这步)
/3600601609b703a004686af850502e611/
重启multipathd服务:systemctl restart multipathd
查看多路径是否成功:multipath -ll
2、把上面挂载好的mapper设备进行分区、格式化等(集群在任意一个节点上执行)
参看这里:https://starslove.me/2020/07/14/proxmox/
查看新挂载的设备:ls /dev/mapper/
然后分区挂载:
fdisk /dev/mapper/3600601609b703a004686af850502e611
g
n
t
30 ........这里,原文是31,但我的系统30才是Linux LVM
p
w
创建pv:
pvcreate /dev/mapper/3600601609b703a004686af850502e611-part1 .......这里要注意最后的-part1
创建vg:
vgcreage pve-san /dev/mapper/3600601609b703a004686af850502e611-part1
3、创建集群共享存储
在每个节点上运行partprobe扫描并加载其它节点上创建的pve-san
如果没有partprobe,则安装之:apt install parted
登陆集群任一节点管理web: http://节点ip:8006
大功告成,终于把后端的fc-san挂载给PVE集群去用了,明天开始装个虚拟机和做切换、迁移测试
补充:
经过测试,无论是挂成LVM或LVM-thin,还是CIFS,最终都无法实现快照和迁移共存的功能(参照这里https://www.cnblogs.com/d9394/p/16692166.html),所以只能放弃PVE-FC的组合,改回用ESXI-FC了