1826415 Members
3815 Online
109692 Solutions
New Discussion

Re: lvremove

 
SOLVED
Go to solution
Olebile Molefi
Occasional Contributor

lvremove

Guys please help, With an absent mind I have used 'rm' command to remove raw partions from a volume group instead of lvremove which did'nt work very well. Realising that I tried using 'lvremove -f' which gives an error that lvremove can't get minor number of logical volume.
6 REPLIES 6
Pedro Sousa
Honored Contributor
Solution

Re: lvremove

if you still have the lvols, like:
brw-r----- 1 root sys 64 0x000008 Jan 8 17:04 lvol8
do the following:
mknod c 64 rlvol

where minor number of this example was 0x000008.

After this ,try to perform lvremove.
good luck.

Pedro Sousa
Honored Contributor

Re: lvremove

Sorry, but I think I miss understood your problem!

If the above isn't your case, here it is another way to solve it:
Restore the LVM configuration information for the physical volume /dev/rdsk/xxxxxx that was saved in the default file /etc/lvmconf/vgxx.conf
vgcfgrestore -n /dev/vgxx /dev/rdsk/cxtxdx

or
Force to restore the LVM configuration data when volume group is still active.

vgcfgrestore -R -n /dev/vgxx /dev/rdsk/cxtxdx

good luck.
Vincenzo Restuccia
Honored Contributor

Re: lvremove

Try with SAM.
Olebile Molefi
Occasional Contributor

Re: lvremove

Pedro,

Your first solution did work.....

mknod rlvol(name) c 64 (minor number)

then

lvremove -f succeeds.

There is one hiccup though one of the lv's won't remove something to do with can't remove swap device??
Pedro Sousa
Honored Contributor

Re: lvremove

what is the exact error and your command line?
can you post it?
Olebile Molefi
Occasional Contributor

Re: lvremove

The error reads

lvremove

Could'nt remove logical volume,
You must lvrmroot -s before removing a swap device