Operating System - HP-UX
1834934 Members
2470 Online
110071 Solutions
New Discussion

Re: How do I remove a logical volume dump2 - not used as dump

 
Simon P White
Advisor

How do I remove a logical volume dump2 - not used as dump

I have recently recovered a server using ignite and are now in the process of mirroring the root disk. I have a logical volume called dump2 which I need to remove but I get the error that the lvol is open, or a sparing operation is in progress. I'm sure its not my dump area that is on lvol dump and when I run lvlnboot -v it doesn't display dump2. Any ideas how I can remove this lvol. See attached command sequence
17 REPLIES 17
Andrew Young_2
Honored Contributor

Re: How do I remove a logical volume dump2 - not used as dump

Hi Simon

My immediate gut feel might be that this LV is being used as a swap device. Could you check with swapinfo -t. Otherwise see if it is mounted by looking in the /etc/mnttab file.

HTH

Andrew Y



Si hoc legere scis, nimis eruditionis habes
Simon P White
Advisor

Re: How do I remove a logical volume dump2 - not used as dump

Hi Andrew - thanks for the reply

Doesn't appear to be in use for swap or mounted.
Andrew Young_2
Honored Contributor

Re: How do I remove a logical volume dump2 - not used as dump

Hi.

What does SAM tell you about that logical volume?

Regards

Andrew Y
Si hoc legere scis, nimis eruditionis habes
john korterman
Honored Contributor

Re: How do I remove a logical volume dump2 - not used as dump

Hi Simon,

is the volume mounted?


regards,
John K.
it would be nice if you always got a second chance
Simon P White
Advisor

Re: How do I remove a logical volume dump2 - not used as dump

Hi Andrew,

sam reports the logical volume is Unused.

Dump is Dump
Dump2 is unused
Swap is Swap
Swap2 is Swap

I tried the remove from sam but encountered the same error
Simon P White
Advisor

Re: How do I remove a logical volume dump2 - not used as dump

Hi John,

The volume is not mounted
Andrew Young_2
Honored Contributor

Re: How do I remove a logical volume dump2 - not used as dump

Hi.

What reply do you get when you run an lvchange -a n /dev/vg00/dump2

Also look at the lvdisplay /dev/vg00/dump2 when its done if it works.

Regards

Andrew Y
Si hoc legere scis, nimis eruditionis habes
Simon P White
Advisor

Re: How do I remove a logical volume dump2 - not used as dump

Hi,

The lvchange -a n worked but I still can't remove it (see attached)
Rasheed Tamton
Honored Contributor

Re: How do I remove a logical volume dump2 - not used as dump

Your lvdisplay shows that it is not contiguous. Normally a dump device should be contiguous.

-Is it mounted
-use fuser on the lvol to find any processes
-is it used as raw for something

A dump device can be removed using lvrmboot.

lvrmboot -v -d dump2 /dev/vg00

man lvrmboot.

Removing it depends on the location of this file system related with the others like swap, root, etc. Possibly you have to go to lvm maintenance mode and do this.

Before you doing anything on the vg00, I would suggest to make an ignite recovery tape.

Regards,
Rasheed Tamton.
Andrew Young_2
Honored Contributor

Re: How do I remove a logical volume dump2 - not used as dump

Hi.

I would suggest the following:

Check there are no entries in /etc/fstab for that device. If so remove them.

Try umount the device and the raw device
umount /dev/vg00/dump2
umount /dev/vg00/rdump2

Lastly check in SAM to see if it thinks it is a swap device under Disks and File Systems -> SWAP and if it does, try to remove it. You may need to lvchange -a y /dev/vg00/dump2 first.

As a last resort I regret to say you may need to reboot.

After that I am out of ideas.

Regards

Andrew Y
Si hoc legere scis, nimis eruditionis habes
Simon P White
Advisor

Re: How do I remove a logical volume dump2 - not used as dump

Hi,

This is not a dump device and is not mounted.

root@aramis:>lvrmboot -v -d dump2 /dev/vg00
lvrmboot: Logical Volume "/dev/vg00/dump2" is not configured to be
a Root, Swap or Dump Logical Volume.
lvrmboot: Unable to Remove Dump Logical Volume
root@aramis:>

This appears to be something left over from my ignite recovery that I can't remove
Simon P White
Advisor

Re: How do I remove a logical volume dump2 - not used as dump

Hi Andrew,

The umounts failed - cannot find in /etc/mnttab. The lvol is not showing as swap in SAM. The server was rebooted earlier today.

If I boot into maintenance mode, what would be the process to remove it, or what about single user?
Rasheed Tamton
Honored Contributor

Re: How do I remove a logical volume dump2 - not used as dump

lvrmboot and lvremove cannot be performed if the volume group is activated in shared mode.

You can try the same commands on lvm (hpux -lm) maintenance mode.

What do you see when you try a pvdisplay on the PVs of vg00.

pvdisplay -v dev/dsk/c100t0d0
Simon P White
Advisor

Re: How do I remove a logical volume dump2 - not used as dump

Hi Rasheed,

Output from pvdisplay:-

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/dump 288 288
/dev/vg00/dump2 64 64
Andrew Young_2
Honored Contributor

Re: How do I remove a logical volume dump2 - not used as dump

Hi Simon

Can you lvreduce -l 1 /dev/vg00/dump2 ?

Still researching where all the bits for logical volumes are kept.

Regards

AY
Si hoc legere scis, nimis eruditionis habes
Simon P White
Advisor

Re: How do I remove a logical volume dump2 - not used as dump

Hi Andrew,

The lvreduce -l 1 worked ok
Andrew Young_2
Honored Contributor

Re: How do I remove a logical volume dump2 - not used as dump

Hi Simon.

If you are running HP-UX 11i with JFS3.3 there is a known bug. The relevant patch is PHKL_25885 superceded by PHKL_26230.

Otherwise you could try to remove the lv by using /sbin/lvremove once you have brought the system up in single user mode. You may need to manually mount /.

Regards

Andrew Y
Si hoc legere scis, nimis eruditionis habes