[linux-lvm] sata cable disconnect + hotplug after

Xen list at xenhideout.nl
Tue Aug 9 09:58:35 UTC 2016


What am I supposed to do when a sata cable disconnects and reconnects as 
another device?

I had a disk at probably /dev/sda.

At a certain point the filesystem had become read-only. I realized the 
cable must have disconnected and after fixing it the same device was now 
at /dev/sdf.

Now the device had gone missing from the system but it would not refind 
it.

# pvscan
   WARNING: Device for PV fEGbBn-tbIp-rL7y-m22b-1rQh-r9i5-Qwlqz7 not 
found or rejected by a filter.
   PV unknown device                VG xenpc1          lvm2 [600,00 GiB / 
158,51 GiB free]

pvck clearly found it and lvmdiskscan also found it. Nothing happened 
until I did pvscan --cache /dev/sdf:

# pvscan --cache /dev/sdf
# vgscan
   Reading all physical volumes.  This may take a while...
   Duplicate of PV fEGbBn-tbIp-rL7y-m22b-1rQh-r9i5-Qwlqz7 dev /dev/sdf 
exists on unknown device 8:0
   Found volume group "xenpc1" using metadata type lvm2

Now I was able to activate it again and it was no longer flagged as 
partial (but now it is duplicate).

The unknown device 8:0 is clearly going to be /dev/sda, which is no 
longer there.

How can I dump this reference to 8:0 or should something else be done?

Oh right.... pvscan --cache without a parameter....

I wonder if I can run this while the thing is still activated....

I was beginning to think there'd be some hidden filter rule, but it was 
"just" the cache.

Should this thing be automatically resolved? Is running pvscan --cache 
enough?




More information about the linux-lvm mailing list