2

I have been searching for a about a hour but I can't find a answer if someone knows another thread that will help I would gladly look through it.

So what happened is I am learning about how to mount and un-mount. I have done what I am guessing is a very nob mistake by mounting a USB to my /home and lost all the sub dir under /home. This is a new install of Linux but old enough i don't want to reinstall (if i don't have to).

I plugged in and removed the use be a few time to know what was the USB drive. Then I mounted it to the home. I found that all my sub-dir were gone. From what I have read it seems that all you needed to do is umount the USB and everything would be as it was before. Well. . . . didn't really work out that way. I even tried to recreate the dir but I is telling me it has a Input/Output error. I am thinking that this is because the OS still thinks that the drive is mounted to that dir.

2
  • What is the output of mount like? Commented Aug 29, 2014 at 0:41
  • sudo umount /home should do it. If not, sudo reboot and you should be fine. Commented Aug 29, 2014 at 0:47

1 Answer 1

5

Unplugging the USB device is not the same as unmounting it. The system still thinks it's there. You may be able to unmount it still:

umount /home

Have the device plugged in when you do that.

Everything could well be tied up in knots, depending on what else you've done in between times, and umount might give you errors. In that case, just reboot the machine. When it comes back up it won't remember this mount and everything will be visible again.


When you mount something at a mount point: mount /dev/sda /mnt/point the contents of the device you mount /dev/sda appear under that directory tree /mnt/point. Usually you'll use an empty directory as the mount point, but if you don't (as here) then the original contents will be masked by the other device. The contents are still physically stored on the disk, and in fact you're unable to touch them while they're hidden by the mount - nothing can happen or have happened to them - but what you see there is what's on the device instead.

2
  • I guess I broke the first rule of all tech trouble shooting. "Did you turn if off and on again?" lol I feel kind of dumb the reboot fixed it and everything is back to normal. I think that I will make a dir of my own to play around with and stop messing with the core files till I know what I am doing a little more. Commented Aug 29, 2014 at 1:51
  • @JordanHousewright most folks have (or make) a dir called /mint for sporadic mount/umount use Commented Sep 16, 2014 at 23:33

You must log in to answer this question.

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