linux系统lvm迁移状态"unenable"问题

1.解决mount挂载lvm出现device * oes not exist

今天处理一台数据迁移工作,遇见问题“mount: special device /dev/sg_bk/lv_sg does not exist”具体操作如下:
在数据迁移的一台阿里云ECS实例挂载一块云盘做了lvm后挂设备,拷贝数据到云盘;卸载云盘后将云盘再挂载到新的一台ECS实例上,结果在mount时出现设备识别问题?
1.1.查询原因呈现

[root@eaju_storage_239_146 ~]# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/sg_bk/lv_sg
  LV Name                lv_sg
  VG Name                sg_bk
  LV UUID                I07Oc2-ZaPD-aJBH-7i10-ZcFH-oQXd-5nhc28
  LV Write Access        read/write
  LV Creation host, time images, 2020-06-04 15:06:40 +0800
  LV Status              unenable
  # open                 1
  LV Size                <1024.00 GiB
  Current LE             262143
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0

运行lvdisplay命令可以看到LV Status的状态 “unenable“

1.2.解决

vgchange -ay sg_bk

4.解决umount卸盘出现busy问题

4.1 问题呈现

-bash-4.2# umount -f /data/upload
umount.nfs4: /data/upload: device is busy

4.2 fuser -km清理占用文件进程

-bash-4.2# fuser -km /data/upload
/data/upload:        18477m 22781

4.3 缷载挂载点

-bash-4.2# umount -f /data/upload

你可能感兴趣的:(linux,运维,lvm)