Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm new to Ubuntu so don't know much about partitions. I have a 320Gb Hard-drive on a HP DV6 i3 2150us.

When I was installing Ubuntu I gave 100 Gb to /tmp mount point thinking that it would be a place other than home to save data. However I can't save data in /tmp . I don't know about /tmp or what it is used for and would be grateful if someone could provide a link.

Also if anyone could tell me how to convert it into some other format that I would be able to save data on I would be very grateful.

share|improve this question
add comment

1 Answer 1

The directory /tmp is, as name might indicate, for temporary files. Do not store any data there, as it can be removed. Also, you probably do not need 100 Gb for temporary files.

  1. Remove the /tmp entry from /etc/fstab. That way, /tmp will be just on the root partition (the one with the system files), and you will be able to use your 100 Gb partition for something else.

    To do that, open a terminal and type

    sudo cp /etc/fstab /root/fstab.backup
    

    This makes a backup of your current fstab, should anything go wrong.

    gksudo gedit /etc/fstab
    

    Locate the line containing /tmp and replace /tmp with /data. Save the file.

  2. Make sure that /tmp has the correct permissions:

    sudo chmod a+rwxt /tmp
    
  3. Create the mount point for data:

    sudo mkdir /data
    

Now, your 100GB partition will be mounted under /data, and the contents of it will not be removed.

To use it as user, you need to give yourself permissions to write on this partition. For example, create a directory and change it's ownership to "muhammad" (assuming that is your username):

sudo mkdir /data/Videos
chown -R muhammad:muhammad /data/Videos
share|improve this answer
    
+1 good answer but wouldn't it be better to reclaim the 100GB for /home? –  Tom Brossman Oct 3 '12 at 7:55
    
on first line for making backup it first gave the eror cp : target 'root/fstab.backup' is not a dircry . i tried again then it gave the eror cp: missing destination file operand after '/etc/fstab /root/fstab.backup'. then i skiped this line and followed the other lines . all goes fine . oh the last line for changing ownership it gave the Error chown : changing ownership of '/data/videos' : operation not permitted . now what i should do ? –  Muhammad AYUB Khan BALOUCH Oct 3 '12 at 9:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.