1748111 Members
3434 Online
108758 Solutions
New Discussion юеВ

Re: how to extend lv

 
SOLVED
Go to solution
vanda982
Occasional Advisor

how to extend lv

Hi i am new for hpunix, i am having below partition for my workstation.

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol4 4194304 2430177 1654093 60% /
/dev/vg00/lvol1 63765 17622 39766 31% /stand
/dev/vg00/lvol5 4096000 18589 3822610 0% /usr

i want to create separate partition for /opt and /var

what are the step need to follow.
17 REPLIES 17
avizen9
Esteemed Contributor

Re: how to extend lv

Hello,
first of all,

why you want to create additional parition for /var/ /opt?

your / still having enough space to handle data, let me know
vanda982
Occasional Advisor

Re: how to extend lv

thank you for reply,
my root may times full becuase of /var/ /opt
Taifur
Respected Contributor

Re: how to extend lv

Hi Vanda982,

For creating LV you can follow below procedure:

Create Lvol:
=============
#lvcreate -L 20480 -n lvol9 /dev/vgdatabase
#lvcreate -L 20480 -n lvol10 /dev/vgdatabase
#lvcreate -L 20480 -n lvol11 /dev/vgdatabase

#newfs -F vxfs -o largefiles /dev/vgdatabase/rlvol9
#newfs -F vxfs -o largefiles /dev/vgdatabase/rlvol10
#newfs -F vxfs -o largefiles /dev/vgdatabase/rlvol11

Edit vi /etc/fstab:
===================
/dev/vgdatabase/lvol9 /u01 vxfs delaylog 0 2
/dev/vgdatabase/lvol10 /u02 vxfs delaylog 0 2
/dev/vgdatabase/lvol11 /u03 vxfs delaylog 0 2

Rgds//
Taifur
vanda982
Occasional Advisor

Re: how to extend lv

let me try with lvcrate (man lvcreate)
shall i also move all old /var /opt data once i will create that.


basically i want to migrate /var /opt from my (root)

i can access this station remotly. is this possible?
avizen9
Esteemed Contributor

Re: how to extend lv

you may can do this,

have you check your vg having enough space to create new logical volume?
you can check it through
vgdisplay -v
let me know, thanks.
vanda982
Occasional Advisor

Re: how to extend lv

thanks
i have free space there,
what steps need to follow can i do it remotly,

//vanda
Johnson Punniyalingam
Honored Contributor

Re: how to extend lv

Hi Vanda982,

It not that easy to create seprate

partition for /opt and /var

Reason for creating seprate partition for /opt and /var due to you / file system many time full,

Couple of options

1. You can increase your vg00 adding extra disk to vg00.
2. Once vg00 has been added extra disk vg00
3. Use Ignite resize the / File System.

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: how to extend lv

Option 2:-

Example :- & for vg00

does your vg00 mirrored .? If yes

reduce to your from your vg00 than add the with bigger size disk and mirror back from to

Once done try to boot from and follow above predcure versa vice,

so finally your are having Bigger size,

try to find root cause why /var /opt increasing.?

Thanks,
Johnson

Problems are common to all, but attitude makes the difference
vanda982
Occasional Advisor

Re: how to extend lv

thanks for your response,
its not server its workstation, it doesnt have mirror and i dont want to use ignit
Ok let me elaborate more here which will give clear picture.

I am having many production hpux workstation which having /opt and /var inside (/root) I am getting frequently issue for /root full. and then I need to remove logs from /(root) or some unwanted files, since /root goes full user can not launch their application.

I don├в t want to extend /root with ignite for all stations as its time consuming process and also physical present require there. I am having option I Can re-image but that will also time consuming and require physical present.

So only left with one option i can migrate /opt /var from root which will indirectly extend my /root partition and I want to do this task remotely, hope this is clear now to all, please anybody else can help me for this.