General
cancel
Showing results for 
Search instead for 
Did you mean: 

/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
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
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.
Horia Chirculescu
Honored Contributor

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

Would be better to shutdown and reboot into single user mode in order to extend that file system (another process could need access to the /tmp filesystem just afther you have killed all the daemons have files in use)

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

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

Hello Horia,
Would you like me to tell me commands ?

Regards,
Horia Chirculescu
Honored Contributor

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

In order to list open files that resides on /tmp file system, you can use:

lsof |grep /tmp

A lot of daemons have sockets that are located on /tmp. So you must log in single user mode (hpux -is at ISL prompt).

Horia.
Best regards from Romania,
Horia.
Horia Chirculescu
Honored Contributor

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

>Would you like me to tell me commands

You must restart the server. Stop first the running applications!

Reboot.
At the prompt press any key with 10 sec / Press a key

: bo pri
Interact with IPL : Y
hpux -is

Then, when the server is up,

mount /usr
lvextend -L 500 /dev/vg00/lvol4
extendfs -F vxfs /dev/vg00/rlvol4

(
if can not be found the executables, then run those with absolute path:

/usr/sbin/lvextend ...
/usr/sbin/extendfs ...

)
Restart again and boot normally.

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

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

Horia,
I am using my server remotely (through telnet). How can I press into this.

Regards,
Horia Chirculescu
Honored Contributor

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

>I am using my server remotely (through telnet). How can I press into this.

Well, you life just got complicated if you do not have MP access. (Does those words tell anything to you: MP access, iLO access?).

If you can establish a MP connection, you can go forward, but if not, you must get physical access to the server.

There is another way but I am not sure you can install onlineJFS.

According to:

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B3929CA

This is for HP_UX 11.11 only and it is not free.

Horia.
Best regards from Romania,
Horia.
Bill Hassell
Honored Contributor

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

Single user mode requires access to the console. Your server's console port must be connected and configured to a LAN in order to work in single user mode. If you are not located close to the server (and the console is not connected), someone will have to perform the steps on the computer on your behalf.

Assuming that the server was not set up for remote management, there are a number of steps that will have to be done. There are two methods:

1. In the computer room, find a terminal with the proper null-modem cable and connect the terminal to the console port of the server. Or someone can bring in a laptop (older model that has a real serial port, or a laptop with a USB to serial converter) and connect to the console port. There are a bit more details that depend on what model of HP server you have.

2. Once connected to the serial port, set the terminal or laptop to 9600/8/N/1 and type CTRL-b to set the maintenance processor's prompt. Now you can see and set the console port's IP address, subnet and gateway values.

3. Connect the console LAN port to the network, ideally a special network reserved for maintenance (to improve security). Then test that the settings work by accessing the console port remotely.

Once you can connect to the console, you'll need to read a bit about the console commands to leave the processor maintenance processor and connect to the HP-UX console. The details depend on the model of your server. Now you are ready to shutdown and reboot into single user mode.

Or as mentioned above, you can stop all the applications and use fuser to find all the open files and terminate the processes that use them. Once that is done, you can umount /tmp, use lvextend followed by extendfs (on the raw lvol) and then mount /tmp.

Note that none of this required if you had purchased the OnlineJFS product which allow resizing of /tmp without single user mode.


Bill Hassell, sysadmin
Zishan
Regular Advisor

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

I have MP access and I am on "[mphost] MP>" now pls tell me what shall I do next (which command)

Regards,
Horia Chirculescu
Honored Contributor

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

>I have MP access and I am on "[mphost] MP>" now pls tell me what shall I do next (which command)

Good.


You must access the console. Do it by issuing

co

command.

Login then stop your application.

Then restart your server (shutdown -r -y 0).

After that you must perform the steps from above (At the prompt press any key with 10 sec / Press a key... and so on...)


And read the docs/help related to MP commands! You will need this info for the future.


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

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

Hello,

I am unable to commecnt with CO. Invalid login in password. The username password of MP and CO are not the same ??? Is there any default password for CO?

Regards,
Horia Chirculescu
Honored Contributor

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

You must log into your system using root credentials.

Horia.

Best regards from Romania,
Horia.
Horia Chirculescu
Honored Contributor

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

.. or any other user you are using on your HP-UX server and then su to root if you prefer this approach.

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

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

I connect to CO with root user

>Login then stop your application.

Pls tell me how to stop my application (command).

Regars,
Horia Chirculescu
Honored Contributor

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

"application" means any application you are running on your server.

Any application have specific requirements and must be stopped according to those requirements. You should know the applications running on the server. Ask someone who knows better your server - maybe an application administrator ?)

Failing to properly close your applications can lead to loss of data, and even can render your applications on some inconsistent state.

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

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

Hello horia,

I have only 10g database is running on this server. Although this is Application Administrator job but I am the only person who know little bit unix where so thats y i am asking from you :)Kinldy tell me
- how to view and stop the all application this is a testing server I can stop any application.

Regards,