Date: Fri, 30 Apr 1999 10:07:42 -0600 From: Oscar Bonilla <obonilla@fisicc-ufm.edu> To: Graeme Tait <graeme@echidna.com> Cc: freebsd-questions@FreeBSD.ORG, info@boatbooks.com Subject: Re: Moving OS to a new disk Message-ID: <19990430100742.B648@fisicc-ufm.edu> In-Reply-To: <3729F55A.7E06@echidna.com>; from Graeme Tait on Fri, Apr 30, 1999 at 11:24:26AM -0700 References: <Pine.BSF.4.05.9904301739290.33677-100000@zeus.dnt.md> <19990430175241.A22708@relay.ucb.crimea.ua> <3729F55A.7E06@echidna.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 30, 1999 at 11:24:26AM -0700, Graeme Tait wrote: > I have a system (2.2.8S/CAM) in which the primary hard drive has become > flaky (it powers itself down periodically). This drive contains all the > OS. > > I have a second identical drive, and my thought to ease replacement is to > install the second drive as da1 (SCSI ID 1; the existing drive is da0/ID > 0), partition it identically, and transfer everything from the old drive. > I'd then remove the old drive, and jumper the new drive as SCSI ID 0 and > have it appear as da0. > perfect. > > Do I need to change the disklabel on the new drive or do anything else in > changing the SCSI ID - that is, is the device name embedded in the label, > etc.? > all you need to do after you've copied the filesystems is install the boot blocks. you should use disklabel for that. > > What is the best way to make a literal copy of the old drive on the new? > I've found that tar doesn't copy all the device nodes properly (it says > "minor number too large; not dumped" for many devices). I'm assuming I > would temporarily mount the new drive as say /new and so the root > filesystem would have to be transferred to /new , etc. > > tar is just the wrong tool for that. use dump(8) and restore(8). here's what i would do: 1. configure the drive blah blah and make it appear as da1 2. use fdisk to partition the drive (check out the -f <file> option) 3. use disklabel to make the slices 4. newfs for all the new slices 5. mkidr /mnt/root /mnt/usr /mnt/var etc 6. (cd /mnt/root; dump 0f - / | restore rf -) (cd /mnt/usr; dump 0f - /usr | restore rf -) etc 7. umount all the stuff in /mnt 8. disklabel again to transfer the boot blocks (/boot/boot1 and /boot/boot2) 9. swap drives and reboot. 10. email the list again if it doesn't work (i might have missed a step :) regards, -Oscar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990430100742.B648>