2

I have made a directory: sudo mkdir /ssd, the directory was supposed to be mounted to a raid array called md3. This was done by adding /dev/md3 /ssd auto defaults 0 0 to fstab. Then after a while where I had used the directory, I realized that I had forgotten to run sudo mount -a - and then I did, and now the data is gone. I tried to uncomment the line in fstab and run sudo mount -a but that didn't get back my data. What can I do!?

CONTENT OF FSTAB:

proc /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/md/0 none swap sw 0 0
/dev/md/1 /boot ext3 defaults 0 0
/dev/md/2 / ext4 defaults 0 0
/dev/md3  /ssd  auto   defaults  0 0

1 Answer 1

3

Unmount that filesystem and the files should be right where you left them.

First, type sudo umount /ssd, making sure that you are not currently working in that directory, to avoid "Directory in use" errors.

Then move the files in that directory to a safe place.

Finally, remount your filesystem with sudo mount -a.

12
  • What exactly do you mean by unmount? Should I run something like: sudo umount /dev/md3 ? Nov 30, 2012 at 3:38
  • First, please copy and paste the output of mount (without the -a switch) so I can see exactly what you're talking about.
    – platforms
    Nov 30, 2012 at 3:42
  • Okay done, see my update :-) Nov 30, 2012 at 3:44
  • You probably just mounted a filesystem at the same mount point that your files are in. They were likely just obscured when you mounted the filesystem with mount -a.
    – platforms
    Nov 30, 2012 at 3:44
  • Okay, but then what command should I use to get them back? I'm a little afraid of doing something wrong here Nov 30, 2012 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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