Link to home
Start Free TrialLog in
Avatar of soldato
soldato

asked on

Ghost-like mirroring tool for Sun boxes?

I'm looking for (don't know if it exists) a tool similar to the Symantec Ghost product for Sun boxes?

Any suggestions or pointers would be appreciated.
Avatar of yuzh
yuzh

Not quite like Ghost (Ghost cann't handle Solaris). To clone a harddisk, if you have 2 identical HD, you
can use the 30 years old UNIX "dd" command to do the job.

boot up the system to single  user mode / (or use Solaris CD to boot up to single user mode).
use "format" command to find out the disk device name BUT DO NOT FORMAT the harddisk.

then use the following command:

dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2

This will copy disk c0t0d0    to c0t1d0.    s2 refer to the whole HD.

If you have two different HDs, you cann't use "dd", you have to use format, ufsdump, ufsrestore to
do the job.

use "format" command to partition the new HD,
you can make it to have the same number of partions (the size of the partition can be the same, or just bigger than the data size, or bigger).

  Assume that your first HD is c0t0d0, 2nd disk is c0t2d0
(use format command to find out the names in your system).

  you can then use "ufsdump + ufsrestore" to dump the partition one by one, then make the diskbootable.

  eg: your first harddisk have /, /var, /usr, /export
      4 filesystems(partitions) refer to /etc/vfstab for details.
     
       let's say you want to dump the / filesystm to 1st partion of the 2nd HD, you do:

# mount the target partition
mount /dev/dsk/c0t0d0s0 /mnt
/usr/sbin/ufsdump 0cf - / | (cd /mnt; ufsrestore rf -)

where finish file transfer, you do:
rm /mnt/restoresymtable
umount /mnt

repeat the above procedure to cope the other partitions

Perform fsck to all the partions in the 2nd HD.

Make the 2nd HD bootable:

installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk \
        /dev/rdsk/c0t2d0s0


That's it. It should work for you.
If you're looking for the ability to "stamp out" Sun boxes using a standard config or set of configs, then what you want is Solaris Jumpstart.
U can try this software, which support many os including solaris.

http://www.availsolutions.com/
In addition to the ufsdump/ufs restore method described above, I have successfully cloned live machines by copying each filesystem using cpio, and then doing the installboot thing. Cpio handles the special files better than tar can.
tar is not for system level backup, it can not handle special files (eg, device files).

ufsdump/ufsrestore is a Solaris specific backup command, it have no problem with
system level backup.

cpio can do the job as well. (system level backup, no problem)
later versions of tar do support backing up of special files.
Avatar of soldato

ASKER

Is Jumpstart or Avail similar to Ghost?

I'm looking to "stamp out" clones, but the "standard configuration" file solution is not really an option.  I will have a custom configured application that needs to be imaged and dropped across a dozen or so Sun boxes of the same hardware type (drives, processor, ram, etc).

For that i think the jumpstart with work fine.

" I will have a custom configured application that needs to be imaged and dropped across a dozen or so Sun boxes of the same hardware type (drives, processor, ram, etc)."

dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2

willl do the job for you, exactly image.
The closest tool to Ghost and easiest is Solaris' 'fssnap'  It allows you to take a snapshot of a filesystem, but does not require as much up front configuration as Jumpstart.  It is also easier to manage than 'dd' (although I use dd with a lot of small backups...)  

The best thing about fssnap is that you can take a snap of your base filesystem, and then a snap of a webserver, ftp server, etc.  Then, you just lay down the base filesystem (root, etc.) and then any others you want to build.
ASKER CERTIFIED SOLUTION
Avatar of Hanno P.S.
Hanno P.S.
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
P.S.: You may call the script I've just posted "ghost" if you want ;-)
Hi soldato

Solaris 8 2/02 and later has a "Ghost" like feature.  ie the ability to clone one machine and install it onto any other machine... it's called "WebStart Flash Archive".

This allows you to create an image of say a E250 and install the same image onto a SunBlade 100, or a SunFire 4800 via jumpstart, tape, CD/DVD or HTTP.  This is by far the easiest method compared to all the other detailed and it does just the job you require. IMO it does a better job than Ghost does especially as it's a fully supported option provided by the OS manufacturer :-)

You can also do a lot more with Flash archive than you can with the other methods or even Ghost and it's faster too :-) (IMO).

Check out details of "Flash Archive" at http://docs.sun.com/db/doc/816-2411/6m8ou8s8t?a=view

HTH
Oh I also forgot to mention that Flash Archive in Solaris 9 now supports "Layered Archives" as well as the ability to split and merge archives.

The possiblities are quite amazing.  Give it a try, you won't be disappointed (at least if you use Sol 9)

Oh yes, and you can also use LiveUpgrade with flash archives... this allows you to build say a Sol 9 machine, create an archive of it, then update a Sol 7 machine using LiveUpgrade with the only downtime being that of a single reboot...

HTH
Has anyone tried udpcast? I've a coworker who has definately won me over. I don't know if it is a native sloaris product, but it is quite extensible. http://www.udpcast.linux.lu/