1

Recently I set up LVM partition with an new disc /dev/sdc. I created the LVM with the following commands:

pvcreate /dev/sdc
vgcreate data /dev/sdc
mkfs.ext4 /dev/data/srv
tune2fs -m 0 /dev/mapper/data-srv

Now the problem is that the old disc /dev/sdb is gone and I get errors in /var/log/messages like:

sd 2:0:2:0: [sdc]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
sd 2:0:2:0: [sdc] CDB: Read(10): 28 00 00 00 00 3f 00 00 04 00
blk_update_request: 8 callbacks suppressed
end_request: I/O error, dev sdc, sector 63
sd 2:0:2:0: [sdc] Unhandled error code
sd 2:0:2:0: [sdc]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
sd 2:0:2:0: [sdc] CDB: Read(10): 28 00 00 00 00 3f 00 00 04 00
end_request: I/O error, dev sdc, sector 63
sd 2:0:2:0: [sdc] Unhandled error code

Because the old disc /dev/sdb was removed after crating the LVM, /dev/sdc (which is no longer present) took its place:

>pvs
  /dev/sdc1: read failed after 0 of 2048 at 0: Input/output error
  PV         VG   Fmt  Attr PSize   PFree
  /dev/sdb   data lvm2 a--  330.00g    0

>lvscan
  /dev/sdc1: read failed after 0 of 2048 at 0: Input/output error
  ACTIVE            '/dev/data/srv' [330.00 GiB] inherit

The partition works fine though /sdc is no longer present. Nevertheless how can I fix the LVM to no longer search for /dev/sdc?

I think LVM uses UUIDs internally. Otherwise this scenario wouldn't recognize sdb as the correct pv (disc) .

1
  • If sdc was still in use (active lv, no reboot), it should not have turned into sdb. Unless you disconnected and reconnected it also, creating a frankensdc in the process. Commented Aug 4, 2014 at 9:25

1 Answer 1

0

As I couldn't restart the host I fixed the error:

>pvs
  /dev/sdc1: read failed after 0 of 2048 at 0: Input/output error
  PV         VG   Fmt  Attr PSize   PFree
  /dev/sdb   data lvm2 a--  330.00g    0

by typing:

echo 1 > /sys/block/sdc/device/delete

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .