|
|
| Xserve Cluster Setup |
|
|
|
To image the Xserve cluster nodes we created a custom startup item that was installed on a bootable CD located at /Library/StartupItems/NodeImager. At bootup the startup item is executed and proceeds to image the host node's hard drive from a compressed image on the same external firewire disk using the Apple Software Restore utility, asr.
NodeImager Startup Item
The NodeImager startup item is a simple shell script that runs asr (with optional log output asr_log.txt) and reboot command. The script is shown here:
|
|
|
#!/bin/sh
/usr/sbin/asr -source /Volumes/Image/Server\ HD.dmg \
-target /Volumes/Server\ HD \
-erase \
-noprompt > asr_log.txt &
wait
sleep 30 &
wait
/sbin/reboot
|
|
|
|
|
NodeImager Startup Parameters
The other piece of the startup item is the StartupParameters.plist file dislayed below:
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>GeoCenter Xserve Cluster Node Imager</string>
<key>Messages</key>
<dict>
<key>start</key>
<string>Imaging System</string>
</dict>
<key>OrderPreference</key>
<string>Last</string>
<key>Provides</key>
<array>
<string>New System Image</string>
</array>
<key>Requires</key>
<array>
<string>Disks</string>
</array>
</dict>
</plist>
|
|
|
|
|
|
Sample `asr` Log
|
|
|
Validating target...done
Validating source...done
Erasing target device /dev/disk0s3...done
Retrieving scan information...done
Validating sizes...done
Restoring ....10....20....30....40....50....60....70....80....90....100
Verifying ....10....20....30....40....50....60....70....80....90....100
Remounting target volume...done
|
|
|
|
| Next -> Node Config Script |
|
|
|
|
|
|
|
|