[buug] lvm issue
Michael.Paoli at cal.berkeley.edu
Fri Aug 31 18:35:45 PDT 2007
Well, it might help if you told us some more details, and what you did
and didn't try already - and what results that gave you.
Knowing the LVM version (of the LVM packages and such, and perhaps of
the LVM volume groups also) might also be quite informative ... and
perhaps also the operating system version (I was almost going to say
could be most any ... including even HP-UX ... but
/dev/jj-internal/usr tends to make me think it's probably not HP-UX).
Of course with LVM being open source, dear knows what it may be
ported to and running under (though it would mostly behave about the
Anyway, how about these items for starters:
Have you confirmed that nothing (most notably PIDs) is still using
any of the LVMs - e.g. nothing using those LVM filesystems (if still
mounted) or LVM devices (such as a database using a raw LVM device
file)? If those LVM files are in use, one will likely need to
terminate those PIDs, or at least have those PIDs no longer using
those files or filesystems. If the PIDs get to be hung and
unkillible due to I/O errors (from the devices being gone) it may
turn out that not everything can be freed up (without either a
reboot, or at least providing the device back again - or possibly
some other device that would at least allow hung reads/writes to
proceed ... even if the data would be inconsistent).
Have you lvremove(8)d the LVs? Did you try the --force option?
Have you vgreduce(8)d the VG to zero size (if that's the only device
in the VG) or completely removed the device from the VG via
vgreduce(8) if the VG also spans other device(s)?
Were you then able to vgchange(8) -a n the VG (if nothing else was in
Were you then able to vgremove(8) the VG (if it uses/used no other
If not, at what point did things fail? What error diagnostics? What
return code (exit value)? Does your man page for the command that
was attempted and failed tell us the particular significance of that
I don't think vgscan(8) - at least in in general - removes LVM stuff.
It's mostly used to pick up and add LVM devices that aren't already
known to LVM.
I could probably create a similar scenario and "solve" it, but it may
not be applicable, or applicable in quite the same way as in your
case. After all, we're trying to find solution to your problem, not
to the problem I haven't created yet :-).
Quoting John de la Garza <john at jjdev.com>:
> I had an external device hooked up to my box and it got removed
> without first deactivating the lvm volume group.
> Now, I can't get the logical volumes or vol group out of the kernel.
> I am trying to run vgscan but get this:
> root at darkstar:~# vgscan
> Reading all physical volumes. This may take a while...
> /dev/jj-internal/usr: read failed after 0 of 4096 at 8589869056:
> Input/output error
> /dev/jj-internal/usr: read failed after 0 of 4096 at 0: Input/output
> I'd like to be able to fix this with out rebooting. Anyone know how
> to clear these unreadable devices out?
More information about the buug