Click to See Complete Forum and Search --> : 2nd hard drive installed, but can't mount
I mounted my 2nd hard drive as hdc1. My whole reason for adding another hard drive was because when it seems my root partition was full, so I wanted to mount /usr and /var to this 2nd hard drive.
However when I try to unmount /usr or /var to mount them to the new hard drive I get a message telling me: device is busy.
Is there a way to get around that?
-D.
Oh, I'm running RH 7.1, btw.
Thanks,
-D.
scinerd
06-01-2003, 09:24 PM
you realy can't unmount /var/ and /usr when the machine is running. this is because there are a lot of process using file in /usr or /var. for example /var/run is where a lot of process keep there id. to umount the filesystem you would need to kill all process using the filysystem. But I can't see you unmount these and the system working in anything other then single user mode.
retsaw
06-01-2003, 09:24 PM
I don't know if there is a way round the divice is busy problem (there probably is, but I don't know it). What you could do is mount your new partitions somewhere else, copy /usr and /var to the new partitions, edit your fstab file so /usr and /var point to your new partitions and reboot.
michaelk
06-01-2003, 09:39 PM
Mount new drive and copy everything.
Use the 1st install CD to boot to rescue mode. Mount the / partition if required and use vi to change your fstab. Reboot
Hopefully I'm not butchering this more than it needs to be...
I made the change to fstab using recovery mode (thanks for that tip) and rebooted.
When I logged in as root I saw a number of 'bash' errors and I realized that things were looking for /usr when it is no longer there, so I created a symlink from /usr to /mnt/drive2/usr (the new mount point).
The problem now is that I receive an error message during boot: "mount point /mnt/drive2/usr does not exist".
I know that directory exists and it shows up when I type 'df'.
Why would it say that the mount point doesn't exist?
-D.
psi42
06-01-2003, 11:47 PM
in fstab, you need to set the mount point to /usr
Hmm... how would /dev/hda5 (/usr stuff) be mounted to my 2nd hard drive (/mnt/drive2) if the mount point is /usr?
-D
michaelk
06-02-2003, 05:01 PM
mounting /dev/hdc5 (or whatever it is) to /usr is no different then mounting the floppy drive ie. /dev/fd0 to /mnt/floppy.
fstab example:
/dev/hdc5 /usr fstype defaults 1 2
sploo22
06-02-2003, 05:12 PM
What you need to do first is decide on where you want the new disk to be mounted, and mount in a temporary location. Then, copy across the files from e.g. /usr to the new disk. Then, in single user mode, move /usr to a backup location just in case and mount the new disk on /usr. Once everything works properly, you can remove the backup copy of /usr and free up all than nice, juicy disk space! ;)
Ok, thanks Michaelk. Your example helped me better understand the way mounting works.
I know I'm almost there... I copied over /usr to the new hard drive. But the mounting is still off...
In fstab I have:
/dev/hdc1 /usr ext defaults 1 2
But this just mounts the entire hard drive to /usr.
What I really want to do mount the usr diretory from the 2nd hard drive to /usr (so that I may also copy /var stuff to the 2nd hard drive).
/dev/hdc1/usr /usr gives me errors.
Is there a way to do this or do I have to format a seperate partition on the 2nd hard drive for each directory I want to mount to it?
example:
/dev/hdc1 (containing /usr stuff) /usr ?
/dev/hdc2 (cotaining /var stuff) /var ?
Originally posted by dt23
or do I have to format a seperate partition on the 2nd hard drive for each directory I want to mount to it? Yes, that's how it's done.