1833584 Members
3660 Online
110061 Solutions
New Discussion

/tmp & /opt extending

 
SOLVED
Go to solution
kunjuttan
Super Advisor

/tmp & /opt extending

Hi gurus,
I have 2 servers in which I need to extend some filesystems.
1)In one server two FS are in threshold level.

/dev/vg00/lvol6 2097152 1890928 204768 90% /tmp
/dev/vg00/lvol4 2097152 1803720 291200 86% /home

vgdisplay output is--
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 13
Open LV 13
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4356
VGDA 2
PE Size (Mbytes) 32
Total PE 4346
Alloc PE 2835
Free PE 1511
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

2)In other server one FS are in threshold level.

/dev/vg00/lvol4 7274496 6835232 435840 94% /opt

vgdisplay output is--
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 15
Open LV 15
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4465
VGDA 2
PE Size (Mbytes) 64
Total PE 4455
Alloc PE 3215
Free PE 1240
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

In both the cases free PE s are available. Please tell me how to proceed to extend these three FS.Is this required a reboot to single user mode?

OS - HPUX11.23
OnlineJFS not available.
RX series Servers-Itanium CPU

34 REPLIES 34
Abid Iqbal
Regular Advisor

Re: /tmp & /opt extending

Backup data on both the mounts.
Reboot system in single user mode.
Extend lv and extend filesystem using extendfs.
Raj D.
Honored Contributor

Re: /tmp & /opt extending

Kunjuttan,

Begin with this:

>>
/dev/vg00/lvol6 2097152 1890928 204768 90% /tmp
/dev/vg00/lvol4 2097152 1803720 291200 86% /home

> OnlineJFS not available.
- How do you know is not there.


For above two: (With online jfs )
1. # lvextend -L 4096 /dev/vg00/lvol4
2. # fsadm -b 4096m /home



- without online jfs:
1. # fuser -cu /home
2. # fuser -ku /home # will kill all /home processes.
3. # umount /home
4. # lvextend -L 4096 /dev/vg00/lvol4
5. # extendfs /dev/vg00/rlvol4
6. # mount /home # Verify.



Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: /tmp & /opt extending

Kunjuttan,

If you are trying /opt and /tmp without online jfs you can do from single user mode.

Online JFS can be cheked with:
# swlist -l product | grep -i jfs
# /sbin/vxlicrep

without online JFS :
- reboot the system
- Interupt boot sequence.
- from EFI shell:> boot vmunix -is
- activate vg00
- mount all but /opt
#(check /etc/fstab ) for lvol reference .
- extend /opt
# lvextend -L ...
# extendfs /dev/vg00/rlvol..

- mount and check. # bdf /opt
- same for /tmp .
- boot in multiuser mode. # init 3
or reboot .


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
kunjuttan
Super Advisor

Re: /tmp & /opt extending

"If you are trying /opt and /tmp without online jfs you can do from single user mode."

So can i do it in multiusermode also,if onlinejfs is ther???
stephen peng
Valued Contributor

Re: /tmp & /opt extending

quite simple, like you want to extend /tmp to 4096m:
# lvextend -L 4096 /dev/vg00/lvol6
# fsadm -b 4096m /tmp
Fabio Ettore
Honored Contributor

Re: /tmp & /opt extending

Hi,
if you have OnlineJFS ("swlist -l product |grep -i online" to check) you can do that in multi-user mode by

lvextend -L /dev/vg00/lvol4
fsadm -F vxfs -b /home
(this is the sample just for /hoem on the first system)

Otherwise you have to get single-user mode and using extendfs with filesystems unmounted.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Raj D.
Honored Contributor

Re: /tmp & /opt extending

Kunjuttan,
(again),

> So can i do it in multiusermode also,if onlinejfs is ther???

- Yes, this is pretty easy if you have Online JFS. Online JFS comes with MCOE Operating OE. by Default.

Check type of OE you have:
# swlist -l bundle | grep HPUX11


With online JFS, it is as simple as just typing two command:(lvextend & fsadm )

Ex: Suppose you want to add 2GB to those 2GB FS.
1. # Check the current size with lvdisplay
# lvdisplay /dev/vg00/lvol6 | grep "LV Size"
2. # Add 2048 to that value, to make 2GB extension.
- So total comes 4096. (This is for /tmp)
# lvextend -L 4096 /dev/vg00/lvol6
# fsadm -b 4096M /tmp
# bdf /tmp



3. Done.

Enjoy,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
kunjuttan
Super Advisor

Re: /tmp & /opt extending

i already mentioned that onlinejfs is not there....
Raj D.
Honored Contributor

Re: /tmp & /opt extending

> i already mentioned that onlinejfs is not there....

- So you have to spend some $$$, or to accept the pain , as it is not straight forward without Online JFS.
- The main thinghe file system needs to be unmounted to be able to use extendfs command.
- /tmp and /opt cannot be unmounted when the system is in multiuser mode,(run level 3) (#who -r) as the files will be in use by the system and by the services.

Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
kunjuttan
Super Advisor

Re: /tmp & /opt extending

Hi gurus,
Pls guide me..am going to do the exention.
1)How can I go to single user mode directly from multiuser?
2)After booting into single user mode what I have to do??
vgchange -a y vg00
Mounting /.And any other file systems required??
3)Is it like normal fs extending procedure?

Dennis Handly
Acclaimed Contributor

Re: /tmp & /opt extending

>1) How can I go to single user mode directly from multiuser?

You basically have to boot into single user mode, init -s won't work.
Steven E. Protter
Exalted Contributor

Re: /tmp & /opt extending

Shalom,

Even without OnlineJFS this is pretty simple.

