Operating System - HP-UX
1834481 Members
3380 Online
110067 Solutions
New Discussion

How to remove a disk from vg00

 
SOLVED
Go to solution
Domenico Viggiani
Super Advisor

How to remove a disk from vg00

Hi,
on a Itanium2 box with HP-UX B.11.2,3 vg00 has two physical volumes; I don't like this situation because a single fail can destroy the whole system. Is there a safe method to remove a disk from vg, without reinstalling the system?
Machine was recently installed and I can suppose that there is no much data.
Another question: to mirror system disk, do I need Mirror/UX as in the RISC world?

Thanks in advance
Domenico Viggiani
21 REPLIES 21
Mohanasundaram_1
Honored Contributor

Re: How to remove a disk from vg00

Hi Domenico,

It depends on how the disks have been utilised within the vg. I would presume that the OS is only in 1 disk and the other part contains data.

In such a case, you can backup the data, remove the lVs on that disk, vgreduce and then create a new VG and lVs and then restore the backup.

If your concern is only about the system not booting in case of the data disk failure, then make the bootstring as "hpux -lq".

This will make the VG activated without quorum being present.

With regards,
Mohan.
Attitude, Not aptitude, determines your altitude
Domenico Viggiani
Super Advisor

Re: How to remove a disk from vg00

No, I have no data, there is only OS.
vg00 has two physical disks and I'd like to remove one disk without reinstalling.
Lorenzo Facello
Valued Contributor

Re: How to remove a disk from vg00

Hi,
have you any data on the second disk???
If the disk is empty you can simply do a
vgreduce /dev/dsk/disk2

check this linf for the itanium mirror:
http://h21007.www2.hp.com/dspp/tech/tech_TechSingleTipDetailPage_IDX/1,2366,5343,00.html


Hope this helps
L.F

Mohanasundaram_1
Honored Contributor

Re: How to remove a disk from vg00

Hi Domenico,

Ok, Lets see what we got here. Can you provide the pvdisplay -v

and

pvdisplay -v

This will make us understand how the filesystems are distributed. Please post it and we can get started.

WIth regards,
Mohan.
Attitude, Not aptitude, determines your altitude
Pete Randall
Outstanding Contributor

Re: How to remove a disk from vg00

Domenico,

Rather than removing the second disk, I would suggest that you first purchase MirrorDisk/UX and then use the second disk to mirror your root logical volumes.


Pete

Pete
Domenico Viggiani
Super Advisor

Re: How to remove a disk from vg00

Mohanasundaram, here are two 'pvdisplay' output.

Thank you
Enrico P.
Honored Contributor
Solution

Re: How to remove a disk from vg00

Hi Domenico
Seem you have two disks in mirror, this situation is ok for high availability.
Verify both of the disks are boot disks with the "lvlnboot -v" command and that the command "lifcp :AUTO -" give you the "hpux -lq" result for the both disks.
Can you send the "vgdisplay -v vg00", the "lvlnboot -v", lifcp :AUTO -" and the "setboot" output?

Enrico.
Mohanasundaram_1
Honored Contributor

Re: How to remove a disk from vg00

HI,

I see that you have already mirrored the lvols on the disk. So you need not worry.

Verify if you are able to boot from both the disks. As I had mentioned earlier, the boot string should be "hpux -lq".

This should take care of it.

With regards,
Mohan.
Attitude, Not aptitude, determines your altitude
Domenico Viggiani
Super Advisor

Re: How to remove a disk from vg00

Sorry but I'm not so sure that two disks are already mirrored. vg capacity is the sum of single disks capacity:

# vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4356
VGDA 4
PE Size (Mbytes) 32
Total PE 8692
Alloc PE 958
Free PE 7734
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 320
Current LE 10
Allocated PE 20
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 128
Allocated PE 256
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 16
Allocated PE 32
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 224
Current LE 7
Allocated PE 14
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 32
Current LE 1
Allocated PE 2
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 2944
Current LE 92
Allocated PE 184
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 2592
Current LE 81
Allocated PE 162
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 4608
Current LE 144
Allocated PE 288
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c3t2d0s2
PV Status available
Total PE 4346
Free PE 3867
Autoswitch On

PV Name /dev/dsk/c2t1d0s2
PV Status available
Total PE 4346
Free PE 3867
Autoswitch On
Patrick Wallek
Honored Contributor

Re: How to remove a disk from vg00

Yes, you more than likely are mirrored.

If you look at the stats for each LV in your vgdisplay output, you will notice that all LV's say that 2 PVs are used. You will also notice that "Allocated PE" is exactly double the "Current LE". Those are all indication that you are mirrored.

A couple of other things you can do to verify is 'lvdisplay -v' for each LV and look at the "# Mirror Copies". If it is greater than 0 then you are mirrored.

You can also do a 'lvlnboot -v' and you should see 2 boot disks, swap areas, etc. show up for each vg00 disk.
Domenico Viggiani
Super Advisor

Re: How to remove a disk from vg00

