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

Re: How to Move from 1 drive to another?



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.

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

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.

Svan's ida has some merit, but you can do it by booting the IBM drive.

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

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.
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.

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.

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

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.




The family have 5 accounts.

What I would like to do is to make the 120GB drive the main one (using
ReiserFS) and use the 30GB drive for data.

So, the plan is to install (via the sid installer) Debian on the 120GB
drive.  I know
- to install the current packages I've got I can
install them via dpkg --get-selections|--set-selections
- use /etc/* file as configuration for new drive

My question is - what is the easiest|best way of copying|moving all
the accounts and their data across?  Do I simply have to recreate the
users on the new drive and then copy across their home drives?  Or can
I just rely on everything being set up OK if I just copy across
/etc/passwd and /etc/group.

Thanks in advance
Jonathan



--

Cheers
John

-- spambait
1aaaaaaa@computerdatasafe.com.au  Z1aaaaaaa@computerdatasafe.com.au
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/



Reply to: