I've got questions about how the Linux mount
command works when used multiple times.
Through an unfortunate series of events (multiple crashes in Ubuntu), I've decided that I wish to simply back up my data and start afresh. So, after booting with a bootable USB, I have thus far mounted an external disk and the first partition of two which I wish to back up. However, I noticed something odd. After some difficulties, I found that I was able to mount the two drives with the following command line:
sudo mount /dev/sdxx /mnt
replacing the "xx" with the correct letter and number. I first mounted the partition to be backed up, and then navigated to the home directory in that drive (the one I needed to back up). I then opened a second terminal window and mounted the external disk. I've been led to believe that the /mnt
bit at the end of the command line tells the computer in which directory I wish to mount the drive; this would explain why the /mnt
directory now has only the stuff from the external disk. However, in my first terminal window, I was still able to navigate around the 1st drive I mounted, even though the path (/mnt/home/user/
) no longer existed, according to the second window.
- Why does the first terminal window still allow me to navigate around what appears to be a non-existent directory?
Furthermore, I've started backing up the files to the external drive by using a simple zip command, run from the first terminal within the directory containing everything which I need to back up: zip -r9 /mnt/backup.zip *
. It seems to be doing fine; the second terminal is showing the partial zip file growing in the /mnt
directory on the external disk.
- Is there any reason that you would expect this to go wrong at any point whatsoever, or is this perfectly logical behavior?