Sorry but I'm really out of training on HP-UX: my recent job is focused on Linux only.
I think you are right. Here are commands output:

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c3t2d0s2 (0/1/1/1.2.0) -- Boot Disk
/dev/dsk/c2t1d0s2 (0/1/1/0.1.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Root: lvol3 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Swap: lvol2 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Dump: lvol2 on: /dev/dsk/c3t2d0s2, 0


# lifcp /dev/dsk/c3t2d0s2:AUTO -
hpux
# lifcp /dev/dsk/c2t1d0s2:AUTO -
hpux

# setboot
Primary bootpath : 0/1/1/1.2.0
HA Alternate bootpath : 0/1/1/0.1.0
Alternate bootpath :

Autoboot is ON (enabled)

Thanks again
Sanjay_6
Honored Contributor

Re: How to remove a disk from vg00

Hi,

Looks like you have two disks allocated to vg00 and the disks are mirrored. Why do you want to remove the disk from vg00. It is mirrored to the primary disk.

Your Question:
Another question: to mirror system disk, do I need Mirror/UX as in the RISC world?

answer,

Your vg00 primary disk is already mirroed. That means you already have Mirror/UX. and your root is mirroed.

Hope this helps.

Regds
Domenico Viggiani
Super Advisor

Re: How to remove a disk from vg00

Thus the mirror package is already present on Itanium, there is no need to have the Mirror/UX package. Right?
Enrico P.
Honored Contributor

Re: How to remove a disk from vg00

You can see that two disks are already mirrored in the "vgdisplay -v vg00" output ("Allocated PE" for lvol are double "Current LE" )or in the "lvdisplay -v /dev/vg00/" output in the "Mirror copies" line.
Your situation appear to be OK

Enrico.
Sanjay_6
Honored Contributor

Re: How to remove a disk from vg00

Hi,

It is not that you don't need the mirror/UX package on itanium. What this means that it is already installed. Do a swlist to ckeck,

swlist |grep -i mirror

Hope this helps.

regds
Domenico Viggiani
Super Advisor

Re: How to remove a disk from vg00

Exact:
B2491BA B.11.23 MirrorDisk/UX (Server)

Thanks to all
Enrico P.
Honored Contributor

Re: How to remove a disk from vg00

Mirror Disk/UX is always installed with the "Mission Critical Operating Environment" (MCOE) and "Enterprice Operating Environment" (EOE) of HP-UX 11.23 version. See the doc http://www.docs.hp.com/en/5990-6728/5990-6728.pdf pag.190.

Enrico.
Gordon Bonnar
New Member

Re: How to remove a disk from vg00

Hey Domenico,

Good to see that things are coming along. Just wanted to point out that I agree with Enrico and Mohanasundaram about making sure that you are set to boot without quorum, because with only two disks, even though they are mirrored, this will cause a single point of failure as it won't automatically boot up after a failed boot disk.

The advice they are giving you seems perfect for PA-RISC, but I believe for Itanium you can run:

To check the first drive
efi_cp -d /dev/rdsk/c3t2d0s2 -u /efi/hpux/auto /tmp/auto
cat /tmp/auto

And the second:
efi_cp -d /dev/rdsk/c2t1d0s2 -u /efi/hpux/auto /tmp/auto
cat /tmp/auto


This should let you see what the auto file is on each disk. It should be something like:
boot vmunix -lq

Again, I come from PA-RISC learning, but this is the info I can find on the subject. Hope it helps. But I do agree with the others that leaving the mirrored disk in is a good idea. It looks to be bootable, just make sure that it has quorum disabled and you should have a nice setup =)
Domenico Viggiani
Super Advisor

Re: How to remove a disk from vg00

Gordon,
both commands you suggested give this error:

Invalid EFI partition: /dev/rdsk/c2t1d0s2
efi_cp: invalid efi device

Anyway, I tried to boot up from second disk, using EFI menu 'Alternate booth path' (second choice) and system bootstrapped ok.
Gordon Bonnar
New Member

Re: How to remove a disk from vg00

I'm sorry Domenico, where I said:
"To check the first drive
efi_cp -d /dev/rdsk/c3t2d0s2 -u /efi/hpux/auto /tmp/auto
cat /tmp/auto

And the second:
efi_cp -d /dev/rdsk/c2t1d0s2 -u /efi/hpux/auto /tmp/auto
cat /tmp/auto"

It should have read "To check the first drive
efi_cp -d /dev/rdsk/c3t2d0s1 -u /efi/hpux/auto /tmp/auto
cat /tmp/auto

And the second:
efi_cp -d /dev/rdsk/c2t1d0s1 -u /efi/hpux/auto /tmp/auto
cat /tmp/auto"

As s1 is the boot partition. I'm not as familiar with Itanium as I am with PA-RISC.
Domenico Viggiani
Super Advisor

Re: How to remove a disk from vg00

Gordon,
this is the output:

kaulon:/# efi_cp -d /dev/rdsk/c3t2d0s1 -u /efi/hpux/auto /tmp/auto
kaulon:/# cat /tmp/auto
boot vmunix

kaulon:/# efi_cp -d /dev/rdsk/c2t1d0s1 -u /efi/hpux/auto /tmp/auto
kaulon:/# cat /tmp/auto
boot vmunix -lq