linux系统lvm迁移状态unenable问题

21次阅读

共计 822 个字符,预计需要花费 3 分钟才能阅读完成。

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

正文完
 0