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

Re: Replacing hda - Easiest Way?

On Tuesday 05 August 2008 01:39, Scarletdown wrote:
> On Mon, 2008-08-04 at 16:33 -0400, Rick Thomas wrote:
> > If you can leave the old disk in the box for a while, start by
> > installing the new drive as hdb, partition it and mkfs the
> > filesystems -- all while booted to the old drive.  Set up a bunch of
> > mount-points for the new partitions, e.g.:
> >
> > /dev/hdb1	/new
> > /dev/hdb5	/new/tmp
> > /dev/hdb6	/new/root
> > /dev/hdb7	/new/opt
> > 	...you get the idea...
> >
> > Then boot single user to the old drive, mount the new drive
> > partitions and use rsync to copy the contents of the various
> > partitions to the new drive.  Then install grub however you like on
> > hdb.  Since eventually you will want to get rid of the old disk and
> > install the new one as hda, you may have to fiddle with things like /
> > etc/fstab and the grub menu.lst file, but that should be pretty obvious.
> Thanks for the tips.  Should be useful for this upcoming project.  There
> has been a slight change of plans though.  The drive I bought is SATA II
> instead of EIDE.  The sales rep at Circuit City convinced me to consider
> SATA for the speed, so I went next door to Office Depot and shelled out
> a little under $100 for a 500GB Maxtor SATA drive.  :)
> So that being the case, I am guessing that the SATA drive will show up
> in /dev as something other than hdd (hda is the current primary IDE, hdb
> is the secondary (which will then become the primary after this is all
> over), and hdc is the DVD-RW.  So, before I power down and install the
> new drive, can anyone give me an idea of what type of device this will
> show as?

/dev/sda , probably. You also the symbolic links under /dev/disk , which you 
can use.
> Also, the MaxBlast CD that came with the drive says that there is a disk
> cloning utility as well.  Hopefully, this will work with ext3 partitions
> and will copy the GRUB stuff over as well.  (crossing fingers...)

Don't use that proprietary garbage when you've got debian. Boot single user 
mode and do your transfers on the file level and not the partition level.
> Now that I am thinking about this more, perhaps I should go ahead and
> clone hdb (where /home, /shared, and /workspace are at) then make the
> old hdb, which is 200GB, the new boot drive.

With LVM2 you can make all your devices into one volume group and make as many 
logical volumes as you like out of that. You can, for example, have:

/dev/hda1 as /boot
/dev/mapper/your_vg-lv_root as /
/dev/mapper/your_vg-lv_home as /home

This is while /dev/hda2 and /dev/sda1 together make up the volume group 
your_vg .

You can play with this as much as you like and you'll be keeping it all 
flexible for future changes.
Shachar Or | שחר אור

Reply to: