Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/tmp not enough disk space - need to link to another mount point

Status
Not open for further replies.

linuxtricks

IS-IT--Management
May 24, 2000
111
US
Hello all,

One of my colleagues is trying to perform an 'alter table' command in mySQL which copies/stores files in [red]/tmp.[/red]

When he executes this command, it tends to write a very large file in /tmp - thus running out of disk space.

I have been brain storming for a way to make it so:
[red]/tmp is a link to /usr/tempstuff[/red]. So when something is written in /tmp - it actually gets written to /usr/tempstuff (which has plenty of free disk space).

I tried using the 'ln' command... but because /tmp exists already, it cannot overwrite the directory/mount point.

I started to think about 'temporarily' unmounting /tmp then creating a symbolic link so that anything attemping to write to a new /tmp would really go to /usr/tempstuff.

Will this work? Does the core of the system need to have /tmp mounted all the time. Will I break any system dependancies in doing this?

I apologize if I didn't explain this too well.

Many thanks for any suggestions/workarounds.
I HATE BEING A NEWBIE!
-grumpy smurf
 
I personally never like to play much with /tmp.

I have increased the size previously of my tmp partition and did this by installing a new drive and mounting this as tmp, rather than mounting the partition originally "mapped" to tmp...

--
Ash

AV
tnedor@yahoo.com
 
Unfortunately, adding a new hard drive is not an option for me right now.

Do you know another possible route I take to solve my problem?

Many Thanks! I HATE BEING A NEWBIE!
-grumpy smurf
 
Is ther room elsewhere on the drive? Also, is the problem disc space or running out of inodes. If there is room on the drive, mv the tmp directory to a different name and then rename a the mount point you want to use. Remember to make the change in the fstab file in the etc directory. The only othe option is to create room by moving all information off of one filesystem an use a partition program to repartition the drive. This is very dangerous and should only be done as a last resort and you MUST know what you are doing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top