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

Re: Migrate OS to smaller drive?



vr put forth on 4/11/2010 8:49 PM:

> I've used dd to push a copy of a working system onto larger drives in the
> past. So my misuse of the term "migrate" is me actually doing a copy of the
> working system to a new, larger device and then zap the original.
> 
> I'd hoped there was a block by block way to do it so I didn't have to set
> up the partitions & filesystems ahead of time but I suppose that part won't
> be too painful.
> 
> The system is relatively idle during these types of surgeries because I
> boot from a live CD so the data on disk isn't churning.

The last system (server) I migrated was from a 40GB IDE to a 500GB SATA on a
new add-in PCI SATA card.  Once I got the sata_sil and libata drivers
squared away, new partitions created on the new drive, I stopped all the
necessary potential problem child daemons, and used "cp -a" to move
everything over, one directory at a time.  I chose this method based on
advice I received here.  I confirmed correct copying of each dir as I went.

I even did this in runlevel 2 via an SSH session instead of single user mode
(I don't like the limited 80x25 physical console).  Last thing I changed was
/etc/fstab on the new drive, ran LILO, powered down, decabled the old drive,
powered up, changed the boot device order, the system booted from the SATA
drive, and everything worked, with a couple of exceptions in /dev/ which
aren't actually created automatically on each boot as I'd previously
thought.  Once I manually created these devs everything worked fine and has
since.  Previously the system was basically just a Postfix firewall/gateway,
and now I've also got Dovecot, Lighty, Samba, and all other kinds of servers
running successfully.  It's amazing what new life a fresh fast big disk can
breath into an old server.  Due to an unknown problem with the old IDE drive
I was only getting 7MB/s transfer rate out of it.  I'm getting 80MB/s with
the new drive. :)  The machine has a completely different character now,
quick and responsive.

I was actually very surprised at how smoothly the "cp -a" migration went.
This easy migration is just one of the many reasons I love Linux.  And I
find more reasons all the time. ;)

-- 
Stan


Reply to: