Operating System - HP-UX
1839319 Members
2551 Online
110138 Solutions
New Discussion

I need to Extend my root partition.

 
Eric Espeseth
Occasional Contributor

I need to Extend my root partition.

When I try to create an Ignite Recovery tape using the following command make_recovery -A -d /dev/rmt/ it fails because the root partition doesn't have enough free space to create the vg**.conf.old files. Is it possible to move the lvnconf directory and link it back to the /etc/ directory? If not, can you use the lvextend to add more space to the root partition?
9 REPLIES 9
Rita C Workman
Honored Contributor

Re: I need to Extend my root partition.

First let me say than generally I tend to go with the view that you do not extend root (because it must remain contiguous). So I usually would suggest to look for file(s)/directories that you really don't need and get rid of them or move them elsewhere.
Now that said...here is a thread that explains that you can extend root (without doing the ignite)...but please READ IT CAREFULLY, because if you do this your going to do some moving of things around and that gets real tricky:

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=6442bf8814d6b08bde/screen=ckiDisplayDocument?docId=200000054893406

/rcw

Patrick Wallek
Honored Contributor

Re: I need to Extend my root partition.

Here is a recent thread on extending the / (root) LV. Basically the consensus is that you should never have to do it.

http://forums.itrc.hp.com:80/cm/QuestionAnswer/1,1150,0x77a8e7613948d5118fef0090279cd0f9,00.html
Bill Hassell
Honored Contributor

Re: I need to Extend my root partition.

Attached to the paper clip is a document about extending the root filesystem.


Bill Hassell, sysadmin
Maarten van Maanen
Regular Advisor

Re: I need to Extend my root partition.

From what I've been told before by a HP technician is that if you ever have to extend the root-partition it might actually be better to reinstall HPUX completely than to try and extend it instead. Never thought about it much but would it be possible to do this and then use Ignite to reinstall all your application-file on the new file-system while keeping the new LV-size intact ?
Eslam Kamal_2
New Member

Re: I need to Extend my root partition.

I think you got the answer from the others
But I want to till you anther thing that I faced this the problem of full root file system and 99% of this calls because when the customer create backup they use /dev/rmt/om instead of /dev/rmt/0m and this cause big file under /dev/rmt named om so check this file.
regards
Eslam
KapilRaj
Honored Contributor

Re: I need to Extend my root partition.

hi guys,

You experts may correct me , i am going to explain my logical way of extending root file system... (I hv never tried this practicaly)

Boot through HPUX install CDROM Media..
select run a recovery shell & come to the shell
Here you get a # Prompt.

loadfile /usr/sbin/ioscan
loadfile /usr/sbin/vgimport
loadfile /usr/sbin/vgchange
loadfile /usr/sbin/lvextend
loadfile /usr/sbin/extendfs
insf
ioscan -fnC disk (find out the vg00 disk assume c0t6d0)
mkdir /dev/vgtest
mknod /dev/vgtest/group c 64 0x040000
vgimport /dev/vgtest /dev/dsk/c0t6d0
vgchange -a y /dev/vgtest
lvextend -L 2000 /dev/vgtest/rlvol3
extendfs /dev/vgtest/rlvol3
sync
reboot;

Is it going to work ????

Please give me some feedbacks

Kaps

Nothing is impossible
Emil Velez
Honored Contributor

Re: I need to Extend my root partition.

I suggest that you do not use the method with the recovery tape and sync sync...

If you have online jfs extending root is somewhat straight forward.

Lets assume your disk is setup with

lvol1
lvol2
lvol3 this is /
lvol4

Add another disk to vg00 or have space somewhere else in vg00.

pvcreate /dev/rdsk/newdisk
vgextend /dev/vg00 /dev/dsk/newdisk
pvmove -n /dev/vg00/lvol4 /dev/dsk/
lvextend -L /dev/vg00/lvol3
fsadm -F vxfs -b /

if you wish to put lv4 back on the root disk you can

pvmove -n /dev/vg00/lvol4 /dev/dsk/newdisk

Good luck...
Please note the assumptions.
1. / is vxfs
2. you own onlinejfs
3. you have space somewhere in vg00 or can add nother disk to vg00

Rob Mallard
Valued Contributor

Re: I need to Extend my root partition.

Good idea Kapil, however, this will not work.

The lvextend will fail because the extent allocation policy on lvol3 is set to contiguous. lvchange -C n could be used first then the lvextend will succeed, but, /dev/vg00/lvol3 (/) needs to be a contiguous lv. Perhaps someone else can expand on whether this rule can be broken.
Bill Hassell
Honored Contributor

Re: I need to Extend my root partition.

It is not possible to extend /stand, primary swap and / as they MUST be contiguous, that is, every extent must be in sequence. When you extend a logical volume, LVM must find free space--and there is nothing available following /, so LVM terminates. There is no workaround other than complicated building of another disk (with mistakes = complete destruction of the system), or using Ignite/UX.

Be sure you read the paper clip attachment on my previous posting on whether root needs to be extended at all. Systems with thousands of users and terabytes of disk space need less than 50 megs for the / directory. Read the attachment for details.


Bill Hassell, sysadmin