Operating System - HP-UX
1833780 Members
2448 Online
110063 Solutions
New Discussion

Re : Can Someone please advice

 
Vincent_5
Super Advisor

Re : Can Someone please advice

HI,
Ihave a L-Class Server and is running on HP Unix 11i , in it there is two internal harddisk of 36GB each. It is already configure in one vg namely vg00 and is mirror to each other. I have bought two additional 36GB harddisk as is running out of space, can someone advice how can I extend the existing vg00 and mirror it again... Can someone help and provide the steps on how can this task be perform. Thanks in advance

Regards
Vincent
nothing is better than to know more
16 REPLIES 16
Michael Tully
Honored Contributor

Re: Re : Can Someone please advice

Add the disks. As long as the additional disks are 36Gb each you can add both of them to /dev/vg00 should you wish to, but not actually necessary (create a new volume group)

After adding the disks, run:
# ioscan -fn
# insf -e (devices should be created)
# ls -l /dev/dsk (to see new devices created)

TO add to existing volume group
# pvcreate /dev/rdsk/cxtydz (for each new disk)
# vgextend /dev/vg00 /dev/dsk/cxtydz
# lvcreate ...... or
# lvextend -L /dev/vg00/mylvol

For new group
# pvcreate /dev/rdsk/cxtydz (for each new disk)
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgcreate /dev/vg01 /dev/dsk/cxtydz /dev/dsk/cxtydz
# lvcreate ....

See man pages for further information. ALternatively you can use SAM to do this as well.
Anyone for a Mutiny ?
Geoff Wild
Honored Contributor

Re: Re : Can Someone please advice

Sure...

ioscan -fn > /tmp/ioscan.fn.1

add the 2 disks if hot swap else shutdown and add them

ioscan -fn > /tmp/ioscan.fn.2

diff /tmp/ioscan.fn.1 /tmp/ioscan.fn.2

pvcreate those 2 new disks:

pvcreate /dev/rdsk/cXtXd1
pvcreate /dev/rdsk/cXtXd2

vgextend /dev/vg00 /dev/dsk/cXtXd1 /dev/dsk/cXtXd2

Then create new lvols

lvcreate -L SIZEINMB /dev/vg00 /dev/dsk/cXtXd1
lvextend -m 1 /dev/vg00/lvolXX /dev/dsk/cXtXd2

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Vincent_5
Super Advisor

Re: Re : Can Someone please advice

Hi,
Thanks for the reply, but sorry to say this I actually wanted to add the two new disk to the existing vg00 which is already mirror and not creating another vg for it as my vg00 is running low on disk space?? Please advice??

Regards
Vincent
nothing is better than to know more
Rajeev  Shukla
Honored Contributor

Re: Re : Can Someone please advice

Yes thats right the steps detailed above are for extending the VG00 only.
1. You first physically connect the disk, and find their device names.
2. Then run pvcreate to mave it LVM known disks.
3. Then do a vgextend /dev/vg00
That will increase the VG00, now you can extend your exisiting LV to the new disk and then will be mirroed to another disk.

I am not sure which LV in vg00 are you after to extend, accordingly we can advice.
Norman_21
Honored Contributor

Re: Re : Can Someone please advice

Vincent,

Here is a document on Adding a new disk to existing Volume Group!
I think the answers above are very clear and should do it for you.
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065140616

good luck
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Vincent_5
Super Advisor

Re: Re : Can Someone please advice

Hi,
Thanks for the advice again, I have check with some of my friend and I understand that I can used pvg to extend the existing volume group vg00 to the two new disk and how about the mirror, have I to break the mirror first and re-mirror again. Kindly advice with steps??? Thanks

Regards
Vincent
nothing is better than to know more
Rajeev  Shukla
Honored Contributor

Re: Re : Can Someone please advice

No There is no need to break the mirrors. When you extend an LV the mirror copy also gets extended and mirrors gets syncronized.

Cheers
Rajeev
Norman_21
Honored Contributor

Re: Re : Can Someone please advice

basically, when you extend the file system use the option -m x (where x the number of mirror) as following:

#lvcreate -m 1 -L 200 /dev/vg00/yourlogical
to create a new logical volume with 200MB and with 1 mirror

hope this help
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Thayanidhi
Honored Contributor

Re: Re : Can Someone please advice

Hi,
It's not required to set pvg, in case of
just 4 disks. If your existing LV is created
with Pv strict then it's not possible to
extend to new Pv's. In this case you need to
setup pvg and change LV property to
pvg-strict instead Pv strict. check man page
of lvchange.

If you planning to preceed with pvg config,
make sure each controller's disks are in
one pvg. verify the pvg configuration in
/etc/lvmpvg

TT
Attitude (not aptitude) determines altitude.
Elmar P. Kolkman
Honored Contributor

Re: Re : Can Someone please advice

Normally you don't have pvg's on vg00. It would be very strange, especially since you have 2 disks and mirror.

Just do the pvcreates, vgextend and then lvextend on the lvols that need extending (mind that / and /stand are not extendable!) or lvcreate the new lvols, then extendfs or fsadm (depending on whether you have online jfs or not).
When creating lvols, create them with the mirror option (-m 1).

To make sure you don't have pvg's, run 'vgdisplay -v vg00'. If you have pvg's, they are reported around the diskinfo at the bottom.
Every problem has at least one solution. Only some solutions are harder to find.
Saurav_1
Valued Contributor

Re: Re : Can Someone please advice

Hi,

#ioscan -fnC disk

check the output & save it to a text file for referece. insert the new HDDS in the 2 empth disk bays in server.

# ioscan -fnC disk

save the output again. this time 2 newfiles will be created for new disks. these are the device files.

NOTE:- It is not necessory that you have to extend the root VG. you can create a separate VG for the new disks and do the mirror.

Remember more the 50% of the disk must be active to activate a VG. so it will be beter to create a new VG. Extending a filesystem keeping it on 2 separate disks is a risk in future. You may fall in trouble if one of the disk fails. keeping all the 4 disk in single VG, system may not boot, that time even mirror may not help. So instead of disturbing the root VG. better think of creating the new VG.

LVs can be created of bigger size. on the new disk, and content of LV which are falling shorter in space can be copied there.

Full tech procedure has been given already in other responses so I will not repeat it.

Saurav
Elmar P. Kolkman
Honored Contributor

Re: Re : Can Someone please advice

To create the device files, you need to run 'insf' after the latter 'ioscan -fnC disk', ioscan won't do that for you.
Every problem has at least one solution. Only some solutions are harder to find.
Norman_21
Honored Contributor

Re: Re : Can Someone please advice

Hello again,

I believe it won't be practical to add more disks with large space to the vg00 in terms of System Recovery.
When you create a Recovery Tape it'll take longer and the same when you try to recover which is not recommended. always the vg00 should contain the root file systems only. Others, should be stored in another VG.

Just my $0.02 Cents

"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Zeev Schultz
Honored Contributor

Re: Re : Can Someone please advice

Just to mention -
not a good idea to spread your system over more than 1 disk.Either in terms of management or recovery times.As to out of space issue - what logical volume(s) do you have growing most (I assume /var ?) Shouldn't
logs treatment (delete OLD, links somewhere else etc) be considered first?

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Alex Ostapenko
Advisor

Re: Re : Can Someone please advice

Dear Vincent --

If you have used up all 36GB in VG00, then you might want to reevaluate what all you have put onto VG00. 36GB should be plenty of root disk space for a standard robust HP-UX install. For all the reasons mentioned by previous responses, it would probably not be a good idea to extend VG00 to more than 2 devices. Here are some pointers --

1. If /var is getting big, usually it's because of log files, .OLD files, or /var/adm/sw software distributor. Clean out the first 2. With /var/adm/sw, create a separate mount point for just /var/adm/sw, and that should leave plenty of space for /var. /var/adm/sw does not have to be in VG00, but it's probably good to keep it there, but as a separate mount point.

2. If /home is getting big, you do not have to do that. Any user home directories can be put into other locations, VG's, etc. and simply change /etc/passwd home-directory field to point to new location. That way, /home remains a manageable size.

3. If /tmp needs to be big (we have servers that require 256MB+), then so be it. But also remember that /tmp is defined to be only for temporary things, so clean it out regularly. By definition, /tmp should be cleaned out after every reboot.

4. If /opt is getting big, it's probably because of vendor-provided software requiring installation there. In that case, put the vendor software somewhere else and create a symlink (symbolic link) pointing to new location.

5. If you have device swap(s) larger than 1GB, leave 1 on VG00, and define the rest on your new disks.

6. If you have what I'll call non-root-disk filesystems for applications or data, those are the candidates to move off to new disks that are in a new volume group (e.g., VG01).

7. If you have measureware turned on and it's eating up /var space in /var/opt/perf/datafiles, move the contents of datafiles to a new VG/disk, and create a symlink from /var/opt/perf/datafiles to the new location.

8. If /usr needs to be extended because of all the new patches in the quality pack (yes, that eats up /usr space), then /usr definitely has to be extended. But after freeing up space from all the above items, you should have plenty to extend /usr.

Two gotchas:
(a) after all your book-keeping and space management, if any filesystems are extended, they will not be contiguous; for example, if you extend /usr, some extents will be part of original, and some will be at end of disk; this may have a performance impact on a heavily used system; this is easily fixed by doing a make-net-recovery backup and then a make-net-recovery restore
(b) many of the filesystem extensions have to be done in single-user mode; if any changes are made, particularly to /var /usr and/or device swaps, DO NOT FORGET THE COMMAND "lvlnboot -R" before you reboot; we lost a system having forgotten that command.

Happy space-management!

=:-) Alex
Todd McDaniel_1
Honored Contributor

Re: Re : Can Someone please advice

I tend to agree with Alex...

I have a Superdome and only have about 10 GB mirrored as well as a seperately mounted /tmp at 8GB.

20GB total is enough for my Superdome.

Also, one other thing. If you are extending / or /stand they need to be contiguous...

Any other filesystem can be extended with no problems... although I like to keep them contiguous just b/c i can and it only makes sense if you can possibly do it.

If you truly need 36GB or 72GB in vg00, I would like to see your setup...

I am very curious why you are running out of space... maybe you can respond to that question and Alex's queries.

IF you have NON-OS filesystems in VG00 I would STRONGLY recommend moving them out of vg00... You will have a terrible time trying to make an ignite tape of it if you have to.

Also move any /home directories or application directories out of vg00 if any exist there.

It is widely accepted that only OS related filesystems should be in vg00... including:

/dev/vg00/root
/dev/vg00/stand
/dev/vg00/var
/dev/vg00/usr
/dev/vg00/opt
/dev/vg00/openv
Unix, the other white meat.