LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-03-2004, 10:28 AM   #1
pupton
LQ Newbie
 
Registered: Sep 2004
Posts: 14

Rep: Reputation: 0
Question RedHat 9 - add new disks to server


Setup Redhat 9 on a 10gb disk. I have a spare set of 60gb disks that I would like to install in this server, mirror and move my home folder to the new disks.

Any pointers???
 
Old 10-22-2004, 04:09 PM   #2
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
mirroring i dont know about, but i do know about copying your home directorys to a new partition:

install the new disks on your machine, then check to see where you have them installed, for instance, you can list your /etc/fstab file and look at what harddrives are connected, and look at which ones are also by doing df-h

any harddrives listed either of those places are not connected (most likely)

therefore your new harddrives are at the next addresses

hda1

this is harddrive 1 on the primary IDE cable

hdb1
is the first harddrive on the secondary ide cable

once you know their addresses on the box, make a directory in the /mnt folder

mkdir /mnt/temp

then run the following command, substituting the harddrives address at the end
fdisk /dev/hda1
then specify the partition size and such there, not too hard
make sure to save your fdisk using the "write out" or somthing like that (i think its w at the fdisk prompt)

reboot your machine when you are done running fdisk on all of your drives

then format the drives using either the ext2 or ext3 filesystem (either will work, and there isnt much difference as far as performance or anything)

/sbin/mkfs.ext3 /dev/hda1

(remember to substitute hda1 for whatever your harddrive address actually is)

then mount one partition that you want to make the /home directory to /mnt/temp

mount /dev/hda1 /mnt/temp

then copy the information from the home directories to the new harddrive temporarally mounted at /mnt/temp

cp --preserve=ownership -r /home/* /mnt/temp
(if you are running this as root and it starts asking you "descend into directory", do control+c and type in "unalias cp", then try again)

after this is done, verify it was copied correctly, under the /mnt/temp should be

user1/
user2/

(whatever the usernames are)

then remove the stuff from the current /home directory by running
rm -r /home/
(if you are running this as root and it starts asking you "descend into directory", do control+c and type in "unalias rm", then try again)

then unmount /mnt/temp by running
umount /mnt/temp

then open up your /etc/fstab file with an editor (edit or nano are good ones that i use)

and go to a new line and add the following (note (tab) needs to be substituted for a tab and hda1 needs to be substituted too)

/dev/hda1 (tab) /home (tab) auto (tab) defaults (tab) 1 (space) 1

then run
mount /home
and cd /home

do an ls and see if everything worked out ok
one thing to check is the permissions and owners of folders and such

if you get no errors on mounting and things like that, then your perfect

restart to make sure of no problems, and your done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
disks/raid type on redhat 9.0 ileong Red Hat 1 10-15-2004 08:05 AM
Linux Server Disks ptreves Linux - Newbie 6 08-16-2004 11:25 AM
newbee: redhat/xp and disks and superblocks RSD123 Linux - Newbie 3 02-17-2004 03:46 PM
IBM ESS Shark SAN disks, how to add without rebooting? tells Linux - Hardware 1 12-06-2003 11:24 AM
How do I create redhat 8.0 recover disks? mafy68 Linux - Newbie 5 06-13-2003 02:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration