difference between mount point and physical drive?

Stephen Lewis yellowdog-general@lists.terrasoftsolutions.com
Thu Oct 24 16:16:01 2002


Its pretty straightforward actually.
When you mount a second device to '/home' it completely
hides the /home that is already there from the first device.
All reads or writes will go to the second device.
Any files you may have written to the first device
(before you mounted the second device) remain hidden
but will come back if you simply unmount the new device.
If you want to see both "/home" directories at the same time
you need to 'mkdir /home2' and then mount the new disk
drive on /home2 instead. Depending upon how you have
been backing up you may have been backing up both
"/home" directories if you backed up the raw devices
but if you backed up at the file level (after mounts)
you have only been backing up the "new" '/home',

Stephen Lewis

> 
> Message: 8
> Date: Thu, 24 Oct 2002 13:27:15 -0400
> To: <yellowdog-general@lists.terrasoftsolutions.com>
> From: Stefan Jeglinski <jeglin@4pi.com>
> Subject: difference between mount point and physical drive?
> Reply-To: yellowdog-general@lists.terrasoftsolutions.com
> 
> Something I did way back when I was a rank newbie (as opposed to
> now 
> - heh heh) has come back to bite me. I have full backups so I'm not
> too worried about hosing something here, but I'd like to avoid it
> if 
> possible.
> 
> I once had Linux on a single hard drive. As I ran out of space I 
> added a second hard drive. I needed the extra space for the /home 
> directory. I ended up mounting that 2nd hard drive under /home
> also. 
> IOW, my fstab had this:
> 
> /dev/sdb7       /               ext2    defaults        1 1 #orig
> drive, part. 7
> /dev/sda2       /home   ext2    defaults        1 1 #2nd drive,
> part. 2
> 
> BUT, I already had a home directory under / on sdb7 of course,
> since 
> that was my original install setup. At that time long long ago,
> this 
> scheme worked and as a newbie I left well enough alone. In fact I 
> forgot about it completely. Until this morning when sda2 started 
> giving me sense errors. fsck /dev/sda2 hangs the box, so I
> commented 
> out the fstab entry for sda2. Upon reboot, I *can* mount /sda2, but
> this disk is pretty much presumed hosed and I need to replace it to
> be safe.
> 
> Anyway, because of my ancient setup of this, all of my files under 
> /home are actually split between the 2 disks (sdb and sda). How,
> from 
> the command line, do I see which files physically reside on one
> disk 
> and which on the another? Related to this question, over all these 
> years that I have been adding files to /home, how did the OS decide
> which drive to put the files on?
> 
> Finally, for restore, I thought I would just physically replace sda
> with another identical drive, mkext2, and untar my /home backup.
> So, 
> related to my question above, how will tar know which physical
> drive 
> to put the stuff on, since some of it came from sdb and some from 
> sda? If it tries to untar it all on sdb, it'll run out of space. If
> it tries to put it on sda, there will be the same files on both sdb
> and sda.
> 
> Can you tell yet I've never understood how this aspect of Linux 
> works? It's time for me to learn, thanks for any prompt responses!
> 
> 
> Stefan Jeglinski
>