Ghost for FreeBSD

Vincent Poy vince at oahu.WURLDLINK.NET
Wed Sep 3 14:00:21 PDT 2003


On Wed, 3 Sep 2003, Mark wrote:

> ----- Original Message -----
> From: "Vincent Poy" <vince at oahu.WURLDLINK.NET>
> To: "Mike Tancsa" <mike at sentex.net>
> Cc: <freebsd-questions at freebsd.org>
> Sent: Wednesday, September 03, 2003 2:22 PM
> Subject: Re: Ghost for FreeBSD
>
>
> > cd /mnt/root
> > /sbin/dump -L -f- /|restore -rf-
> > cd /mnt/var
> > /sbin/dump -L -f- /var|restore -rf-
> > cd /mnt/usr
> > /sbin/dump -L -f- /usr|restore -rf-
>
> I have heard this before, but I never understand this part. :) How does
> creating a /mnt/root directory, and restoring in that directory get my /
> slice back? Then the restored data will just sit in /mnt/root! What good
> does it there?

	Well, the purpose of that is so that your actually HD that's being
used fails, you can just plug the second drive in as the primary drive and
boot from it.  Since it's basically the clone of the original drive.

> Or should I create /mnt/root as partition, about equal in size to the root
> partition, and then restore therein, and do the old switcheroo in /etc/fstab
> later, to make it the root partion?

	My /mnt/root and / are the same size and the /mnt/usr and /usr are
the same size.  The /mnt stuff just needs to be the same size or a larger
size.  I don't have a separate /var partition but there are two ways to
use what's on mount.  One is to edit the /mnt/root/etc/fstab to point to
the new device names and assuming you put in the FreeBSD Boot Manager, one
of the Fn keys as shown on the screen will allow you to choose the drive.
If you don't choose, then it's your original drive that gets booted up.
The second method is really if the first drive dies for whatever reason,
the second drive will be bootable with the last dump/restore that is done.
In my case, I do the dump/restore at 4AM every morning.  I needed to do
this since I'm running on a Dell Inspiron 8200 notebook and the last time,
the IBM 60GB 2.5" 5400rpm 2MB Cache TravelStar HD died, I lost everything
except the /etc directory...  I've already verified this works as my / and
/usr is on a Fujitsu 60GB 2.5" 4200rpm 2MB Cache HD while I replaced it
with a Hitachi 60GB 2.5" 7200rpm 8MB Cache HD for the primary drive.
After the dump/restore is done, I swapped the drives and added another
identical Hitachi drive for the second drive so now I'm running on the new
drive and dump/restoring to a second identical drive while keeping the
Fujitsu as a spare.  This is what my df output looks like as the available
space is different due to the primary drive having changes after 4AM
Pacific Daylight Time.

root at bigbang [12:04am][/home/vince] >> df
Filesystem  1K-blocks    Used    Avail Capacity  Mounted on
/dev/ad0s1a    126702   84312    32254    72%    /
devfs               1       1        0   100%    /dev
/dev/ad0s1d  56376586 4100320 47766140     8%    /usr
procfs              4       4        0   100%    /proc
/dev/ad2s1a    126702   84394    32172    72%    /mnt/root
/dev/ad2s1d  56376586 4123490 47742970     8%    /mnt/usr

> I have successfully restored /var and /usr, on occasion; but that is rather
> easy, as they can be unmounted. With the root partition, that is not
> possible, of course. Short of having to switch cables on harddisks, is there
> a software method that will allow me to restore/switch the root partion?

	Well, if you used the FreeBSD Boot Manager - prior to FreeBSD even
booting up, it will show a menu.  With Fn like:

F1 FreeBSD
F5 FreeBSD

F1 will boot by default
If you hit F5, it will boot the second drive but make sure the second
drive's /etc/fstab has the correct device names since it should goto the
wherever you had the /mnt stuff.

> Thanks!
>
> - Mark


Cheers,
Vince - vince at WURLDLINK.NET - Vice President             ________   __ ____
Unix Networking Operations - FreeBSD-Real Unix for Free / / / / |  / |[__  ]
WurldLink Corporation                                  / / / /  | /  | __] ]
San Francisco - Honolulu - Hong Kong                  / / / / / |/ / | __] ]
HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[____]
Almighty1 at IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin



More information about the freebsd-questions mailing list