From JetResources
Jump to: navigation, search


We assume that you already have a working JumpStart Enterprise Toolkit setup, and that you have already been through our JETPrimer tutorial. If not, then you should go off and have a look at that, and if your new to JumpStart too, have a read of the JumpStartPrimer too.

Mirroring The System Disk

Mirroring the Solaris system disk is probably the most common activity on all production (and even development/test) systems. Traditionally, this was a manual operation when the system was installed, but with JET, we can automate the whole process and you get to see the benefit of the tools JET brings to your JumpStart environment.

This tutorial will use the Solaris Volume Manager software (included with Solaris 9 or later). In previous generations it was called Online DiskSuite and Solstice DiskSuite; just in case you are wondering why things are called sds_* ; it's sometimes easier to stay with what you know than follow a marketing department.


For this tutorial, you will need a target system that preferably has 2 equally sized disks. You can mirror from a small -> large disk, but it is inelegant. It should be obvious that you can't mirror from large -> small, so let's just skip that and give you some credit. Oddly enough, you can also play with this tutorial with only one disk. You don't get the benefit of mirroring the disk, but you see the process and you can always go and add in the extra disk later.

This tutorial also assumes that you are on Solaris 9 or later; it does work with earlier versions of Solaris though; it just needs more work getting the media in place.

Finally, it is assumed that you have already added the JetSDS package/module to your JET server; if not, the package is part of the download from the Sun website and/or probably in the same location that you installed JET from originally.

Setting up the JumpStart Client

First up, you need to either create a new template for the client,

# make_template <clientname> base_config sds

or add the SDS product to your template

# make_template -f -T <clientname> <clientname> sds

Once the template has been created, edit it with your editor of choice

# vi /opt/SUNWjet/Templates/<clientname>

You are looking for the sds_* settings (probably near the end of the file). In particular, the following:


The comments above the product_version should illustrate that you can leave it as default for Solaris 9 or above. The root_mirror comments specify that you can specify a c?t?d? value, or if you are feeling brave, specify auto which will let JET try and locate a disk with the same geometry itself.

For most cases, if you know the hardware only has two disks, then auto is a safe bet. If you have particular root mirror requirements, you might have to do a

ok boot net -s install

on the system initially, so you can find out how the disks have been enumerated. The nice side effect with the technique above, is that you can then go back to your JET template, change auto to the real value and then re-run make_client. As the JumpStart has been stalled at the single user prompt, once you have re-run your make_client command, you can just CTRL+D on the client and continue the JumpStart without having to restart.

Lastly, if you only have one disk and are just playing, set the root_mirror variable to ENCAP_ONLY. This will put the root disk under Solaris Volume Manager control, but inhibits the actual mirroring process.

Building the Client

Once the template has been configured, save the file and then run the command

# make_client -f <clientname>

The make_client command should report that it is setting up and checking sds components. If you get the big FAILED message, fix it before continuing.

You can now go to the target system and run the command

ok boot net - install

Sit back and watch; coffee is probably close at hand.

Once the system has finished the initial install, the Solaris Volume Manager software is configured and then the modifications to /etc/system and /etc/vfstab are made. This requires a reboot, which JET performs for you. Once the system has finished rebooting, JET will attach the sub-mirrors and they should then start re-syncing.


The JET system knows nothing about your target system until the JumpStart is in process. There is no way (that we know of) where the JET system can possibly know what hardware you have in the target system and how Solaris will enumerate things. You will get a better feel for things after playing with JET for a while, just remember that it can't work miracles. If you specify c10t10d10 as the root mirror, JET will happily try to oblige; regardless of how many disks are on the system.

Once you get to the login prompt, running df -h should demonstrate that the system filesystems are under SVM control, as they will be located on /dev/md devices, rather than /dev/dsk variants. The system will feel sluggish, as the root disk is mirroring to the second disk. Running metastat will let you know how far though the process has completed.


With only a couple of additions to the template, the system disk can easily be mirrored. JET has managed the reboot and subsequent scripts to configure SVM and attach mirrors. There are many more options to the SVM (sds) module, which allow you to customise the numbers given to your metadevices and also create metasets, filesystems and mountpoints. If you are happy with SVM in general, then these options should make some sense; if not, then go and read up on SVM at docs.sun.com!

--Marty 16:21, 24 January 2006 (GMT)