Re: What is the best way to upgrade a drive?



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 :-)

.



Relevant Pages

  • Re: lvm question
    ... First, I noted through a smartctl report that my hda was approaching the end of its life, the seek errors were up into the 300 million range, the the ECC errors wasn't far behind it. ... After the clone job, and re-arranging drives, removeing the old hda, moving the clone hdd to ... Note Poweron hours, 9 ...
    (Fedora)
  • lvm question
    ... First, I noted through a smartctl report that my hda was approaching the end of its life, the seek errors were up into the 300 million range, the the ECC errors wasn't far behind it. ... After the clone job, and re-arranging drives, removeing the old hda, moving the clone hdd to ... Note Poweron hours, 9 ...
    (Fedora)
  • Missing Disc drive???
    ... For some strange reason my 2nd HDD became invisible to ... I am Running WIN-XP pro & use a 2nd disc to keep all my ... I have downloaded a utility from the HDD manufacturer's ... in the list of drives found. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Clone, ghost, migrate or image?
    ... operated temporarily in an external enclosure, then swap the drives. ... Windows install hard disk with the machine, ... all practical purposes your new HDD will be a duplicate of your current HDD. ... enclosure specifically designed for 2 1/2" hard drives. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Boot Disk Failure Needs CD to Boot Windows (Imaging Vs Cloning
    ... drives. ... The resultant clone or disk image will retain the original file system. ... file system of the source HDD. ... than a PATA one with respect to the disk cloning process. ...
    (microsoft.public.windowsxp.general)