Operating System - HP-UX
1753802 Members
8013 Online
108805 Solutions
New Discussion юеВ

Re: How to get rid of a disk

 
SOLVED
Go to solution
Charles Holland
Trusted Contributor

How to get rid of a disk

HPUX 11.11 Have a VG called vg03 that has 9 PV's in it. On e dish has gone south, never to return again. All drives make up one large logical volume. When I try and activate or de activate the VG it complains that it can't access the dead drive.... neither the logical volume or the volume group are requited any more but I can't seem to figure out how to get rid of the LV or the PV and ultimately the VG.

Can someone tell me what steps I need to go through to get this drive c5t13d0 out of the volume group so that if I do a vgchange it won't complain .

Thanks in advance
"Not everything that can be counted counts, and not everything that counts can be counted" A. Einstein
8 REPLIES 8
Jayakrishnan G Naik
Trusted Contributor
Solution

Re: How to get rid of a disk

Hi Holland,

Have you unmounted the filesystem before attempting vg deactivation. Once you unmount the filesystem, vgchange should succeed and you can do a vgexport to get rid of the entire vg.

Thanks & Regards
Jayakrishnan G Naik
Torsten.
Acclaimed Contributor

Re: How to get rid of a disk

If there is 1 unmirrored LVOL across all disks and one is gone, the data is lost anyway.

So vgexport the VG and rebuilt it without this drive

or

replace the drive, create a new file system on the lvol and restore data.

Its up to you.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Ismail Azad
Esteemed Contributor

Re: How to get rid of a disk

Hi,

Deactivation of the volume group isn't possible if access is still permitted to your file system. Hence, you need to make your filesystem in a "quiescent" condition. In simpler words, as the other folks said, unmount the filesystem. However, I suspect you have some filesystem swap enabled which will not allow you to do this. If that's the case edit fstab and REBOOT (since you are using 11.11), then deactivate and export!

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
Charles Holland
Trusted Contributor

Re: How to get rid of a disk

I did a # vgchange -a y /dev/vg03 and it complained about the drives (it is a FC disk with two paths to it) I then tried a mount all and it said
mountall: /dev/vg03/lvol01 has to be fsck'd
mountall: diagnostics from fsck
vxfs fsck: file system on /dev/vg03/lvol01 has structural damage
mountall: cannot fsck /dev/vg03/lvol01
mountall: diagnostics from fsck
full file system check required, exiting ...
ta-data.
vxfs fsck: fsck read failure bno = 16, off = 0, len = 8192
mountall: /dev/vg03/lvol01 failed in fsck
mountall: /dev/vg03/lvol01 cannot be mounted

since it wasn't mounted I went ahead and tried the vgexport and found it had to be deactivated first, which I did, then ran the vgexport again with no problems. I then went and commented out the one and only line in /etc/fstab about /dev/vg03.

I'm not sure but should that take care of everything when I reboot the system for the halibut?
"Not everything that can be counted counts, and not everything that counts can be counted" A. Einstein
Torsten.
Acclaimed Contributor

Re: How to get rid of a disk

If the mount is commented in fstab and the VG is exported, it is gone - no problems on reboot.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Jayakrishnan G Naik
Trusted Contributor

Re: How to get rid of a disk

Hi Holland,

Vgexport will remove entire vg and commenting/removing the lines related to filesystem/swap will do it your you.

If the replies helped you, Assign appropriate points

Thanks & regards
Jayakrishnan G Naik
Charles Holland
Trusted Contributor

Re: How to get rid of a disk

done
"Not everything that can be counted counts, and not everything that counts can be counted" A. Einstein
Zinky
Honored Contributor

Re: How to get rid of a disk

If you absolutely no longer have any need of the VG and that lone logical volume:

vgchange -a n -q n /dev/vg03
vgremove /dev/vg03

If you want to keep the volume group sans the "lost" disk:

vgchange -a y -q n /dev/vg03
lvremove /dev/vg03/lvolname
lvcreate newlvol

or

find a suitable replacement to the lost disk and replace the failed disk. You will loose the filesystem on top of the lol and will have to create a new one on top of it (newfs or mkfs vxfs)

Cheers!
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler