difference between mount point and physical drive?
Stefan Jeglinski
yellowdog-general@lists.terrasoftsolutions.com
Thu Oct 24 11:27:01 2002
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