LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Accidentally mounted a partition on my whole user account (https://www.linuxquestions.org/questions/linux-newbie-8/accidentally-mounted-a-partition-on-my-whole-user-account-4175445475/)

Googlerez 01-13-2013 09:42 PM

Accidentally mounted a partition on my whole user account
 
Hi there,

I accidentally mounted /sda1 to /home/myUser/ by this command:

sudo mount /sda1 /home/myUser/

Well I accidentally hit enter as I wanted to type a subfolder :( is there any way, I can get back my account myUser files?

Thanks

kbp 01-13-2013 09:51 PM

Code:

sudo umount /dev/sda1
When you mount a filesystem on a directory(mountpoint) the contents of that directory become "hidden" until you unmount the filesystem.

Googlerez 01-13-2013 10:06 PM

Thanks for your reply kbp!

I tried both sudo umount /dev/sda1 and sudo umount /home/myUser/, in both cases, it says:

device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))

I guess, as it's the account's home page, there's no way to release /home/myUser/ ?

I haven't dared to restart my computer, in hope I can get my files back. Please help.

kbp 01-13-2013 10:11 PM

A restart may be your only option, your files are not actually gone or damaged - you may lose any unsaved changes though.

Googlerez 01-13-2013 10:55 PM

Thank you very much. Tonight was one of the best nights in my life. A seeming nightmare ended happily. omG, I love happy endings! :D
The issue is solved.


All times are GMT -5. The time now is 09:16 AM.