Linux system lvm migration status "unenable" problem

Posted Jun 5, 20201 min read

  1. Solve the problem of device * oes not exist when mounting lvm

Today, I was dealing with a data migration job and encountered a problem "mount:special device /dev/sg_bk/lv_sg does not exist" The specific operations are as follows:
_ Mount a cloud disk on an Alibaba Cloud ECS instance for data migration to do lvm and then mount the device, copy the data to the cloud disk; after uninstalling the cloud disk, mount the cloud disk to a new ECS instance, the result is in Problems with device identification during mount? _
1.1. Query reason presentation

[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

You can see the status of LV Status by running the lvdisplay command "unenable"

1.2. Solved

vgchange -ay sg_bk

  1. Solve the busy problem of umount unloading disk

4.1 Problem Presentation

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

4.2 fuser -km clean up occupied file process

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

4.3 Unmount Mount Point

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