Copying disk - dd or lucreate?

Got server that I want to have an 'image' of disk to keep in case of failure. What I want to be able to do is, in the event of disk failure, remove system disk replace with cloned disk (same slot) and reboot.

Trouble is I cant take this server down to single user.

Is dd still a viable option?

Or is lucreate better to do?

Disclaimer: I know very little about Solaris and had never heard of lucreate until now. What follows is just a (probably unnecessary) observation regarding dd:

Running dd on a storage device that may be written to can yield an image that never existed.

Regards,
Alister

Agreed. If your server is running live, dd is useless. I believe Solaris has better alternatives in any case, but these may be filesystem-dependent...

You may be better to document the disk structure and backup up each filesystem. Do you know if this is a Veritas managed disk or just a simple disk plugged into the server? If it is Veritas then there are tools to build mirrors, but you will need to be sure that the disk can be seen from the OK prompt and the path you would need to boot from.

If it is just a simple single disk, then I would presume it is sliced with the format command. It's a little dangerous I admit, but you can start the tool and pick the options to display a partition print of the disk in question. You could then record that information ready to format a new disk if you ever need to.

To handle the filesystems, I would suggest using ufsdump It has been many years since I have had the pleasure of Solaris, so you'd better read the man pages for it, but you can sequentially dump each filesystem to tape (using the no-rewind tape device, possibly /dev/rmt0n) for each filesystem contained on your disk.

The reverse would be to boot from CD and then after using the format utility to slice the replacement disk (or on a DR server, of course) and then use ufsrestore with the no-rewind tape device to recover the filesystems. In theory you should then be able to boot! If you are on a DR server, there may well be device mismatches, so that has to be handled too, but let me know if this is a likely scenario and I will see what we have stored away in deep, darkest archive.

I hope that this is useful,
Robin
Liverpool/Blackburn
UK

That rules out cloning the disk, as already stated.
What you need is clone the partitioning and the file systems. As you need to do it live, the only viable solution would be to create a snapshot of the file system and use that snapshot to create you alternate boot disk. The precise way to do that depends on whether you use UFS or ZFS (fssnap vs zfs snapshot), which you do not state.

not at all.

Possibly, lucreate works at the file system level but I'm unsure it uses snapshots so it might fail depending on the applications you use.
Some people are also using flash archive (flarcreate) to clone their environments, although it wasn't designed for that and might suffer the same issue. Without snapshots, you need to separately backup data from application like databases or directory servers.

Yep. Standard file systems.

Done ufsdump but was planning to do a clone too.

Apparently I can't delete this post.