[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to Move from 1 drive to another?



John Summerfield <debian@ComputerDatasafe.com.au> writes:

> Jonathan Wheelhouse wrote:
>
>>Hi
>>
>>I am running Debian unstable on a 30GB drive (IBM Deskstar 75gxp)
>>using ext3.  I recently bought a 120GB drive (Western Digital WD1200).
>>
>>
>
> Oh dear.
>
> Sven has much the same idea I have.
>
> Before I forget, install, configure and configure smartmontools.
>
> Read the docs and check out the need for firmware for that drive. It's
> not for nothing those drives are called Deathstar: I have bought two
> of them, and two of them died.

I've had no problems with the IBM drive.

> The WD drive also has its problems.There are three settings:
> Slave
> Master, no slave
> Master, slave present.

I've checked the jumper settings - I will probably use Cable Select.

> It matters that you get the settings right: some systems (and I've
> been caught here too) will not boot if you get it wrong. The problem
> is documented on the WD website (why on earth they don't fix it I've
> no idea), and there you will find where to park the jumper when you
> don't want it. The position is not described on the disk label.

> To save mucking around, I'd leave the Deskstar as hda, install the WD
> drive as hdb (or on the second controller).

Maybe I will do this - not sure.

> You don't say howyour old drive is partitioned. I am going to assume
> it's  two paritions, hda1 and hda2, and that hda1 your is boot
> partition near the edge. There are other configurations where this
> will work, but all must be primary paritions.

$ mount
/dev/hda1 on / type ext3,ext2 (rw,errors=remount-ro)
/dev/hda2 on /boot type ext3 (rw)
/dev/hda6 on /var type ext3 (rw)
/dev/hda7 on /usr type ext3 (rw)
/dev/hda8 on /usr/local type ext3 (rw)
/dev/hda9 on /home type ext3 (rw)
/dev/hda10 on /tmp type ext3 (rw)

> If you want a learning experience, do this.
> First, boot single-user mode, check hda partitions are mounted ro.
> Next, check the drives are tuned:
> hdparm /dev/hda /dev/hdb
> If you don't see DMA turned on, etc
> hdparm -d1 -u1 -a64 -m16 /dev/hd{a,b}
> Then, carefully getting this the right way round
> dd if=/dev/hda of=/dev/hdb bs=$((1*1024*1024))
>
> What you have now is a 30 Gb drive configuration on your 120 Gbyte drive.
> Use fdisk to delete hda2, and then create a new, larger parition up to
> the size of the disk.

So copy 30Gb to 120Gb drive; then delete hda2?  I don't see why to
leave hda1? - unless I'm going to boot from hda1.  Then partition rest
of the WD drive?

> Instead of using mke2fs, use e2fsck and resize2fs (or whatever). It
> will resize the partition.
>
> btw Why reiserfs? From my reading it excels when you have lots of
> small files, but not otherwise.

Well, I'm using ext3 currently; thought I would try ReiserFS for the
very reason you give.  What would you recommend?

> This will be quicker than doing it with cp or (better) tar.
>
> If you prefer to use tar, then partion the second drive and mount it
> at, say, /mnt/new, then
> tar clC / . boot | tar -xC /mnt/new

So, this copies "/", ".", " boot" to the new drive.  "." is the
current directory?  Which one specifically?

> If you have buffer installed:
> tar clC / . boot | buffer | tar -xC /mnt/new
>
> Doesn't matter too much which drive you boot from: you can
> a) Configure the BIOS to boot from the second drive (requires you
> install and configure a bootloader)
> b) Condinue booting /dev/hda and configure the bootloader to boot /dev/hdb
> c) .... and configure the bootloader to boot the kernel etc from hdb.

OK.

So many options - I've just got to decide which one.

Thanks
Jonathan



Reply to: