Swappable Hard drives?

Jerry McAllister jerrymc at clunix.cl.msu.edu
Mon Aug 9 07:14:56 PDT 2004


> 
> Soon I will have two identical 120GB IDE HDs in my FBSD 4.10 
> system. One is to be basically a backup drive. Can I write a 
> MBR to the second HD and then swap cables when I want to 
> boot/run the system from the backup HD, assuming I've used pax 
> or dump to make the file systems identical? The "normal" 
> configuration will be both drives installed, but I would like 
> to be able to swap the cables (or change the boot sequence in 
> the BIOS) and boot off of the second HD.

If you will not want to boot any other than the first drive that is 
marked bootable, (eg if you want to boot the second drive you will 
swap cables to do it) then you can easily do what  you want.

You should fdisk the second drive and make is bootable and create
the identical partitions with disklabel ( you can use /stand/sysinstall
to run fdisk and disklabel for you if you want, though fdisk and
disklabel are not nearly as difficult as their reputations seem
to have them - especially now that some more work has been done
on their man pages)

Then, use dump(8) piped to restore(8) for each partition to make
the duplicate copies - don't attempt to duplicate the swap partition.
And probably don't bother to duplicate /tmp unles, for some reason
you are keeping something more than immediate temporary stuff there - 
you shouldn't if you can avoid it.  dump/restore is probably better 
than dd for such a thing and definitely better than tar for this type 
of thing.
Don't forget to fsck the new partitions before (and maybe after)
writing them.

////jerry

> 
> Both drives will be "masters" on different IDE controllers.
> 
> There will be no other operating system on the computer, but 
> in the future I hope to use samba to copy files in and out to 
> Windows XP Pro computers on my LAN.
> 
> Jay O'Brien
> 


More information about the freebsd-questions mailing list