Operating System - HP-UX
1752794 Members
6595 Online
108789 Solutions
New Discussion юеВ

Re: /tmp directory extension help needed!!!!

 
SOLVED
Go to solution
Zishan
Regular Advisor

/tmp directory extension help needed!!!!

Hello All,

Following is my drives on HP server. I want to extent my /tmp directory upto 500 mb. Please guide me how can I do this?

# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 589824 277392 310312 47% /
/dev/vg00/lvol1 327680 118872 207216 36% /stand
/dev/vg00/lvol8 5111808 2061032 3027024 41% /var
/dev/vg00/lvol7 6488064 2533200 3924032 39% /usr
/dev/vg00/lvol9 204800000 39706255 154784480 20% /u01
/dev/vg00/lvol4 262144 262144 0 100% /tmp
/dev/vg00/lvol6 5046272 2780632 2247976 55% /opt
/dev/vg00/lvol5 65536 8720 56440 13% /home
#

Regards,
Zishan
35 REPLIES 35
Horia Chirculescu
Honored Contributor

Re: /tmp directory extension help needed!!!!

Hello,
Go to SAM, in Disks and File systems/Logical volumes

select lvol4 with space key, use tab key and arrow key to select Actions, select Increase Size and if you have space available in VG00, you can set the new size.

Horia.
Best regards from Romania,
Horia.
Pete Randall
Outstanding Contributor

Re: /tmp directory extension help needed!!!!

First check to see if there are free extenst in the volume group: vgdisplay -v vg00

Assuming there are free extents, you then run lvextend followed by umount/extendfs/mount. The lvextend man page has some good examples.

If there are no free extents you will have to expand your vg, either by adding an other disk or increasing the free extents by shrinking the size of some other LV - but that's a daunting task.


Pete


Pete

Pete
Zishan
Regular Advisor

Re: /tmp directory extension help needed!!!!

Hi Horia,

>Go to SAM, in Disks and File systems/Logical volumes

Sorry I am new to Unix pls tell me in steps. It would be appreciate.

Regards,
Matti_Kurkela
Honored Contributor

Re: /tmp directory extension help needed!!!!

Do you have enough free extents in vg00?

vgdisplay vg00

A) If you have OnlineJFS installed, the extension procedure is:

lvextend -L 500 /dev/vg00/lvol4
fsadm -F vxfs -b $(expr 500 \* 1024) /tmp
bdf /tmp

NOTE: the on-line filesystem extension (the fsadm command) may not be succesful if the filesystem is 100% full. Try to free at least a little disk space before starting the procedure.

B) If you don't have OnlineJFS, the procedure requires unmounting /tmp, which may not be possible unless the system is rebooted to single user mode:

lvextend -L 500 /dev/vg00/lvol4
umount /tmp
extendfs -F vxfs /dev/vg00/rlvol4
mount /tmp
bdf /tmp

MK
MK
Zishan
Regular Advisor

Re: /tmp directory extension help needed!!!!

Hi Horia,

I launch the SAM according to your instruction and I have free space available at the end following error occure:

"Logical volume /dev/vg00/lvol4 is currently mounted on /tmp and could
not be unmounted. The LV cannot be extended until the file system is
able to be unmounted. Note that the fuser(1M) command can be used
outside of SAM to help determine what processes and users are
currently accessing this file system."

Any help would be appreciate.

Regards,
Asif Sharif
Honored Contributor

Re: /tmp directory extension help needed!!!!

Salam Zishan,

Please post the below commands output.

1. vgdisplay vg00
2. swlist -l product |grep -i jfs

Regards,
Asif Sharif
Regards,
Asif Sharif
Horia Chirculescu
Honored Contributor

Re: /tmp directory extension help needed!!!!

You should do what SAM instructed you:

>The LV cannot be extended until the file system is able to be unmounted. Note that the fuser(1M) command can be used
outside of SAM to help determine what processes and users are
currently accessing this file system

You could run a

fuser /tmp/*

In order to find out the processes using files from /tmp.

You would get a list of files and some of them would have a PID no. (4 digits)

Let's say that the output would be:

/tmp/dhcpfifo.any: 1208o
/tmp/dhcpfifo.root: 1208o
/tmp/dps.debug:
/tmp/dsk.txt:
/tmp/dsk1.txt:

It means that at the current time, only 1 process with PID: 1208 is using those files from /tmp.

You must kill those processes.
Do not forget to re-start the processes/daemons after you finished your job.


Horia.
Best regards from Romania,
Horia.
Zishan
Regular Advisor

Re: /tmp directory extension help needed!!!!

W/salam Asif,

# vgdisplay vg00
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c3t0d0s2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 1
Max PE per PV 4465
VGDA 2
PE Size (Mbytes) 64
Total PE 4455
Alloc PE 3462
Free PE 993
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
#

# swlist -l product |grep -i jfs
JFS B.11.23 The Base VxFS File System
PHKL_33368 1.0 JFS3.5 direct I/O performance improvement

#

Any help would be appreciated.
Zishan
Regular Advisor

Re: /tmp directory extension help needed!!!!

Horia,
This is my output for "/fuser/tmp*"
# fuser /tmp/*

/tmp/MSV2V3Check_B.11.23.0907_HP-UX_B.11.23_IA_PA.depot:
/tmp/ipv6agt.crashlog:
/tmp/llbdbase.dat:
/tmp/mail-metamail.6789.200:
/tmp/patches11g1:
/tmp/portmap.file:
/tmp/prngd.log:
/tmp/root.errorlog:
/tmp/rpcbind.file:
/tmp/sensor_info:
/tmp/wd_action.dbg:
#

pls guide me how to kill and how to restart the dameon after doing work.
Regars.