Stopped disk causes LVM to go crazy
A message that is not in the archive (sent off-list or not yet received): [email protected]
hi. Thanks for your reply. Well, I had tried that before, but no luck. I tried it again, and still no luck:
Quoted 1 line
vgchange -an disk2
0 logical volume(s) in volume group "disk2" now active
Quoted 2 lines
sdparm -C stop
/dev/sdb
lvscan
end_request: I/O error, dev sdb, sector 0
printk: 72 messages suppressed.
Buffer I/O error on device sdb, logical block 0
Buffer I/O error on device sdb, logical block 1
Buffer I/O error on device sdb, logical block 2
Buffer I/O error on device sdb, logical block 3end_request: I/O error, dev sdb, sector 0
Buffer I/O error on device sdb, logical block 0end_request: I/O error, dev sdb, sector 287277824/dev/sdb: read failed after 0 of 4096 at 0: Input/output errorend_request: I/O error, dev sdb, sector 0/dev/sdb: read failed after 0 of 4096 at 147086245888: Input/oend_request: I/O error, dev sdb, sector 287274137 utput error/dev/sdb: read failed after 0 of 4096 at 0: Inputend_request: I/O error, dev sdb, sector 287258265 /output error/dev/sdb1: read failed after 0 of 512 at 812646end_request: I/O error, dev sdb, sector 287258029 4: Input/output error/dev/sdb1: read failed after 0 of 2048 end_request: I/O error, dev sdb, sector 281410605
at 0: Input/output error/dev/sdb2: read failed after 0 of 20end_request: I/O error, dev sdb, sector 281410367
48 at 2993881088: Input/output error/dev/sdb2: read failed aend_request: I/O error, dev sdb, sector 63
fter 0 of 2048 at 0: Input/output error/dev/sdb4: read failed after 0 of 1024 at 144082075648: Input/output error/dev/sdb4: read failed after 0 of 2048 at 0: Input/output error
ACTIVE '/dev/disk1/blah' [10.00 GB] inherit
ACTIVE '/dev/disk1/blah' [100.00 MB] inherit
ACTIVE '/dev/disk1/blah' [10.00 GB] inherit
ACTIVE '/dev/disk1/blah' [100.00 MB] inherit
ACTIVE '/dev/disk1/blah' [10.00 GB] inherit
ACTIVE '/dev/disk1/blah' [100.00 MB] inherit
I'm using older LVM version:
Quoted 1 line
lvscan --version
LVM version: 2.02.25 (2007-04 27)
Library version: 1.02.19 (2007-04-27)
Driver version: 4.11.0
Any ideas?
Thanks
----- Original Message -----
From: "Bryn M. Reeves" <[email protected]>
To: "device-mapper development" <[email protected]>
Sent: Wednesday, February 11, 2009 2:39:20 AM GMT -08:00 US/Canada Pacific
Subject: Re: [dm-devel] Stopped disk causes LVM to go crazy
Quoted 7 lines · Alireza Nematollahi
hi guys,
I have a system with two SATA disks and I have LVM on the disks. I use sdparm (sdparm -C stop
/dev/sdb) to spin-down one of them. It works fine and I can hear the disk spinning down and all...But when I run any LVM command, say lvscan or whatever, I get lots of error messages:
What did you expect? :)
If the volume group is active when you remove/spin down the disks LVM has no way of knowing that you wanted to do that. To the software, it just looks like a drive has failed or gone away while it was in use.
<snip>
Quoted 8 lines
/dev/sdb2: read failed after 0 of 4096 at 2993881088: Input/output error/dev/sdb2: read failed after 0 of 4096 at 0: Input/output error/dev/sdb4: read failed after 0 of 1024 at 144082075648:
Input/output error/dev/sdb4: read failed after 0 of 2048 at 0:Input/output error Even when I physically remove the disk it still happens. Is there any way I can stop LVM from querying both disks or at least to stop displaying the error messages?
Tell LVM to stop using the disk first. See the man page for vgchange for full details but you want to run:
vgchange -an <volume group>
To deactivate the volume group *before* you start removing devices that it is using.
Regards,
Bryn.
Signature · 3 lines
dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel
Quoted 1 line · Alireza Nematollahi
hi. Thanks for your reply. Well, I had tried that before, but no luck. I tried it again, and still no luck:
You have to do it *BEFORE* you disable/remove the storage. Doing it afterwards will just throw all the errors you are seeing since the LVM tools can no longer access the device.
You have to do things in the correct order; first unmount any file systems, then de-activate LVs/VGs, then stop or remove the storage hardware.
If you do this in the wrong order you'll end up with the problems you're seeing.
For now, you can clean up /dev/sdb by deleting it via sysfs:
echo 1 > /sys/block/sdb/device/delete
Which will stop other commands that scan the disks from tripping over the dead device. You can also manually delete any remaining device mapper devices that reference the removed disk (see similar thread yesterday).
Regards,
Bryn.