- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to reduce the temp directory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 06:26 PM
01-27-2005 06:26 PM
How to reduce the temp directory
We have 2GB /tmp directory.I need 1 gb space from temp directory.How to reduce the temp dirctory.
Pls give the procedure to reduce the temp directory.
Regards,
Suresh,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 06:38 PM
01-27-2005 06:38 PM
Re: How to reduce the temp directory
if you just want to clear some space delete some files. The command
"du -sk * | sort -krn" should help you identify what to delete.
If you want to shrink the /tmp lvol to free up space in the vg bring the machine to single user mode and do a lvreduce. This will destroy data!
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 06:52 PM
01-27-2005 06:52 PM
Re: How to reduce the temp directory
1. reboot the machiine
2. stop at ISl and go to single user mode
ISL>hpus -is
make sure /tmp is not mounted.
bdf /tmp
#lvreduce -L 1000 /dev/vg00/lvol6 (in standard hpux installation /tmp is lvol6 but double check before running this command)
#newfs -F vxfs /dev/vg00/lvol6
#shutdown -r now
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 06:57 PM
01-27-2005 06:57 PM
Re: How to reduce the temp directory
As this is a tmp directory, I'll assume no one is putting anything in there they want to keep. In this case, you can run:
find /tmp -mtime +7 -exec rm {} \;
which will delete files over a week old.
It's a good idea to have this running as a cron job.
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 07:12 PM
01-27-2005 07:12 PM
Re: How to reduce the temp directory
Determine which lv mount to /tmp
[server1:/imap] bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 174928 29672 85% /
/dev/vg00/lvol1 298928 74240 194792 28% /stand
/dev/vg00/lvol8 4710400 1945920 2743008 42% /var
/dev/vg00/lvol7 1245184 1170904 74280 94% /usr
/dev/vg00/lvol4 204800 153712 50960 75% /tmp
/dev/vg01/lvprd 3223552 2403015 769302 76% /prd
#lvextend -L 1024M /dev/vg00/lvol4
========note===========
lvol4 mount to /tmp
=======================
#fsadm -F vxfs -b 1024M /tmp
that all.
tienna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 07:31 PM
01-27-2005 07:31 PM
Re: How to reduce the temp directory
It must be (I just test on my system)
[server1:/tmp] fsadm -F vxfs -b 150M /tmp
vxfs fsadm: /dev/vg00/rlvol4 is currently 204800 sectors - size will be reduced
[server1:/tmp] lvreduce -L 150M /dev/vg00/lvol4
Warning: rounding up logical volume size to extent boundary at size "152" MB.
When a logical volume is reduced useful data might get lost;
do you really want the command to proceed (y/n) : y
Logical volume "/dev/vg00/lvol4" has been successfully reduced.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Sorry for misorder.
tienna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 07:51 PM
01-27-2005 07:51 PM
Re: How to reduce the temp directory
I need to reduce temp directory as well as i use that space to create new logical volume.Pls give me procedure.
Regards,
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 08:15 PM
01-27-2005 08:15 PM
Re: How to reduce the temp directory
--sunil's answer--
make sure /tmp is not mounted.
bdf /tmp
#lvreduce -L 1000 /dev/vg00/lvol6 (in standard hpux installation /tmp is lvol6 but double check before running this command)
#newfs -F vxfs /dev/vg00/lvol6
#shutdown -r now
---
After the shutdown create a new logical volume.
# bdf
/dev/vg00/lvol3 255253 148390 81337 65% /
/dev/vg00/lvol1 95701 35337 50793 41% /stand
/dev/vg00/lvol7 648643 448888 134890 77% /var
/dev/vg00/lvol6 700691 486743 143878 77% /usr
/dev/vg00/lvol5 255253 1770 227957 1% /tmp
/dev/vg00/lvol4 1001051 515983 384962 57% /opt
on my system the new logical volume would be 8
# lvcreate -L 1000 -n lvol8 /dev/vg00
# newfs -F vxfs /dev/vg00/rlvol8
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 08:19 PM
01-27-2005 08:19 PM
Re: How to reduce the temp directory
create a new mountpoint
# mkdir /new_mount_point
add the new logical volume to the /etc/fstab
/dev/vg00/lvol8 /new_mount_point vxfs 0 2
# mount -a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 08:37 PM
01-27-2005 08:37 PM
Re: How to reduce the temp directory
I can't umount the temp directory.
I got the following error.
umount:can not umount temp dirctory :device busy
Umount:return error=1
I used umount commant in root login and i opend only one telnet session.
Regards,
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 08:44 PM
01-27-2005 08:44 PM
Re: How to reduce the temp directory
/tmp is nearly always in used.
That's why shutdown to single user was advised to perform this operation.
regards,
Thierry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 08:48 PM
01-27-2005 08:48 PM
Re: How to reduce the temp directory
# shutdown -h -y now
boot into single user mode.
or you can try to kill the processes using /tmp
# fuser -k /tmp
# umount /tmp
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 08:58 PM
01-27-2005 08:58 PM
Re: How to reduce the temp directory
alternatively if you have some free space in vg00 you can create one new 1Gb file system and then change fstab to moutn this new fs to /tmp and then reboot.
After boot up /tmp wll be 1 gb and now you can remove or reduce old /tmp filesystem
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2005 09:28 PM
01-27-2005 09:28 PM
Re: How to reduce the temp directory
your profile shows that you have assigned points only for 17 responses out of 150.
http://forums1.itrc.hp.com/service/forums/publicProfile.do?userId=CA999444&forumId=1
if you are assigning points then only the other members come to know their solutions were valuable and how much it helped to solve your problems.
see the link
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
regds,