XEN虚拟机remove硬盘丢失问题

在convirt平台里remove点一个虚拟机,结果发现设备sdc也没了,fdisk -l没有发现sdc设备

查看下边文件sdc信息还在

[root@jnxen-25164 scsi]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 32 Lun: 00
Vendor: DP Model: BACKPLANE Rev: 1.07
Type: Enclosure ANSI SCSI revision: 05
Host: scsi0 Channel: 02 Id: 00 Lun: 00
Vendor: DELL Model: PERC H700 Rev: 2.0.
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 02 Id: 01 Lun: 00
Vendor: DELL Model: PERC H700 Rev: 2.0.
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 02 Id: 03 Lun: 00
Vendor: DELL Model: PERC H700 Rev: 2.0.
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 02 Id: 04 Lun: 00
Vendor: DELL Model: PERC H700 Rev: 2.0.
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 02 Id: 02 Lun: 00
Vendor: DELL Model: PERC H700 Rev: 2.0.
Type: Direct-Access ANSI SCSI revision: 05

解决办法:

先remove掉这个信息,在添加

echo “scsi remove-single-device 0 2 2 0″ > /proc/scsi/scsi

echo “scsi add-single-device 0 2 2 0″ > /proc/scsi/scsi

查看dmesg信息如下:

SCSI device sdc: 1048576000 512-byte hdwr sectors (536871 MB)
sdc: Write Protect is off
sdc: Mode Sense: 1f 00 00 08
SCSI device sdc: drive cache: write back
SCSI device sdc: 1048576000 512-byte hdwr sectors (536871 MB)
sdc: Write Protect is off
sdc: Mode Sense: 1f 00 00 08
SCSI device sdc: drive cache: write back
sdc: sdc1 sdc2 sdc3 sdc4 < sdc5 sdc6 sdc7 >
sd 0:2:2:0: Attached scsi disk sdc
sd 0:2:2:0: Attached scsi generic sg3 type 0

fdisk -l 查看 发现设备sdc

Disk /dev/sdc: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 65 522081 83 Linux
/dev/sdc2 66 1109 8385930 82 Linux swap / Solaris
/dev/sdc3 1110 1892 6289447+ 83 Linux
/dev/sdc4 1893 65270 509083785 5 Extended
/dev/sdc5 1893 2675 6289416 83 Linux
/dev/sdc6 2676 3458 6289416 83 Linux
/dev/sdc7 3459 65270 496504858+ 83 Linux

你可能感兴趣的:(XEN虚拟机remove硬盘丢失问题)