From: Alireza Nematollahi Subject: Re: Stopped disk causes LVM to go crazy Date: Wed, 11 Feb 2009 12:04:46 -0800 (PST) Message-ID: <746454649.2869521234382686755.JavaMail.root@jaguar7.sfu.ca> References: <288159352.2860111234381750007.JavaMail.root@jaguar7.sfu.ca> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2037699418==" Return-path: In-Reply-To: <288159352.2860111234381750007.JavaMail.root@jaguar7.sfu.ca> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: bmr@redhat.com Cc: device-mapper development List-Id: dm-devel.ids --===============2037699418== Content-Type: multipart/alternative; boundary="----=_Part_104067_370842149.1234382686754" ------=_Part_104067_370842149.1234382686754 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hello, I think I did it in order: 1- nothing is mounted > 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 > vgchange -an disk2 3- stop the storage > sdparm -C stop /dev/sdb 4- checking for LVs on other disk > 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" To: "Alireza Nematollahi" Cc: "device-mapper development" 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 Alireza Nematollahi wrote: > 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. ------=_Part_104067_370842149.1234382686754 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: Times New Roman; font-size: 12pt; color: #000000'= >Hello,

I think I did it in order:
1- nothing is mounted
> = mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw)
sy= sfs 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- deactivat= ing VG/LVs
> vgchange -an disk2

3- stop the storage
> sd= parm -C stop /dev/sdb

4- checking for LVs on other disk
> lvsc= an


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/devic= e/delete" since I can't get the device restarted when I do sdparm -C start = /dev/sdb...

Thanks



----- Original Message -----
Fr= om: "Bryn M. Reeves" <bmr@redhat.com>
To: "Alireza Nematollahi" &l= t;alirezan@sfu.ca>
Cc: "device-mapper development" <dm-devel@redha= t.com>
Sent: Wednesday, February 11, 2009 10:50:45 AM GMT -08:00 US/C= anada Pacific
Subject: Re: [dm-devel] Stopped disk causes LVM to go craz= y

Alireza Nematollahi wrote:
> 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 L= VM
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 thi= s 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:

ech= o 1 > /sys/block/sdb/device/delete

Which will stop other commands= that scan the disks from tripping over
the dead device. You can also m= anually delete any remaining device
mapper devices that reference the r= emoved disk (see similar thread
yesterday).

Regards,
Bryn.
------=_Part_104067_370842149.1234382686754-- --===============2037699418== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============2037699418==--