Operating System - HP-UX
1820898 Members
4485 Online
109628 Solutions
New Discussion юеВ

Re: The best way to extend

 
SOLVED
Go to solution
Terence_2
Occasional Contributor

The best way to extend

Good Day , I have the following situation
on HP Unix 10.20.
What is the best way to extend /dev/vg02/lvol3
which is 70% full taking the space from
/dev/vg02/lvol4 which is only 31% and not needed.


/dev/vg02/lvol3 255253 16085368874 70% /var/opt/app/sonae

/dev/vg02/lvol4 3542433 1003169 2185020 31% /p02

/dev/vg02/lvol1 6291456 2484399 3569119 41% /d02
Terence
4 REPLIES 4
Pete Randall
Outstanding Contributor
Solution

Re: The best way to extend

Terence,

The "best" way is to back up the data, re-create the logical volumes, and restore the data. If you had extra room, you could create the new logical volumes first and copy the data directly into the new location.


Pete


Pete
Massimo Bianchi
Honored Contributor

Re: The best way to extend

HI,
best way is reported in this thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x429c3f9a15add711abdc0090277a778c,00.html


either solution with fsadm, in you have onlinejfs, or without.


HTH,
Massimo
Steven E. Protter
Exalted Contributor

Re: The best way to extend

back them both up with fback.

umount them both

lvremove the one thats too big.

lvremove /dev/vg02/lvol4

lvcreate -C n -n name (if you want a name) /dev/vg02

lvexend -L #### /dev/vg02/lvol4 /dev/dsk/c#t#d#

(replace the # signs first set is in Megabytes)

newfs -F vxfs /dev/vg02/rlvol4

lvextend -L /dev/vg02/lvol4
extendfs -F vxfs /dev/vg02/rlvol4

mount the two filesystems

Restore the one you deleted.

lvreduce might save time, but I don't use it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Francisco J. Soler
Honored Contributor

Re: The best way to extend

Hi Terence,

I have been in the same situation a day ago.

I paste here the solution I have found with the very useful help in this forum:

the solution for /home and /var directories was:

- shutdown 0 (Single user mode)
- mount /var and /home
- backup them
- umount both
- lvremove /dev/vg_name/lv_nme (twice)
- lvcreate -L new_size_in_megas -n lv_name /dev/vg_name (twice)
- newfs -F vxfs /dev/vg_name/rlv_name (twice)
- mount again /var /home
- restore backup.

check the thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x429c3f9a15add711abdc0090277a778c,00.html

HTH
Frank.
Linux?. Yes, of course.