Operating System - HP-UX
1831479 Members
3314 Online
110025 Solutions
New Discussion

Re: mirroring root disks [two]

 
bg_4
Occasional Contributor

mirroring root disks [two]

Hi

Just wondering about catches when employing mirroring when we have following scenario:

present configuration:
disk C - primary disk with /dev/vg00, external disk in jamacian enclosure
disk D - mirror disk, external disk on Jamaican enclosure

new/required configuration:
disk A - primary disk with /dev/vg00, internal disk
disk B - second disk wherein we want to extend /var, /opt, and /usr filesystem, internal disk , /dev/vg00

disk C - mirror of disk A
disk D - mirror of disk B


the catch is that /var, /opt and /usr would be extended from disk A to disk B. the question is can we have mirroring between A--C and B--D?

Also is it worth relocating /usr, /opt and /var entired on Disk B?

So gurus, guide us.
10 REPLIES 10
Santosh Nair_1
Honored Contributor

Re: mirroring root disks [two]

Bimal,

I assume you mean that /var, /opt and /usr would be moved to disk B. This can be done with the pvmove command. What you're trying to do can be done. You'd have to add disk A and B to the VG and then pvmove and lvextend -m 1 away.

As for whether its advisable or not, I'm not sure I see any benefit.
I would move /var/adm/sw and /var/adm/crash to different filesystems and I would also try to split up swap amonst as many disks as possible however.

-Santosh
Life is what's happening while you're busy making other plans
A. Clay Stephenson
Acclaimed Contributor

Re: mirroring root disks [two]

Hi,

The answer is yes; you can mirror that way. You didn't mention what kind of server you have but as a general rule, I tend to avoid internal disks unless they are hot-swap. It partially defeats the purpose of mirroring if you have to shutdown to replace disks. As for moving your filesystems, I would be tempted to tell you to put them in another volume group. Remember, only /stand, /, and primary swap must be on the boot disk.
If it ain't broke, I can fix that.
bg_4
Occasional Contributor

Re: mirroring root disks [two]

Hi

Thanks for the information. here's additional information. It's a N class server,9000 series, 4500. Also has MC Service Guard.

I am aware about pvmove command but the question if I extend /var, /opt and /usr on Disk B then would mirroring work?
Santosh Nair_1
Honored Contributor

Re: mirroring root disks [two]

When you say extend, are you trying to increase the size of those filesystems? In any case, the answer is yes, mirroring will still work.

Btw, pvmove basically mirrors the extent onto the destination PV and the removes the extent from the source PV...sort of like mirroring and then breaking the mirror.

Just an FYI.

-Santosh
Life is what's happening while you're busy making other plans
linuxfan
Honored Contributor

Re: mirroring root disks [two]

Hi Bimal,

what are the sizes of these disks?

Are you doing this change to accomodate for increase in filesystem sizes?

MC-SG won't prevent you from doing this.

But if disk size is tight and you cannot increase the size of the disk in the jamaica drives, then i would suggest moving /var/adm/crash, /opt, /usr/local to disk B. Yes mirroring would still work just fine.

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Byron Myers
Trusted Contributor

Re: mirroring root disks [two]

If I read your question right, you want /var, /opt, and /usr residing on disks A and B (LV extents on both). Then you want to mirror these LV's to disk D. Yes this can be done, just make sure you specify the disk D as the device to mirror to. Otherwise, you will mirror the LV's on the same disks. Also, you will need to ensure that disk C is bootable.
If you can focus your eyes far and straight enough ahead of yourself, you can see the back of your head.
bg_4
Occasional Contributor

Re: mirroring root disks [two]

All the disks are 8GB size and the fs are about 85% full. It's a high availability server. So can't afford more downtime and everything has to be smooth.

Looks like things are promising and we would be on track. Looking to replies I feel that we should move /var, /opt and /usr from bootable disk A to disk B and then mirror, making it a clean configuration.

Thanks for all the replies. Still won't mind more information on do's and don'ts.

Regards,
Bimal
linuxfan
Honored Contributor

Re: mirroring root disks [two]

Hi Bimal,

Do you have any other filesystem in vg00 on the root disk right now. 8GB disks and you are planning to move /usr, /var and /opt, these are the filesystems that need most space anyway

Just curious what else is filling up the space?

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Xavier Gutierrez
Frequent Advisor

Re: mirroring root disks [two]

Check this out. I think it is the cleanest way to do it. ;-)

******* Prepare disk A to be a boot disk *******

pvcreate -B disk A
mkboot /dev/rdsk/diskA
mkboot -a "hpux -lq" /dev/rdsk/diskA

******* Copy data onto disks A & B in an ordered way *******

vgextend vg00 onto disks A & B
lvextend -m 2 lvol[1-5] onto disk A (/stand, swap&dump, /, /home, /tmp)
lvextend -m 2 lvol[6-8] onto disk B (/usr, /var & /opt)
lvlnboot -R

******* Take data out of disk C and re-prepare it to be a boot disk *******

lvreduce -m 1 lvol[1-8] from diskC
mkboot /dev/rdsk/diskC
mkboot -a "hpux -lq" /dev/rdsk/diskC


******* Up to this point you'd be keeping one of the mirror copies in diskD *******

lvreduce -m 0 lvol[1-8] from disk D

******* Now, do the final mirroring *******

lvextend -m 1 lvol[1-5] onto diskC
lvextend -m 1 lvol[6-8] onto diskD
lvlnboot -R

******* Remember to change primary and alternate boot paths in N4000 PDC *******
Live fast, die young!
bg_4
Occasional Contributor

Re: mirroring root disks [two]

Hi folks

Thanks a lot for help. I would be try the procedure and would post the results [with steps].

Cheers,
bimal