You just need to umount the file system and run extendfs

Problem is /tmp is usually pretty busy, and you will need to arrange a downtime. You need not go to single user mode, it would be enough to merely shut down applications that use /tmp

Of course single user or lvm maintenance mode does make all of this easier, but you have to sit through a reboot.

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
kunjuttan
Super Advisor

Re: /tmp & /opt extending

Can you please give me the steps..
Is the command "shutdown -y now" is ok for booting in single user mode..
After booting in single user mode,what all things has to be done before going for an extension?And also Can i able login noramllay in single user mode..or mp login???
KapilRaj
Honored Contributor

Re: /tmp & /opt extending

init 1 will take you to single user mode ..

Once there, umount /tmp & /opt # Kill any process that is still accessing and extend the filesystem - procedure has been explained already. After this reboot the system.

Regards,

Kaps
Nothing is impossible
kunjuttan
Super Advisor

Re: /tmp & /opt extending

Do need to activate the VG00??And also the VG00 is mirrored..
How to know that the FS is accesing and how to kill that???-By fuser???
VVS
Regular Advisor

Re: /tmp & /opt extending

Use
fuser -cu /tmp --- To check the process accessing File system

Use
fuser -ku /tmp --- To kill the process.

Regards,
VVS
Work is life, you know, and without it, there's nothing but fear and insecurity.
kunjuttan
Super Advisor

Re: /tmp & /opt extending

Somewhat clear.Now my concern is how to boot into single-usermode in a RX series server.??my server model is-ia64 hp server rx7640.
And one more thing my rootvg is already mirrored.So anything else is to be done after extending the /tmp??
VVS
Regular Advisor
Solution

Re: /tmp & /opt extending

You should interupt the booting when it ask you to press any key within 10 secs.

It will take you to menu, where you need to give this command.

Menu> bo pri

It will ask, do you want to interact with IPL Y/N ?

Give "Y" . It will take you to ISL prompt. In ISL give this command.

ISL>hpux -is

This will boot the system into single user mode.

-------

These are the steps to boot the integrity servers into single user mode.

Boot the system to the EFI manager screen.

EFI Boot manager screen:
-----------------------------------------------------------------------------------------

EFI Boot Manager ver 1.10 [14.57] Firmware ver 2.31

Please select a boot option

HP-UX Primary Boot: 0/1/1/1.2.0
EFI Shell [Built-in]
Boot option maintenance menu
Security/Password Menu


Use | and | to change option(s). Use Enter to select an option
-----------------------------------------------------------------------------------------

If a primary HP-UX boot option is available - select it by pressing enter


-----------------------------------------------------------------------------------------
(c) Copyright 1990-2003, Hewlett Packard Company.
All rights reserved

HP-UX Boot Loader for IPF -- Revision 1.73

Press Any Key to interrupt Autoboot
AUTO ==> boot :IINSTALL
Seconds left till autoboot - 9
Type 'help' for help
-----------------------------------------------------------------------------------------

>> Interrupt the auto-boot sequence by pressing the SPACE bar.
This will bring you to the HPUX> prompt.

For HP-UX Single user mode:

HPUX> boot vmunix -is
Work is life, you know, and without it, there's nothing but fear and insecurity.
VVS
Regular Advisor

Re: /tmp & /opt extending

Can you paste the lvdisplay output for the LV which you want to extend?
Work is life, you know, and without it, there's nothing but fear and insecurity.
kunjuttan
Super Advisor

Re: /tmp & /opt extending

# lvdisplay /dev/vg00/lvol5
--- Logical volumes ---
LV Name /dev/vg00/lvol5
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 6016
Current LE 94
Allocated PE 188
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default


kunjuttan
Super Advisor

Re: /tmp & /opt extending

Use | and | to change option(s). Use Enter to select an option
-----------------------------------------------------------------------------------------

If a primary HP-UX boot option is available - select it by pressing enter


-----------------------------------------------------------------------------------------
(c) Copyright 1990-2003, Hewlett Packard Company.
All rights reserved

HP-UX Boot Loader for IPF -- Revision 1.73

Press Any Key to interrupt Autoboot
AUTO ==> boot :IINSTALL
Seconds left till autoboot - 9
Type 'help' for help
-----------------------------------------------------------------------------------------Can you please make this clear ???
VVS
Regular Advisor

Re: /tmp & /opt extending

If the disks are mirrored, and if you extend the lvol, mirrored disks also extend automatically

#lvextend -L /dev/vgxx/lvolx
#extendfs -F vxfs /dev/vgxx/rlvolxx

If enough space is there on both disks(provided strict allocation) mirror also will get extended automatically.
Work is life, you know, and without it, there's nothing but fear and insecurity.
VVS
Regular Advisor

Re: /tmp & /opt extending

Interrupt the auto-boot sequence by pressing the SPACE bar.

This will bring you to the HPUX> prompt.

For HP-UX Single user mode:

HPUX> boot vmunix -is
Work is life, you know, and without it, there's nothing but fear and insecurity.
Aungshuman Paul
Regular Advisor

Re: /tmp & /opt extending

Hi,

1. Reboot the system
2. Interupt the auto boot and going to EFI Built-in shell
3. In the shell prompt execute fs0:
4. Then in the fs0:> mode execute hpux -lm for boot the system in LVM maintainance mode.
5. In the LVM mainatince mode execute the following command for extend the LVM and file system.

Extend tmp mount point :

Default is 512 MB. Extend to 10 GB.

#lvextend -L 10240 /dev/vg00/lvol5
extendfs -F vxfs /dev/vg00/rlvol5

Do same for /opt mount point.

Aungshu

If it is helpful, please give me points . :)