Stopped disk causes LVM to go crazy
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello,
I think I did it in order:
1- nothing is mounted
Quoted 1 line
mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw)rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) nfsd on /proc/fs/nfsd type nfsd (rw)
2- deactivating VG/LVs
Quoted 1 line
vgchange -an disk2
3- stop the storage
Quoted 1 line
sdparm -C stop
/dev/sdb
4- checking for LVs on other disk
Quoted 1 line
lvscan
Isn't it the right order? I'm new to LVM and that's why I may be confused...
I don't like doing "echo 1 > /sys/block/sdb/device/delete" since I can't get the device restarted when I do sdparm -C start /dev/sdb...
Thanks
----- Original Message -----
From: "Bryn M. Reeves" <[email protected]>
To: "Alireza Nematollahi" <[email protected]>
Cc: "device-mapper development" <[email protected]>
Sent: Wednesday, February 11, 2009 10:50:45 AM GMT -08:00 US/Canada Pacific
Subject: Re: [dm-devel] Stopped disk causes LVM to go crazy
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.
Quoted 59 lines · On Wednesday 11 February 2009 20:04:46 Alireza Nematollahi wrote:
Hello,
I think I did it in order:
1- nothing is mountedQuoted 1 line
mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on/dev/ptstype devpts (rw)
tmpfs on/dev/shmtype tmpfs (rw)rpc_pipefson/var/lib/nfs/rpc_pipefstyperpc_pipefs(rw) nfsd on/proc/fs/nfsdtype nfsd (rw)2- deactivating VG/LVs
Quoted 1 line
vgchange -an disk2
3- stop the storage
Quoted 1 line
sdparm -C stop
/dev/sdb4- checking for LVs on other disk
Quoted 1 line
lvscan
Isn't it the right order? I'm new to LVM and that's why I may be confused...
I don't like doing "echo 1 >
/sys/block/sdb/device/delete" since I can't get the device restarted when I do sdparm -C start/dev/sdb...Thanks
----- Original Message -----
From: "Bryn M. Reeves" <[email protected]>
To: "Alireza Nematollahi" <[email protected]>
Cc: "device-mapper development" <[email protected]>
Sent: Wednesday, February 11, 2009 10:50:45 AM GMT -08:00 US/Canada Pacific
Subject: Re: [dm-devel] Stopped disk causes LVM to go crazyQuoted 2 lines · 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.
Quoted 8 lines
For now, you can clean up
/dev/sdbby deleting it via sysfs:echo 1 >
/sys/block/sdb/device/deleteWhich 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).
Add /dev/sdb to the filter so that it doesn't get scanned...
lvm.conf:
filter = [ "r/sdb/", "a/.*/" ]
Best regards,
./npf
Quoted 3 lines
Regards,
Bryn.