LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 12-31-2003, 03:50 PM   #1
gvi
LQ Newbie
 
Registered: Jun 2003
Location: Upstate New York
Distribution: Ubuntu, Unbuntu CE, Kubuntu, Core 7, VMWare on Win32 host
Posts: 6

Rep: Reputation: 0
Need to replace HDD with a larger drive


On a RH9 install a hDD has been filled to capacity. I would like to replace it with a larger one. Add the bigger drive, copy files from small to bigger, remove small, new drive have old drive designation (hdb1 for example).
 
Old 12-31-2003, 04:16 PM   #2
Caeda
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Suse 6.0+, Mandrake 5.0-10.0, Redhat 6.0-9.0, Gentoo 1.2+, Gnoppix, Knoppix, Sabayon, Ubuntu 5.04+
Posts: 1,811

Rep: Reputation: 45
ok, so buy new hard drive, put it in, run partition program. Why did you ask about this?
 
Old 12-31-2003, 04:47 PM   #3
gvi
LQ Newbie
 
Registered: Jun 2003
Location: Upstate New York
Distribution: Ubuntu, Unbuntu CE, Kubuntu, Core 7, VMWare on Win32 host
Posts: 6

Original Poster
Rep: Reputation: 0
the current device is labeled hdb1. I want to copy all the data on it to the new drive, remove the old drive, restart (if neccessary) and have the new drive have same device label, hdb1. I was told it is not as easy a process as it would be in windows. The machine is used as a real audio & shockwave server, so I'am concerned that years of audio files do not get lost or have a bunch of editing to of conf files or whatever, if the device comes up with a label different than hdb1. I'm just starting to work with Linux and am at present depending on help from people who seem to know more than me. Thanks.
 
Old 12-31-2003, 09:36 PM   #4
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
I just did this. So here we go.

Put in new drive and then boot from a bootable Linux CD. I used a Gentoo CD. Make the partitions in the same order as the old one, just bigger maybe. Make your mount directories and then mount the drives. Copy the data over. Shutdown the system. Then take out the old drive and put in the new drive where the old one was.

Goes something like this:

boot, not from the hard drive though.

run fdisk or cfdisk to create your partitions and then create your file system like the old one.

Use mkdir to create the mount points for the drive. mkdir /mnt/old and mkdir /mnt/new should work.

Then copy the stuff over using the command cp -rpv /mnt/old/* /mnt/new/ and then sit back and watch the stuff copy over.

When that is done, shut down and then hook the new drive in where the old drive was. Say a prayer or two, I did. Boot.

Note: you should not copy from a linux system that is running. Some files will not copy over.

I did have a small fstab problem but it did boot just fine. It just didn't mount one of my data drives because I forgot to move that master/slave jumper.

That is sort of basic, questions?

Later

 
Old 01-19-2004, 03:58 PM   #5
kato71
LQ Newbie
 
Registered: Jan 2004
Location: Home of the Indy 500
Posts: 2

Rep: Reputation: 0
Then copy the stuff over using the command cp -rpv /mnt/old/* /mnt/new/ and then sit back and watch the stuff copy over.


I used cp -avR /old-drive/* /new-drive/

But after I copy do I also need to use like lilo.S or something, I tried the above command (using -rpv) but it wouldn't copy over the files saying that the destination did exist, so I tried the other command with "-avR" and it seemed to copy everything but wont boot.

Please advise,
Tim
 
Old 01-19-2004, 04:17 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,801

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
RH uses partition labels so in addition to copying all of the files you will need to add labels to the partitions on the new drive. See man pages for tune2fs.

If you keep all of the partiton # the same as the original you shouldn't have any problems.

Do you have a master drive i.e hda?
 
Old 01-20-2004, 08:58 AM   #7
kato71
LQ Newbie
 
Registered: Jan 2004
Location: Home of the Indy 500
Posts: 2

Rep: Reputation: 0
The master drive is hda and the secondary which is the larger drive is hdc, the hda had partitions 1-7 so I did the same on hdc creating 1-7, whereas #4 being an extended partition that 5-7 resides on. Before running the "cp" command I mounted all of the new partitions to the directory "new-disk" and then copied over from there. Then I took out hda and replaced it with hdc and the system will just hang. Oh also when creating the partitions with fdisk all I could do was create them as ext2 on hdc, but the ones on hda were ext3.

The main reason for this was so that I would have enough room to upgrade this 7.2 to RH9 and it doesn't have enough room to copy the install files. This is just a monitoring system, but I don't want to have to go through setting up mrtg and netsaint again since it was so much fun in the originally and I would like to keep all the history.

Thanks for the help in advance
Tim

Last edited by kato71; 01-20-2004 at 09:07 AM.
 
Old 01-20-2004, 10:20 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,801

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
kato71
You should post a new thread. You will get a better response.

Does RH use partitions labels in version 7.2? Did you reinstall the original hda drive so you could have a bootable system? Look at the /etc/ftab file and see if it has anything like label=/

Did you reinstall the bootloader? Just coping the files will not modify the MBR. I would of thought that if the MBR was blank there would of been some type of no operating system error instead of just hanging.

You can convert ext2 to ext3 with the tune2fs command. See man pages for details.

Did you change the jumpers from slave to master when you swapped drives or are you using cable select?

Did you mount the new partitions one at a time to mount point new-disk and then copied? If what you really did was mount all of the new partitions to the same directory i.e. no sub directories then only the last mounted partition will have any data on it.
 
  


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
Moving the system to a larger HDD LinuxSeeker Linux - General 4 07-26-2005 02:31 PM
Need to replace full harddrive with new, larger harddrive pearlr Linux - Newbie 1 01-02-2004 12:59 PM
Replace CD-drive with a hard drive (HDD) pdap Linux - Hardware 3 06-10-2003 11:11 PM
Migration to larger HDD psycho2000 Linux - Newbie 1 06-05-2003 01:21 AM
Replace system HDD? J_Szucs *BSD 2 03-04-2003 06:41 PM


All times are GMT -5. The time now is 07:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration