Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

Thanks

EDIT:

my /etc/auto.master

/data           yp:auto.data
/homes          yp:auto.homes
/projects       yp:auto.projects
/services       yp:auto.services
/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

1 Answer 1

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

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.