Operating System - Linux
1753865 Members
7631 Online
108809 Solutions
New Discussion юеВ

How to increase the /tmp size in suse10

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to increase the /tmp size in suse10

Hi All,

My existing /tmp having less space.

Ex:

# dh -h
/dev/sda9 1.1G 460M 569M 45% /tmp


Now I would like to increase the /tmp space


How to do that?

14 REPLIES 14
Matti_Kurkela
Honored Contributor

Re: How to increase the /tmp size in suse10

The disk device name /dev/sda9 indicates your system is not using LVM, so extending the partition may be rather complicated.

Please show the output of "fdisk -l /dev/sda". Planning a non-LVM partition extension is not possible without knowing the layout of the partitions on the disk.

MK
MK
senthil_kumar_1
Super Advisor

Re: How to increase the /tmp size in suse10

# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 514048+ 83 Linux
/dev/sda2 65 195 1052257+ 82 Linux swap / Solaris
/dev/sda3 196 326 1052257+ 83 Linux
/dev/sda4 327 3916 28836675 f W95 Ext'd (LBA)
/dev/sda5 327 849 4200966 83 Linux
/dev/sda6 850 1241 3148708+ 83 Linux
/dev/sda7 1242 1437 1574338+ 83 Linux
/dev/sda8 1438 1699 2104483+ 83 Linux
/dev/sda9 1700 1830 1052226 83 Linux
/dev/sda10 1831 3916 16755763+ 83 Linux



Can we do this through single user mode or rescue mode?
Tim Nelson
Honored Contributor

Re: How to increase the /tmp size in suse10

from your fdisk info the sda drive is completely allocated

either delete any/some unused partions or find another disk, partition it for /tmp use and move your data.

/tmp indicates temporary , so I have to ask the question.. why not just delete stuff ?

most servers may/will delete all files in /tmp on reboot anyway.

maybe move some of these "temp" files to some different filesystem ?

you still have 600MB free, how much more do you want ?
senthil_kumar_1
Super Advisor

Re: How to increase the /tmp size in suse10

Hi Tim,

My application requires 8GB of free space in /tmp.

So I need to make /tmp to have atleast 8GB.

I have one disk /dev/sdb with 10GB and I have created 8GB partition (/dev/sdb1) and filesystem also created using the command "mkfs".

Now can I follow below stpes to mount the disk (/dev/sdb1) as /tmp.

1)Copy all existing data from /tmp to any other place.

2)unmounting /tmp

# umount /tmp

3)mounting /dev/sdb1 to /tmp

#mount /dev/sdb1 /tmp


Are the above steps correct?
Tim Nelson
Honored Contributor
Solution

Re: How to increase the /tmp size in suse10

yes that would work.

or something like below

mount /dev/sdb1 /newtemp
cd /tmp
cp -rp * /newtemp/
cd /
umount /newtemp
umount /tmp
edit /etc/fstab to reflect /dev/sdb1 as /tmp
mount /tmp

another thought, as other temp files are mixed into /tmp you may also be able to mount your new disk somewhere else and change the application to write its "temp" files to there ?

I say that for two reasons.
1) Many parts of the OS depend on /tmp and its world-writable permissions
2)some people, like myself, will delete EVERYTHING in /tmp if there are filesystem full issues.



Tim Nelson
Honored Contributor

Re: How to increase the /tmp size in suse10

one more comment..

1) in order to un-mount the old /tmp your application cannot have any open files ( e.g. shutdown application)
Alan_152
Honored Contributor

Re: How to increase the /tmp size in suse10

A gpartd livecd "might" help shuffle the partition sizes around so that you can free up enough space for /tmp. However, you might have better luck installing another disk drive, flash card, or usb stick and mounting /tmp to it instead.
senthil_kumar_1
Super Advisor

Re: How to increase the /tmp size in suse10

Hi All,

I am not able to umount /tmp.

I have used following steps by root


# runlevel
N 5

# cd /tmp

# ll
total 0

# cd /

# fuser /tmp

# fuser -k /tmp

# umount /tmp
umount: /tmp: device is busy
umount: /tmp: device is busy

# df -h
/dev/sda9 1.1G 33M 996M 4% /tmp


Actually I would like to mount the different partition (/dev/sdb1) to /tmp, but /tmp is already mounted with some other partition (/dev/sda9), so that I have ummounted /tmp , but It did not succeeded.

Shall I try this from runleve 1?

How to solve this issue?
TTr
Honored Contributor

Re: How to increase the /tmp size in suse10

> My application requires 8GB of free space in /tmp

Can you tell this application to use a different temp? Maybe through the $TMPDIR variable or something similar. Check within the application if you can redifine temp. You can then mount the new disk and use that for the application new temp.