Aaron Mulder on 28 Feb 2004 04:34:02 -0000 |
Don't forget to install a boot loader on hdb, or once you make it hda, you won't be able to boot. Don't forget to turn off the mail server for the duration. Make sure you apply the correct permissions to the new /tmp (if the copy process doesn't do that itself). Don't forget to format the new swap partition. You don't actually need to remove hdc; you can keep it around for the extra space and/or backup of /var. If I was doing this (and had physical access to the machine) I'd shut down, install the new drive as hda, move the old one to hdb, boot from a rescue CD, do the data copy from there, mount the new root partition, clean up fstab, chroot to the mount point of the new root partition, mount the other partitions, install the boot loader, and then exit/reboot. Running the mounts at this time (and with the old drive moved) makes it easier to flush out problems while you're in a completely functional environment (as opposed to failing mid-boot). I also find it easier to copy things like /var when the system isn't actually live with that partition. It also avoids things like your mail server accepting mail after you perform the backup but before you reboot, you won't end up with truncated logs, you won't have a bunch of PID files for processes that aren't running when you boot on the new drive, and so on. And it lets you use "cp -a" for the copy (or "dd" if the partition sizes are identical) -- though I only say that because I'm not familiar with pax. :) Aaron On Fri, 27 Feb 2004, Mike Leone wrote: > I have this problem. The primary harddrive on my mail server is starting to > fail ... > > hda: timeout waiting for DMA > ide_dmaproc: chipset supported ide_dma_timeout func only: 14 > hda: status error: status=0x58 { DriveReady SeekComplete DataRequest } > hda: drive not ready for command > hda: timeout waiting for DMA > ide_dmaproc: chipset supported ide_dma_timeout func only: 14 > hda: status timeout: status=0xd0 { Busy } > hda: drive not ready for command > ide0: reset: success > > And I've seen some ReiserFS errors in the log. > > I'm configured like this: > > /dev/hda1 /boot ext2 defaults,errors=remount-ro 0 2 > /dev/hda3 none swap sw 0 0 > #/dev/hda5 /var reiserfs defaults 0 2 > /dev/hda6 / reiserfs defaults 0 1 > /dev/hda7 /tmp reiserfs defaults 0 2 > /dev/hdc1 /var reiserfs defaults 0 2 > > proc /proc proc defaults 0 0 > /dev/fd0 /floppy auto defaults,user,noauto 0 0 > /dev/cdrom /cdrom iso9660 defaults,user,noauto,ro 0 0 > > With /var on it's own drive. I forget why I did it that way ... I don't > really need it done that way. > > Filesystem Size Used Avail Use% Mounted on > /dev/hda6 7.7G 4.6G 3.2G 60% / > /dev/hda1 23M 1.5M 21M 7% /boot > /dev/hda7 573M 97M 477M 17% /tmp > /dev/hdc1 4.8G 1.1G 3.8G 23% /var > tmpfs 251M 0 251M 0% /dev/shm > /dev/hdb5 37G 9.9G 27G 28% /mnt > > I've got a spare drive I can use, that is more than large enough to hold everything. > I'd like to transfer everything over - files, users, owner info, etc. > > How about this: > > I configure hdb (40G drive) like so ... > > /hdb1 25M (to be /boot) > Extended partition > /hdb5 10G (to be /) > /hdb6 20G (to be /home) > /hdb7 1G (to be /tmp) > /hdb8 7G (to be /var) > /hdb9 1G (to be swap; system has 512M RAM) > > A semi-arbitrary breakdown, to fill up the disk. Other opinions welcome. > > Can I boot normally (i.e., from hda); mount partitions on hdb; and run > > pax -r -w -p e fromdir todir > (which I found on an old post by Gabe; thanks!) > > Don't think I've missed any options. > > So I'd do > > pax -r -w -p e /dev/hda1 /dev/hdb1 > > and repeat as necessary, for all partitions. > > Then mount /dev/hdb5; edit the /etc/fstab on that partition; change the > "/var" mounting line to say "/dev/hda" instead of "/dev/hdc". > > Swap hdb for hda, and remove hdc. And boot normally, and all should be fine. > > Hopefully! :-) > > Comments? What have I forgotten/overlooked/dunno about? > ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|