AWS使用LVM卷组管理卸载时报错
问题情况:
使用AWS EC2 server,挂载了一块磁盘,系统上已经umount了挂载的目录,然后在AWS管理界面取消了此磁盘的依附,过程用了比较长的时间,期间状态还为buzy,但是过了一段时间后还是成功取消了依附,但在系统上使用fdisk查看磁盘依然存在但不能使用,具体请看以下:
[root@ip-10-150-125-190 ~]# fdisk -l
Disk /dev/sda1: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda1 doesn't contain a valid partition table
Disk /dev/sdb: 450.9 GB, 450934865920 bytes
255 heads, 63 sectors/track, 54823 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 450.9 GB, 450934865920 bytes
255 heads, 63 sectors/track, 54823 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdf: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdf1 1 39162 314568733+ 8e Linux LVM
[root@ip-10-150-125-190 ~]#
[root@ip-10-150-125-190 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.9G 7.4G 2.0G 80% /
/dev/sdb 414G 170G 223G 44% /mnt
none 3.8G 0 3.8G 0% /dev/shm
[root@ip-10-150-125-190 ~]#
[root@ip-10-150-125-190 ~]# pvscan
/dev/VolGroup/data: read failed after 0 of 4096 at 289406910464: Input/output error
/dev/VolGroup/data: read failed after 0 of 4096 at 289406967808: Input/output error
/dev/VolGroup/data: read failed after 0 of 4096 at 0: Input/output error
/dev/VolGroup/data: read failed after 0 of 4096 at 4096: Input/output error
/dev/sdf: read failed after 0 of 4096 at 0: Input/output error
/dev/sdf: read failed after 0 of 4096 at 322122481664: Input/output error
/dev/sdf: read failed after 0 of 4096 at 322122539008: Input/output error
/dev/sdf: read failed after 0 of 4096 at 4096: Input/output error
/dev/sdf1: read failed after 0 of 512 at 322118287360: Input/output error
/dev/sdf1: read failed after 0 of 512 at 322118373376: Input/output error
/dev/sdf1: read failed after 0 of 512 at 0: Input/output error
/dev/sdf1: read failed after 0 of 512 at 4096: Input/output error
/dev/sdf1: read failed after 0 of 2048 at 0: Input/output error
No matching physical volumes found
[root@ip-10-150-125-190 ~]#
[root@ip-10-150-125-190 ~]# dmsetup info
Name: VolGroup-data
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 0
Event number: 0
Major, minor: 253, 0
Number of targets: 1
UUID: LVM-dygjZ7jTLGp0eO5abylInjgEeAKVm0vbIa1qiyklqI0R2YzIgV2CDoDFOPuWIIbR
[root@ip-10-150-125-190 ~]#
[root@ip-10-150-125-190 ~]# dmsetup remove VolGroup-data
[root@ip-10-150-125-190 ~]# dmsetup info
No devices found
[root@ip-10-150-125-190 ~]#
[root@ip-10-150-125-190 ~]# fdisk -l
Disk /dev/sda1: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda1 doesn't contain a valid partition table
Disk /dev/sdb: 450.9 GB, 450934865920 bytes
255 heads, 63 sectors/track, 54823 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 450.9 GB, 450934865920 bytes
255 heads, 63 sectors/track, 54823 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
[root@ip-10-150-125-190 ~]#
解决方案来自:http://serverfault.com/questions/421776/removing-vg-and-lv-after-physical-drive-has-been-removed
共有 0 条评论