Re: What is the best way to upgrade a drive?
- From: Vlad_Inhaler <andrew.williams@xxxxxxxxxxx>
- Date: 28 Apr 2007 01:43:53 -0700
On Apr 28, 2:39 am, John <nyc...@xxxxxxxxx> wrote:
After a long time it has come to a point that I want to replace a hard drive
on my Suse machine with one that is much larger. The computer has four hard
drives hda hdb hdc and hdd.
The drive I want to replace is hda2 which contains /home and /boot. In
retrospect I think it was not such a good idea to keep /boot and /home on
the same drive....
My question is, how to replace hda as painlessly as possible without loosing
data or trashing the entire sytem? The machine running Suse 10.1 and I
don't plan on upgrading until after 10.3 is released.
The currently installed drives are all IDE but the machine is SATA capable.
I have not yet decided if the new drive will be EIDE or SATA. I'm not sure
if it's a good idea to mix the two so I am leaning towards EIDE at the
moment.
Here is my current setup:
john@uisce:~/doc> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdb1 38G 23G 15G 61% /
udev 1.3G 300K 1.3G 1% /dev
/dev/hda1 118M 40M 78M 34% /boot
/dev/hda2 75G 63G 13G 84% /home
/dev/hdd2 18G 16G 1.4G 93% /local
/dev/hdc2 15G 1.1G 14G 7% /srv
/dev/hdc3 7.3G 174M 7.1G 3% /tmp
/dev/hdc1 15G 1.5G 14G 10% /var
hdd1 is swap 20GB
System:
uname -a Linux uisce 2.6.16.27-0.6-default #1 Wed Dec 13 09:34:50 UTC 2006
x86_64 x86_64 x86_64 GNU/Linux
Thanks
John
I have replaced drives several times with - usually - minimal pain but
I only use hda, hdc and hdd so I have a slot free. (btw, where is
your CD-Rom / DVD?)
My standard method is to add the new drive, partition it, reboot and
then get to work - usually in runlevel 1 and always as root.
- format the new partition
- mount the new partition, for example as /data1
- go to the partition I wish to move
- tar cf - . | (cd /data1 ; tar xf - )
or
- tar --create --one-file-system --file=- . | (cd /backup; tar xf - )
(I have heard several times that this does not work, it does. The
only thing I lose this way is the sockets)
Where this falls down is with the bootable partition. I have to
fiddle around a bit to get the system to boot again. My preferred
method was always to use lilo and point it temporarily at the new
disc, other possibilities are to set up a floppy disc or boot from CD/
DVD and fix things that way. My /boot and my / partition are both on /
dev/hda and I am not even sure which is the critical one.
- the final step is to update /dev/fstab (on the new disc if /etc has
been moved) to point to the new locations, taking into account that
your new disc is about to move to another slot.
You may have to disable the fstab entry for /local at the start,
temporarily remove hdd and put the new disc in as hdd while setting it
up. You can reenable the entry when your new disc moves to wherever
it is heading to.
Why 4 discs in the first place? My preferred setup is two discs set
up pretty much the same way and then I backup hda (or hdd) partitions
to their corresponding hdd (or hda) partitions. If one disc fails
(unlikely) or I screw something up (yup, that's me) then reverting is
easy. Actually, if hdd fails then all I have to do is boot up a
rescue system and change any fstab entries from hdd? to hda?. pretty
trivial.
Your mileage will vary :-)
.
- Follow-Ups:
- Re: What is the best way to upgrade a drive?
- From: houghi
- Re: What is the best way to upgrade a drive?
- References:
- What is the best way to upgrade a drive?
- From: John
- What is the best way to upgrade a drive?
- Prev by Date: Re: Monitor settings
- Next by Date: Re: next SuSE 10.3 code name Microsoft Linux - Novell Enterprise Edition
- Previous by thread: What is the best way to upgrade a drive?
- Next by thread: Re: What is the best way to upgrade a drive?
- Index(es):
Relevant Pages
|