Apple Mac OS X Server Network Card User Manual


 
Chapter 7 Working with Disks and Volumes 95
To repair a failed mirror:
$ diskutil repairMirror
device
slicenumber
fromDisk
toDisk
Note: Xsan RAID volumes have their own set of commands, which are described in an
appendix of the Xsan administrators guide. See the appendix for informatian about the
megaraid tool, used for managing a PCI RAID card.
Imaging and Cloning Volumes Using ASR
You can use Apple Software Restore (ASR) to copy a disk image onto a volume or to
prepare existing disk images with checksum information for faster copies. ASR can
perform file copies, in which individual files are restored to a volume unless an identical
file is already there, and block copies, which restore entire disk images. The asr tool
doesn’t create the disk images. You can use hdiutil to create disk images from
volumes or folders.
You must run ASR as root. You cannot use ASR on read or write disk images.
To image a boot volume:
1 Install and configure Mac OS X on the volume.
2 Restart from a different volume.
3 Make sure the volume you’re imaging has permissions enabled. Use the following to
verify permissions:
$ diskutil verifyPermissions [mount point|disk identifier|device node]
4 Use hditutil to make a read-write disk image of the volume. See “To create an image
from a folder:” on page 177.
5 Mount the disk image.
6 Remove cache files, host-specific preferences, and virtual memory files. See the asr
man page for examples of what files to remove.
7 Unmount the volume and convert the read-write image to a read-only compressed
image.
$ hdiutil convert -format UDZO
pathtoimage
-o
compressedimage
8 Prepare the image for duplication by adding checksum information:
$ sudo asr -imagescan
compressedimage
Parameter Description
device
Device file.
slicenumber
Specifies the slice number to replace.
fromDisk
Specifies the mirror source.
toDisk
Specifies the repaired mirror destination.