1830207 Members
1311 Online
109999 Solutions
New Discussion

Re: lvremove error

 
kamal_15
Regular Advisor

lvremove error

hi all
when i decided to remove unused (unmounted)lvol
i recieved an error :
Couldn't remove Logical volume "/dev/vg01/lvol2
You must lvrmboot -s before removing a swap device.

the command i used was :
lvremove /dev/vg01/lvol2

and lvdisplay -v /dev/vg01/lvol2:

LV Name /dev/vg01/lvol2
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 32
Current LE 8
Allocated PE 8
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c0t5d0 8 8

--- Logical extents ---
LE PV1 PE1 Status 1
0000 /dev/dsk/c0t5d0 0500 current
0001 /dev/dsk/c0t5d0 0501 current
0002 /dev/dsk/c0t5d0 0502 current
0003 /dev/dsk/c0t5d0 0503 current
0004 /dev/dsk/c0t5d0 0504 current
0005 /dev/dsk/c0t5d0 0505 current
0006 /dev/dsk/c0t5d0 0506 current
0007 /dev/dsk/c0t5d0 0507 current


please help ?
kamal
15 REPLIES 15
Noel Miranda
Frequent Advisor

Re: lvremove error

The line
"You must lvrmboot -s before removing a swap device"

is an indicator that you are most probably using this as a swap device. Can you check out you /etc/fstab entries for swap?

And if you still want to remove the lv, then you erally do need to use lvrmboot.

Joseph Loo
Honored Contributor

Re: lvremove error

hi,

why do u want to remove your swap device?

but if really u want to do so, u may comment off the line on swap from /etc/fstab, reboot your server and then perform lvremove.

but really, why? no space???

regards.
what you do not see does not mean you should not believe
kamal_15
Regular Advisor

Re: lvremove error

thankx for response

but this lvol
dosn't exist in /etc/fstab
i told u :
when i decided to remove unused (unmounted)lvol

Noel Miranda
Frequent Advisor

Re: lvremove error

There must be some reason for the system to complain about the lvol being used a swap. Does swapinfo report the lvol?
kamal_15
Regular Advisor

Re: lvremove error

No

lvol2 dosn't exist in swapinfo
Noel Miranda
Frequent Advisor

Re: lvremove error

Is there a chance that at some time earlier the lv was configured for swap and then removed?
kamal_15
Regular Advisor

Re: lvremove error

no
this lvol was mounted on directory
and now this lvol dosn't mounted
Tony Scully_2
Valued Contributor

Re: lvremove error

Hi Kamal,

Can you post

lvlnboot -v /dev/vg01

Just to check what the vg has configured.
You CAN do that on HP
kamal_15
Regular Advisor

Re: lvremove error

hi tony
this command dosn't gave me result
Kent Ostby
Honored Contributor

Re: lvremove error

kamal --

Have you tried the command multiple times ?

Is it possible that you mistyped it before and used /dev/vg00/lvol2 instead of /dev/vg01/lvol2 ?

/dev/vg00/lvol2 probably is swap so if you mistyped it, you could get this result.

Oz
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Tony Scully_2
Valued Contributor

Re: lvremove error

That is very strange. If lvlnboot shows nothing than I cannot see how the suggested lvrmboot command would work. If you are certain that this is an unused lvol, then you could try the suggestion, and then lvremove.

Very Odd.

Tony.
You CAN do that on HP
kamal_15
Regular Advisor

Re: lvremove error

hi all
very strange things happen
i tryed to do any thing to exit from this problem.

i made the following commands:
----------------------------------
command
lvreduce -L 5 /dev/vg01/lvol2
----------------------------------
warning appear: that file system may be loses.
after accept (y)
----------------------------------
command
ln -s /dev/vg01/lvol2 /dev/rdsk/base1
----------------------------------
after that
----------------------------------
command
fsck /dev/rdsk/base1
----------------------------------
and create new lvol (lvol3)

when i tryed to remove (lvol2)
command complete successfully !!!


can any one explain ?

kamal
Kent Ostby
Honored Contributor

Re: lvremove error

kamal -- again, similar to my last post.

The only thing that would explain both is if you mistyped the vg name. I only mention it, because its the type of thing that I would do.

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
SS_6
Valued Contributor

Re: lvremove error

Hi Kamal,
I would request you to assign points to the experts helping you.It is just an encouragement. In the past also you have just assign points to less than 4% of the reponses you got.
Thanks
SS
By providing solutions I am helping myself
kamal_15
Regular Advisor

Re: lvremove error

hi all
iam sure vg name is true
i looked for history file to sure every commands is true.

hi SS:
you are right.
many thankx for help

kamal