Moving existing FreeBSD system to a new harddisk...
Hi, I have FreeBSD 6.2 installed on a Dell Latitude D400 laptop. The harddisk is 40G, with FreeBSD occupying about 25G, and remaining to Windows. I have received a replacement for this hard disk, which is a bigger capacity one - 80G. I have to move the existing FreeBSD system from the old to the new hard disk. I did find something here: http://www.freebsddiary.org/driveswap.php. Still, I'd like to hear someone's experience regarding the same. Thanks! Best, Amarendra ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Moving existing FreeBSD system to a new harddisk...
On 18/04/07, Amarendra Godbole [EMAIL PROTECTED] wrote: Hi, I have FreeBSD 6.2 installed on a Dell Latitude D400 laptop. The harddisk is 40G, with FreeBSD occupying about 25G, and remaining to Windows. I have received a replacement for this hard disk, which is a bigger capacity one - 80G. I have to move the existing FreeBSD system from the old to the new hard disk. I did find something here: http://www.freebsddiary.org/driveswap.php. Still, I'd like to hear someone's experience regarding the same. Thanks! I recently replaced a dying Hard Disk with a newer and bigger one. To move the data to the new disk I used dump/restore, and stored the data on my server. 1. dumped all slices from the machine to the server 2. replaced the disks 3. did a basic FreeBSD install from CD ROM to get a proper disk layout and a boot manager. Because of this installation I got the same slices as on the old disk, just with a new size matching the new disks specification. So the slice names remained the same. 4. restored the previously dumped slices to the new disk BTW: As long as you don't remove/destroy the data on the original disk there's nothing desastrous that can be happen to you. If the method you choose doesn't work somehow, you can still create another backup of the original disk. From all possible and existing methods you should choose the one you feel most comfortable with, e.g. that you understand completely, and where you know the needed tools most. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Moving existing FreeBSD system to a new harddisk...
On 18/04/07, Amarendra Godbole [EMAIL PROTECTED] wrote: Hi, I have FreeBSD 6.2 installed on a Dell Latitude D400 laptop. The harddisk is 40G, with FreeBSD occupying about 25G, and remaining to Windows. I have received a replacement for this hard disk, which is a bigger capacity one - 80G. I have to move the existing FreeBSD system from the old to the new hard disk. I did find something here: http://www.freebsddiary.org/driveswap.php. Still, I'd like to hear someone's experience regarding the same. Thanks! Dan's process seems fairly sound, from having done this myself. I use pax(1)* on the filesystems rather than tar(1) on the archives, and I tend to only backup /home, /etc, /var (especially /var/db/pkg), and /root. If you do not make some dreadful error your old drive is the backup, at least until you can confirm the state of the new drive. *cd / pax -r -w -p e -X ./ /mnt \ pax -r -w -p e -X ./var /mnt etc etc for /usr /home and any other mountpoints (if I recall correctly. Note that with pax the -X flag is important in this case so it is not trying to copy /mnt into /mnt/mnt and into /mnt/mnt/mnt and so on) -- -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Moving existing FreeBSD system to a new harddisk...
On Wed, 18 Apr 2007, Amarendra Godbole wrote: I have FreeBSD 6.2 installed on a Dell Latitude D400 laptop. The harddisk is 40G, with FreeBSD occupying about 25G, and remaining to Windows. I have received a replacement for this hard disk, which is a bigger capacity one - 80G. I have to move the existing FreeBSD system from the old to the new hard disk. I did find something here: http://www.freebsddiary.org/driveswap.php. Still, I'd like to hear someone's experience regarding the same. Thanks! The FAQ has the canonical way to do it: http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#NEW-HUGE-DISK As that says, the easiest way is to do a minimal install on the new disk and then use restore. -Warren Block * Rapid City, South Dakota USA ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Moving existing FreeBSD system to a new harddisk...
Hello, Hi, I have FreeBSD 6.2 installed on a Dell Latitude D400 laptop. The harddisk is 40G, with FreeBSD occupying about 25G, and remaining to Windows. I have received a replacement for this hard disk, which is a bigger capacity one - 80G. I have to move the existing FreeBSD system from the old to the new hard disk. I did find something here: http://www.freebsddiary.org/driveswap.php. Still, I'd like to hear someone's experience regarding the same. Thanks! Are you able to install that new disk while the old one is still in the machine and functional? If so, do the following: Let's assume the old disk is ad0 and the new one is ad1 and MS occupies the first slice (called primary partition) of each disk. So, FreeBSD then is currently in /dev/ad0s2 and you want to put it in /dev/ad1s2. First do the MS install on the new disk (if you intend to also dup it) and then use an appropriate utility to create room for the second slice (s2) on the drive. You may actually be able to first let FreeBSD fdisk break up the drive in to the required slices before installing MS - I haven't tried that. I don't know if MS will respect the slicing done by FreeBSD. It definitely will not respect the MBR that FreeBSD writes, so at the least, you need to do the install work on MS first and FreeBSD second, regardless of how the slicing is done. Just a note here. MS uses the term 'Primary Partition' for the same thing that FreeBSD calls a 'slice'. There can be up to 4 of these major divisions.MS and Linux allow you to replace one of the primary partitions with an 'extended partition', generally in slice 4 in which you can create subdivisions, also called partitions, but that are not 'primary'. FreeBSD allows the 4 primary divisions called slices. In FreeBSD you can subdivide any or each of the slices in to 'partitions' which are designated by letters a..h (except that 'c' is reserved, 'a' must be root if it is a boot device and 'b' is traditionally used for swap).It is easy to get the terms slice and partition scrambled and they have even been switched around in some of the man pages, though someone made a pass at cleaning it up a little while ago. Having said all that, now back to the story. Lets assume you now have your new with MS on slice (primary partition) 1 and have created an unknown type slice (primary partition) on slice 2. You might have managed that with fdisk or with Partition Magic or whatever. Use fdisk to mark that slice 2 (ad1s2) as FreeBSD type and bootable and to write out the FreeBSD MBR to the drive. Then use bsdlabel to edit the partition table for slice 2 and create the partitions you need and write out the boot sector for that slice. bsdlabel -w -B da0s1 bsdlabel -e da0s1 The first will write the boot sector and a stock partition table. The second will bring up an edit session that you can use to edit the partition table and create the partitions you want. Let's assume you want the following, a typical setup for a machine with all source and ports tree loaded and running a very small database. and this matches, except in size, your current structure on your old disk. In real life, use partitions that reproduce your actual old disk structure. a: root 384 MB b: swap 1 GB c: reserved lists size of entire slice d: /tmp 512 MB e: /usr 4 GB f: /var 4 GB g: /home All remaining space in the slice. ignore all the stuff above the comment line with head labels for #size offsetfstype [fsize bsize bps/cpg] Edit the sizes in the columns as follows: a: 78643204.2BSD 2048 16384 32776 b: 2572288 786432 swap c: 838860800unused0 0 # raw part, don't edit d: 1048576*4.2BSD 2048 16384 8 e: 8388608*4.2BSD 2048 16384 28552 f: 8388608*4.2BSD 2048 16384 28552 g:**4.2BSD 2048 16384 28552 You might sometime want to tinker with the numbers under fsize, bsize, etc but mostly they can be left alone. The large remainder partition my benefit, but probably the others are just right. I assumed a size for 'c:' at exactly 40 GB. It won't be. Just leave it at whatever the system thinks it is. Now write and exit the editor and your partitions are created. Run newfs on each partition except swap. newfs /dev/ad1s2a Probably all of the defaults are what you want, except for possibly that large remainder slice if you happen to either use very large files or need extra inodes. You will only know that from experience with your own situation so just go ahead and take the defaults and if either you run out of space with a huge number of inodes left unused or run out of inodes with disk space left unused, then you will later want to dump everything and re-newfs the partition and then restore it. All of this slice and partition and
Re: Moving existing FreeBSD system to a new harddisk...
On Wed, Apr 18, 2007 at 05:46:50PM +0200, Christian Walther wrote: On 18/04/07, Amarendra Godbole [EMAIL PROTECTED] wrote: Hi, I have FreeBSD 6.2 installed on a Dell Latitude D400 laptop. The harddisk is 40G, with FreeBSD occupying about 25G, and remaining to Windows. I have received a replacement for this hard disk, which is a bigger capacity one - 80G. I have to move the existing FreeBSD system from the old to the new hard disk. I did find something here: http://www.freebsddiary.org/driveswap.php. Still, I'd like to hear someone's experience regarding the same. Thanks! I recently replaced a dying Hard Disk with a newer and bigger one. To move the data to the new disk I used dump/restore, and stored the data on my server. 1. dumped all slices from the machine to the server 2. replaced the disks 3. did a basic FreeBSD install from CD ROM to get a proper disk layout and a boot manager. Because of this installation I got the same slices as on the old disk, just with a new size matching the new disks specification. So the slice names remained the same. 4. restored the previously dumped slices to the new disk Just a comment here.You seem to be switching around the terms a little. You would dump a partition, not a slice. In FreeBSD, slices are the primary divisions, of which there can be up to 4 and the subdivisions of each slice, upon which filesystems are built are called partitions. It is popular to get these turned around. Even the man pages have goofed up in a couple of places. It is handy to refer to the division that gets dumped and restored as a 'filesystem' since by that time it has already been not only divided but new-fs into a read/write-able filesystem. By doing that, it reduces some of the opportunity for confusion in terms. Otherwise, what you explain here is reasonable. jerry BTW: As long as you don't remove/destroy the data on the original disk there's nothing desastrous that can be happen to you. If the method you choose doesn't work somehow, you can still create another backup of the original disk. From all possible and existing methods you should choose the one you feel most comfortable with, e.g. that you understand completely, and where you know the needed tools most. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Moving existing FreeBSD system to a new harddisk...
On 4/19/07, Jerry McAllister [EMAIL PROTECTED] wrote: Let's assume the old disk is ad0 and the new one is ad1 and MS occupies the first slice (called primary partition) of each disk. So, FreeBSD then is currently in /dev/ad0s2 and you want to put it in /dev/ad1s2. [...] Thanks all for the replies. It has given me enough confidence to try swapping disks. I will post my findings once I move over to the new disk. -Amarendra ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]