Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I copied some things to the /data folder on my ubuntu 10.04. After restarting all the data was gone. After some investigation I figured out that automount was using the /data folder (it appeared in lsof | grep /data and /etc/auto.master contains /data entry ), which I completely forgot about. Now, I have two questions:

1) Is there a way to recover my data or has automount deleted it?

2) df -h tells me that my / partition has 1.3 GB free while I am sure it had 3 GB before I copied the stuff to my /data folder, and the "missing" 1.7 GB seems exactly right for the size of my copied stuff. Where would this data be moved to (i.e. this would answer 1) and how do I get my 1.7 GB back?



my /etc/auto.master

/projects       yp:auto.projects
/users          yp:auto.users

my /etc/fstab

proc            /proc           proc    nodev,noexec,nosuid 0       0
UUID=21f6ee12-734a-4d3f-a23a-079c2a5381c6 /               ext4    errors=remount-ro 0       1
UUID=50b83a82-f894-409e-939d-1908ca8aacf1 /boot           ext3    defaults        0       2
UUID=afac7a83-2fc4-410a-a2ea-06f3eb7ce0d5 /home           ext4    defaults        0       2
UUID=4a5ae91c-89fb-4d3e-ba51-81896d61dae3 none            swap    sw              0       0
share|improve this question
Your data should be fine. Please post the contents of your /etc/fstab, manually mounting the partition should work. If you also post your /etc/auto.master file, I should be able to help you get it setup correctly. – terdon Jan 7 '13 at 13:09
@terdon Thanks, I added these details – user1939941 Jan 7 '13 at 13:13
up vote 1 down vote accepted

First of all, the automount service is mounting a folder from your NIS (hence the yp:) to /data. If you copied your files to /data while the autofs service was running, then your files are now on whatever server was exporting to /data.

If the service was not active when you copied and it is now, then your files will not be visible as /data now points to a remote folder. So, stop the autofs service:

sudo service autofs stop

Check if your data is there:

ls /data

If it is and everything is in order, change your auto.master file to NOT use your /data folder then restart the autofs service:

sudo service autofs restart
share|improve this answer
Thanks.. I was sure I tried this first, but I must have screwed it up. It does work now and my stuff is indeed intact in /data (the remote server was not connected at any point) – user1939941 Jan 7 '13 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .