View Single Post

   
  #6 (permalink)  
Old 02-19-2008, 10:57 AM
David
 
Posts: n/a
Default Re: 2nd hard disk setup

G. Smith wrote:
> Hi, I'm running 9.1 and I'd like to use 2 hard disks. On the first, there
> would be the system, and /home would be on the 2nd.
> But I receive an error message.
> /home is still on the 1st disk. Can anybody tell me how to move that
> directory on hdb1?
>
> My /etc/fstab:
>
> none /proc proc defaults 0 0
> /dev/hda1 / ext3 defaults 1 1
> /dev/hda2 swap swap defaults 0 0
> /dev/fd0 /mnt/floppy auto noauto,user 0 0
> /dev/sr0 /mnt/cdrom iso9660 noauto,user,ro 0 0
> /dev/sr1 /mnt/cdrw iso9660 noauto,user,ro 0 0
> /dev/hdb1 /home ext3 defaults 1 2


You need to copy the contents of /home to the new disk. Login as
root to do this.

mkdir /new
mount /dev/hdb1 /new # use correct device.

cp -a /home/* /new
# DO NOT copy /home since you will still have a /home directory
for a mount point to the new disk you only want the files and
directories copied to the new disk/partition.

umount /new
mv /home /home-old # save files until your sure things
# are working properly.

mkdir /home # make new mount point for /home

Now if you have your /etc/fstab configured for the right device
/home should reside on the new disk but you will have to either
reboot or remount /home before the changes will take affect.

When done and everything is working you can delete the /new and
/home-old directories to free up disk space.

--
Confucius: He who play in root, eventually kill tree.
Registered with The Linux Counter. http://counter.li.org/
Slackware 9.1.0 Kernel 2.4.26 SMP i686 (GCC) 3.3.3
Uptime: 6 days, 14:01, 3 users, load average: 0.28, 0.17, 0.18
Reply With Quote