不重启服务器在线扩容FCSAN存储

以下命令针对不增加LUN,只在存储端修改LUN的大小后,linux在线更新LUN信息,并扩容LVM

multipath -ll /dev/mapper/dev01_OLD
for i in $(ls /sys/class/scsi_device/); do echo 1> /sys/class/scsi_device/$i/device/rescan; done #扫描所有LUN
multipathd resize map /dev/mapper/dev01_OLD
#扩容lvm
pvresize /dev/mapper/dev01_OLD
lvextend /dev/mapper/vgnfs-lvnfs -l +100%FREE
resize2fs /dev/mapper/vgnfs-lvnfs

posted @ 2022-03-27 09:07  swordzj  阅读(225)  评论(0编辑  收藏  举报