LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   question about mounting a new hd (https://www.linuxquestions.org/questions/slackware-14/question-about-mounting-a-new-hd-385485/)

sunman 11-22-2005 08:38 AM

question about mounting a new hd
 
I've been a slack user for a few months now, it's the first and only linux distro I've ever used and I've been very happy with it. I'm still learning things, actually I suspect I always will be learning with linux, and I had a maybe silly question about what happens if you mount a new drive. Let's say I've been using a single partition for running slack and I have data in the /home directory under my user account. So I add a new hd to the system and mount it to /home, what would happen to the data that's already located in /home on the first hd? This is purely just a curiosity question, if I was to actually install a new drive I'd backup the data and move it to the new drive before mounting it so, I was just wondering.

Jeebizz 11-22-2005 08:56 AM

Thats an interesting question, and I am no expert either, but I would assume it would not override any files already in the /home directory, but things might get a little messy, with all the current directories and files in home, in addition to the new files from that drive. I would say still go ahead and mount it to your /home , but maybe create a sub-directory for that drive, such as /home/newdrive or something to that sort, only make sure you update your fstab accordingly to your new drive, so you can mount it.... This is just a guess mind you, but I hope I have provided some kind of insight (though I don't know what) maybe someone with more exp. can clarify this issue.. :)

keefaz 11-22-2005 08:57 AM

From man mount :
Code:

The standard form of the mount command, is
              mount -t type device dir
      This  tells the kernel to attach the file system found on device (which
      is of type type) at the directory dir.  The previous contents (if  any)
      and  owner  and  mode of dir become invisible, and as long as this file
      system remains mounted, the pathname dir refers to the root of the file
      system on device.

I never really tested it, but I believe the content of the directory will disapear like
the man page says

dannyk1 11-24-2005 12:20 AM

I read somewhere that if you want to use an extra drive for your home dir (eg you have outgrown your existing drive), install the new drive, format it, and then mount it some where tempory like /mount/temp and then copy the entire contents of your /home drive to the new /mount/temp. Then modify the fstab so the new drive will appear as your home with all your existing data there ready to use.

migs 11-24-2005 02:13 AM

Quote:

Originally posted by keefaz
From man mount :
Code:

The standard form of the mount command, is
              mount -t type device dir
      This  tells the kernel to attach the file system found on device (which
      is of type type) at the directory dir.  The previous contents (if  any)
      and  owner  and  mode of dir become invisible, and as long as this file
      system remains mounted, the pathname dir refers to the root of the file
      system on device.

Code:


I never really tested it, but I believe the content of the directory will disapear like
the man page says
did it before myself, (before i knew about that) and got the shock of my life when 200 megs seemed to disappear.

i just mounted the new drive to another directory under /mnt after the shock wore down, and my brain started kicking in again.


All times are GMT -5. The time now is 02:05 PM.