Quick intro:
Jumpstart is Solaris tool for OS installation over the LAN.
The installation is faster then using DVD and you can do consistent installation for many clients (same system configuration and third party software).
It is also unattended.
Basically, there are two processes here: network booting and installation.
But here, I’ll just talk how to install Jumpstart SPARC client.
I assume server is setup properly
(I will talk about this in other document, but I may also mention some steps here, no hurt if I repeat stuff more than once).
What I do first is (on Jumpstart server):
1.) Add MAC address and host name to /etc/ethers file
(example: 0:14:4f:f:11:28 citrus)
2.) Add IP and host name in the /etc/hosts file
(example: 192.168.etc.etc citrus)
The PARP protocol will be used for mapping between IP and MAC and for booting client.
3.) Export jumpstart directory (I assume this is done before, except this is maybe first client you are adding):
Say that your jumpstart directory is /export/jumpstart/.
Yes, you need to share this as NFS and do it as read-only with root access for anonymous user.
Have the entry in /etc/dfs/dfstab file:
share -F nfs -o ro,anon=0 -d "Jumpstart_Share update 5" /export/jumpstart
# shareall
# showmount -e
export list for jumpstartserver:
/export/jumpstart (everyone)
4.) Finally add SPARC client:
Go to below directory and add the client – you can see example of my directory structure.
Run the command without argument to see its usage.
# /export/jumpstart/distrib/sparc/5.10/Solaris_10/Tools> ./add_install_client
ERROR: Either client name or client platform group is not specified.
Usage: ./add_install_client [-i ipaddr] [-e ethernetid] [-s server:path]
[-c server:path] [-p server:path]
[-n [name_server]:name_service[(netmask)]]
[-t install boot image path] client_name platform_group
DHCP clients:
./add_install_client -d [-s server:path] [-c server:path]
[-p server:path] [-t install boot image path]
[-f boot file name] platform_name platform_group
./add_install_client -d -e ethernetid [-s server:path]
[-b "property=value"] (i86pc platform only)
[-c server:path] [-p server:path]
[-t install boot image path] [-f boot file name]
platform_group
# ./add_install_client -i 192.168.etc.etc -e 0:14:4f:f:11:28 -s servername:/export/jumpstart/distrib/sparc/5.10 citrus sun4v
You may see some cleaning, removing, updating messages.
Note: in this example I use Sun Fire T2000, so platform group is sun4v.
I like doing some manual works, but you can avoid that using more options. Let me explain.
As you see, I use only:
-s = path to installation media on boot server.
This command will add the entry to /etc/bootparams file. Then I manually add two lines:
install_config=servername:/export/jumpstart/config/citrus
sysid_config=servername:/export/jumpstart/config/citrus
You can avoid adding lines in /etc/bootparams file if you use below options when adding a client.
-c servername:/export/jumpstart/config/citrus (path to client’s configuration directory)
-p servername:/export/jumpstart/config/citrus (path to clients sysidcfg file)
Here is example of /etc/bootparams file:
citrus \
root=servername:/export/jumpstart/distrib/sparc/5.10u7/Solaris_10/Tools/Boot \
install=servername:/export/jumpstart/distrib/sparc/5.10 \
boottype=:in \
sysid_config=servername:/export/jumpstart/config/citrus \
install_config=servername:/export/jumpstart/config/citrus \
rootopts=:rsize=8192
Note: /etc/bootparams file can have more than one client. Instead of server name you can have the IP.
The client uses this file for booting.
5.)The directory /tftpboot has small net kernel for booting and you should have similar files for each client that has to boot:
rm.192.168.28.202
C0A81CCA -> inetboot.SUN4U.Solaris_10-1
C0A81CCA.SUN4U -> inetboot.SUN4U.Solaris_10-1
inetboot.SUN4U.Solaris_10-1
6.)Also make sure that three necessary services are running on jumpstart server.
svc:/network/rarp:default
svc:/network/rpc/bootparams:default
svc:/network/tftp/udp6:default
And you are done on the server side!
7.)On the SPARC client side:
You want to start network installation form OpenBoot {ok} promot.
{0} ok boot net -v - install
SC Alert: Host System has Reset
-
Sun Fire T200, No Keyboard
Copyright 2008 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.30.0, 8064 MB memory available, Serial #68096296.
Ethernet address 0:14:4f:f:11:28, Host ID: 840f1128.
Boot device: /pci@780/pci@0/pci@1/network@0 File and args: -v - install
1000 Mbps full duplex Link up
Requesting Internet Address for 0:14:4f:f:11:28 client MAC
Requesting Internet Address for 0:14:4f:f:11:28
1000 Mbps full duplex Link up
Using RARP/BOOTPARAMS...
Internet address is: 192.168.etc.etc Client IP
hostname: client-hostname client hostname
domainname: company.com domain
Found 192.168.24.123 @ 0:14:4f:6a:c0:c4 found jumpstart server on ot's MAC
root server: jumpstart-server (192.168.etc.etc)
root directory: /export/jumpstart/distrib/sparc/5.10/Solaris_10/Tools/Boot Boot directory
module /platform/sun4v/kernel/sparcv9/unix: text at [0x1000000, 0x10b373d] data at 0x1800000
module /platform/sun4v/kernel/sparcv9/genunix: text at [0x10b3740, 0x127420f] data at 0x1899a00
module /platform/SUNW,Sun-Fire-T200/kernel/misc/sparcv9/platmod: text at [0x1274210, 0x12743f7] data at 0x18efd88
module /platform/sun4v/kernel/cpu/sparcv9/SUNW,UltraSPARC-T1: text at [0x1274400, 0x1278247] data at 0x18f0580
SunOS Release 5.10 Version Generic_139555-08 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Ethernet address = 0:14:4f:f:11:28
Using default device instance data
mem = 8257536K (0x1f8000000)
avail mem = 8009105408
root nexus = Sun Fire T200
etc, etc
UNIX flavors are constantly changing and it is impossible to remember all the commands and functions, etc. So I have created this blog to post my works as well as my references and documents.
Monday, April 26, 2010
Mirroring the operating system in Solaris
In the steps below, I'm using DiskSuite to mirror the active root disk (c0t0d0) to a mirror (c0t1d0). I'm assuming that partitions five and six of each disk have a couple of cylinders free for DiskSuite's state database replicas.
Introduction
First, we start with a filesystem layout that looks as follows:
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 6607349 826881 5714395 13% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c0t0d0s4 1016863 8106 947746 1% /var
swap 1443064 8 1443056 1% /var/run
swap 1443080 24 1443056 1% /tmp
We're going to be mirroring from c0t0d0 to c0t1d0. When the operating system was installed, we created unassigned slices five, six, and seven of roughly 10 MB each. We will use slices five and six for the DiskSuite state database replicas. The output from the "format" command is as follows:
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,4000/scsi@3/sd@0,0
1. c0t1d0
/pci@1f,4000/scsi@3/sd@1,0
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
...
partition> p
Current partition table (original):
Total disk cylinders available: 5266 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 3994 6.40GB (3995/0/0) 13423200
1 swap wu 3995 - 4619 1.00GB (625/0/0) 2100000
2 backup wm 0 - 5265 8.44GB (5266/0/0) 17693760
3 unassigned wu 0 0 (0/0/0) 0
4 var wm 4620 - 5244 1.00GB (625/0/0) 2100000
5 unassigned wm 5245 - 5251 11.48MB (7/0/0) 23520
6 unassigned wm 5252 - 5258 11.48MB (7/0/0) 23520
7 unassigned wm 5259 - 5265 11.48MB (7/0/0) 23520
DiskSuite Mirroring
Note that much of the process of mirroring the root disk has been automated with the sdsinstall script. With the exception of the creation of device aliases, all of the work done in the following steps can be achieved via the following:
# ./sdsinstall -p c0t0d0 -s c0t1d0 -m s5 -m s6
1. Ensure that the partition tables of both disks are identical:
# prtvtoc /dev/rdsk/c0t0d0s2 fmthard -s - /dev/rdsk/c0t1d0s2
2. Add the state database replicas. For redundancy, each disk has two
state database replicas.
# metadb -a -f c0t0d0s5
# metadb -a c0t0d0s6
# metadb -a c0t1d0s5
# metadb -a c0t1d0s6
Note that there appears to be a lot of confusion regarding the recommended number and location of state database replicas. According the the DiskSuite reference manual:
State database replicas contain configuration and status information of all metadevices and hot spares. Multiple copies (replicas) are maintained to provide redundancy. Multiple copies also prevent the database from being corrupted during a system crash (at most, only one copy if the database will be corrupted).
State database replicas are also used for mirror resync regions. Too few state database replicas relative to the number of mirrors may cause replica I/O to impact mirror performance.
At least three replicas are recommended. DiskSuite allows a maximum of 50 replicas. The following guidelines are recommended:
• For a system with only a single drive: put all 3 replicas in one slice.
• For a system with two to four drives: put two replicas on each drive.
• For a system with five or more drives: put one replica on each drive.
In general, it is best to distribute state database replicas across slices, drives, and controllers, to avoid single points-of-failure.
Each state database replica occupies 517 KB (1034 disk sectors) of disk storage by default. Replicas can be stored on: a dedicated disk partition, a partition which will be part of a metadevice, or a partition which will be part of a logging - device.
Note - Replicas cannot be stored on the root (/), swap, or /usr slices, or on slices containing existing file systems or data.
Starting with DiskSuite 4.2.1, an optional /etc/system parameter exists which allows DiskSuite to boot with just 50% of the state database replicas online. For example, if one of the two boot disks were to fail, just two of the four state database replicas would be available. Without this /etc/system parameter (or with older versions of DiskSuite), the system would complain of "insufficient state database replicas", and manual intervention would be required on bootup. To enable the "50% boot" behaviour with DiskSuite 4.2.1, execute the following command:
# echo "set md:mirrored_root_flag=1" >> /etc/system
3. Define the metadevices on c0t0d0 (/):
# metainit -f d10 1 1 c0t0d0s0
# metainit -f d20 1 1 c0t1d0s0
# metainit d0 -m d10
The metaroot command edits the /etc/vfstab and /etc/system files:
# metaroot d0
Define the metadevices for c0t0d0s1 (swap):
# metainit -f d11 1 1 c0t0d0s1
# metainit -f d21 1 1 c0t1d0s1
# metainit d1 -m d11
Define the metadevices for c0t0d0s4 (/var):
# metainit -f d14 1 1 c0t0d0s4
# metainit -f d24 1 1 c0t1d0s4
# metainit d4 -m d14
4. Edit /etc/vfstab so that it references the DiskSuite metadevices instead of simple slices:
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no logging
/dev/md/dsk/d4 /dev/md/rdsk/d4 /var ufs 1 no logging
swap - /tmp tmpfs - yes -
5. Reboot the system:
# lockfs -fa
# sync;sync;sync;init 6
6. After the system reboots from the metadevices for /, /var, and swap, set up mirrors:
# metattach d0 d20
# metattach d1 d21
# metattach d4 d24
The process of synchronizing the data to the mirror disk will take a
while. You can monitor its progress via the command:
# metastatgrep -i progress
7. Capture the DiskSuite configuration in the text file md.tab. With Solaris 2.6 and Solaris 7, this text file resides in the directory /etc/opt/SUNWmd; however, more recent versions of Solaris place the file in the /etc/lvm directory. We'll assume that we're running Solaris 8 here:
# metastat -p tee /etc/lvm/md.tab
8. In order for the system to be able to dump core in the event of a panic, the dump device needs to reference the DiskSuite metadevice:
# dumpadm -d /dev/md/dsk/d1
9. If the primary boot disk should fail, make it easy to boot from the mirror. Some sites choose to alter the OBP "boot-device" variable; in this case, we choose to simply define the device aliases "sds-root" and "sds-mirror". In the event that the primary boot device ("disk" or "sds-root") should fail, the administrator simply needs to type "boot sds-mirror" at the OBP prompt.
Determine the device path to the boot devices for both the primary and mirror:
# ls -l /dev/dsk/c0t0d0s0 /dev/dsk/c0t1d0s0
lrwxrwxrwx 1 root root 41 Oct 17 11:48 /dev/dsk/c0t0d0s0 -> ../..
/devices/pci@1f,4000/scsi@3/sd@0,0:a
lrwxrwxrwx 1 root root 41 Oct 17 11:48 /dev/dsk/c0t1d0s0 -> ../..
/devices/pci@1f,4000/scsi@3/sd@1,0:a
Use the device paths to define the sds-root and sds-mirror device aliases (note that we use the label "disk" instead of "sd" in the device alias path):
# eeprom "nvramrc=devalias sds-root /pci@1f,4000/scsi@3/disk@0,0
devalias sds-mirror /pci@1f,4000/scsi@3/disk@1,0"
# eeprom "use-nvramrc?=true"
Test the process of booting from either sds-root or sds-mirror.
Once the above sequence of steps has been completed. the system will look as follows:
# metadb
flags first blk block count
a m p luo 16 1034 /dev/dsk/c0t0d0s5
a p luo 16 1034 /dev/dsk/c0t0d0s6
a p luo 16 1034 /dev/dsk/c0t1d0s5
a p luo 16 1034 /dev/dsk/c0t1d0s6
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 6607349 845208 5696068 13% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/md/dsk/d4 1016863 8414 947438 1% /var
swap 1443840 8 1443832 1% /var/run
swap 1443848 16 1443832 1% /tmp
Trans metadevices for logging
UFS filesystem logging was first supported with Solaris 7. Prior to that release, one could create trans metadevices with DiskSuite to achieve the same effect. For Solaris 7 and up, it's much easier to simply enable ufs logging by adding the word "logging" to the last field of the /etc/vfstab file. The following section is included for those increasingly rare Solaris 2.6 installations.
The following two steps assume that you are have an available (<=64MB) slice 3 available for logging. 1. Define the trans metadevice mirror (c0t0d0s3): # metainit d13 1 1 c0t0d0s3 # metainit d23 1 1 c0t1d0s3 # metainit d3 -m d13 # metattach d3 d23 2. Make /var use the trans meta device for logging: # metainit -f d64 -t d4 d3 Edit vfstab as follows: /dev/md/dsk/d64 /dev/md/rdsk/d64 /var ufs 1 no - Ensure that no volumes are syncing before running the following: # sync;sync;sync;init 6
Introduction
First, we start with a filesystem layout that looks as follows:
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 6607349 826881 5714395 13% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c0t0d0s4 1016863 8106 947746 1% /var
swap 1443064 8 1443056 1% /var/run
swap 1443080 24 1443056 1% /tmp
We're going to be mirroring from c0t0d0 to c0t1d0. When the operating system was installed, we created unassigned slices five, six, and seven of roughly 10 MB each. We will use slices five and six for the DiskSuite state database replicas. The output from the "format" command is as follows:
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,4000/scsi@3/sd@0,0
1. c0t1d0
/pci@1f,4000/scsi@3/sd@1,0
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
...
partition> p
Current partition table (original):
Total disk cylinders available: 5266 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 3994 6.40GB (3995/0/0) 13423200
1 swap wu 3995 - 4619 1.00GB (625/0/0) 2100000
2 backup wm 0 - 5265 8.44GB (5266/0/0) 17693760
3 unassigned wu 0 0 (0/0/0) 0
4 var wm 4620 - 5244 1.00GB (625/0/0) 2100000
5 unassigned wm 5245 - 5251 11.48MB (7/0/0) 23520
6 unassigned wm 5252 - 5258 11.48MB (7/0/0) 23520
7 unassigned wm 5259 - 5265 11.48MB (7/0/0) 23520
DiskSuite Mirroring
Note that much of the process of mirroring the root disk has been automated with the sdsinstall script. With the exception of the creation of device aliases, all of the work done in the following steps can be achieved via the following:
# ./sdsinstall -p c0t0d0 -s c0t1d0 -m s5 -m s6
1. Ensure that the partition tables of both disks are identical:
# prtvtoc /dev/rdsk/c0t0d0s2 fmthard -s - /dev/rdsk/c0t1d0s2
2. Add the state database replicas. For redundancy, each disk has two
state database replicas.
# metadb -a -f c0t0d0s5
# metadb -a c0t0d0s6
# metadb -a c0t1d0s5
# metadb -a c0t1d0s6
Note that there appears to be a lot of confusion regarding the recommended number and location of state database replicas. According the the DiskSuite reference manual:
State database replicas contain configuration and status information of all metadevices and hot spares. Multiple copies (replicas) are maintained to provide redundancy. Multiple copies also prevent the database from being corrupted during a system crash (at most, only one copy if the database will be corrupted).
State database replicas are also used for mirror resync regions. Too few state database replicas relative to the number of mirrors may cause replica I/O to impact mirror performance.
At least three replicas are recommended. DiskSuite allows a maximum of 50 replicas. The following guidelines are recommended:
• For a system with only a single drive: put all 3 replicas in one slice.
• For a system with two to four drives: put two replicas on each drive.
• For a system with five or more drives: put one replica on each drive.
In general, it is best to distribute state database replicas across slices, drives, and controllers, to avoid single points-of-failure.
Each state database replica occupies 517 KB (1034 disk sectors) of disk storage by default. Replicas can be stored on: a dedicated disk partition, a partition which will be part of a metadevice, or a partition which will be part of a logging - device.
Note - Replicas cannot be stored on the root (/), swap, or /usr slices, or on slices containing existing file systems or data.
Starting with DiskSuite 4.2.1, an optional /etc/system parameter exists which allows DiskSuite to boot with just 50% of the state database replicas online. For example, if one of the two boot disks were to fail, just two of the four state database replicas would be available. Without this /etc/system parameter (or with older versions of DiskSuite), the system would complain of "insufficient state database replicas", and manual intervention would be required on bootup. To enable the "50% boot" behaviour with DiskSuite 4.2.1, execute the following command:
# echo "set md:mirrored_root_flag=1" >> /etc/system
3. Define the metadevices on c0t0d0 (/):
# metainit -f d10 1 1 c0t0d0s0
# metainit -f d20 1 1 c0t1d0s0
# metainit d0 -m d10
The metaroot command edits the /etc/vfstab and /etc/system files:
# metaroot d0
Define the metadevices for c0t0d0s1 (swap):
# metainit -f d11 1 1 c0t0d0s1
# metainit -f d21 1 1 c0t1d0s1
# metainit d1 -m d11
Define the metadevices for c0t0d0s4 (/var):
# metainit -f d14 1 1 c0t0d0s4
# metainit -f d24 1 1 c0t1d0s4
# metainit d4 -m d14
4. Edit /etc/vfstab so that it references the DiskSuite metadevices instead of simple slices:
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no logging
/dev/md/dsk/d4 /dev/md/rdsk/d4 /var ufs 1 no logging
swap - /tmp tmpfs - yes -
5. Reboot the system:
# lockfs -fa
# sync;sync;sync;init 6
6. After the system reboots from the metadevices for /, /var, and swap, set up mirrors:
# metattach d0 d20
# metattach d1 d21
# metattach d4 d24
The process of synchronizing the data to the mirror disk will take a
while. You can monitor its progress via the command:
# metastatgrep -i progress
7. Capture the DiskSuite configuration in the text file md.tab. With Solaris 2.6 and Solaris 7, this text file resides in the directory /etc/opt/SUNWmd; however, more recent versions of Solaris place the file in the /etc/lvm directory. We'll assume that we're running Solaris 8 here:
# metastat -p tee /etc/lvm/md.tab
8. In order for the system to be able to dump core in the event of a panic, the dump device needs to reference the DiskSuite metadevice:
# dumpadm -d /dev/md/dsk/d1
9. If the primary boot disk should fail, make it easy to boot from the mirror. Some sites choose to alter the OBP "boot-device" variable; in this case, we choose to simply define the device aliases "sds-root" and "sds-mirror". In the event that the primary boot device ("disk" or "sds-root") should fail, the administrator simply needs to type "boot sds-mirror" at the OBP prompt.
Determine the device path to the boot devices for both the primary and mirror:
# ls -l /dev/dsk/c0t0d0s0 /dev/dsk/c0t1d0s0
lrwxrwxrwx 1 root root 41 Oct 17 11:48 /dev/dsk/c0t0d0s0 -> ../..
/devices/pci@1f,4000/scsi@3/sd@0,0:a
lrwxrwxrwx 1 root root 41 Oct 17 11:48 /dev/dsk/c0t1d0s0 -> ../..
/devices/pci@1f,4000/scsi@3/sd@1,0:a
Use the device paths to define the sds-root and sds-mirror device aliases (note that we use the label "disk" instead of "sd" in the device alias path):
# eeprom "nvramrc=devalias sds-root /pci@1f,4000/scsi@3/disk@0,0
devalias sds-mirror /pci@1f,4000/scsi@3/disk@1,0"
# eeprom "use-nvramrc?=true"
Test the process of booting from either sds-root or sds-mirror.
Once the above sequence of steps has been completed. the system will look as follows:
# metadb
flags first blk block count
a m p luo 16 1034 /dev/dsk/c0t0d0s5
a p luo 16 1034 /dev/dsk/c0t0d0s6
a p luo 16 1034 /dev/dsk/c0t1d0s5
a p luo 16 1034 /dev/dsk/c0t1d0s6
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 6607349 845208 5696068 13% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/md/dsk/d4 1016863 8414 947438 1% /var
swap 1443840 8 1443832 1% /var/run
swap 1443848 16 1443832 1% /tmp
Trans metadevices for logging
UFS filesystem logging was first supported with Solaris 7. Prior to that release, one could create trans metadevices with DiskSuite to achieve the same effect. For Solaris 7 and up, it's much easier to simply enable ufs logging by adding the word "logging" to the last field of the /etc/vfstab file. The following section is included for those increasingly rare Solaris 2.6 installations.
The following two steps assume that you are have an available (<=64MB) slice 3 available for logging. 1. Define the trans metadevice mirror (c0t0d0s3): # metainit d13 1 1 c0t0d0s3 # metainit d23 1 1 c0t1d0s3 # metainit d3 -m d13 # metattach d3 d23 2. Make /var use the trans meta device for logging: # metainit -f d64 -t d4 d3 Edit vfstab as follows: /dev/md/dsk/d64 /dev/md/rdsk/d64 /var ufs 1 no - Ensure that no volumes are syncing before running the following: # sync;sync;sync;init 6
Building Jumpstart Server with Root disk Mirroring
These steps are based upon the assumption that boot server, install server, config server all are on the same server.1. Put in the cd.
2. # cd /cdrom/so/Solaris_9/Tools
3. # ./setup_install_server /jumpstart_dir
/jumpstart_dir is the directory used for storing cd-images.
4. #cd /cdrom/s0/Solaris_9/Misc
5. #cp * /jumpstart_dir
6. Put in the second CD.
7. #cd /cdrom/s0/Solaris_9/Tools
8. #./add_to_install_server /jumpstart_dir
9. This would complete the boot server image as well as the install server image to the /jumpstart_dir directory.
10. get the ethernet address of the client, either from ifconfig -a command or from the
banner command from the ok prompt.
11. create the /etc/ethers file.
03:12:af:21:12:12 client-name
12. Make an entry in the /etc/hosts file corrosponding to the client-name
10.0.0.1 client-name
13. Create the sysidcfg file. This file would contain all the client identification mechanism for client. an example would be
system_locale=US
timezone=Asia/Calcutta
terminal=vt100
name_service=NONE
timeserver=localhost
security_policy=NONE
root_password=And123MpaN
network_interface=primary
{ hostname = client-name
ip_address=10.0.0.1
netmask=255.255.255.0
default_router=10.0.0.30
protocol_ipv6=no }
Here the root_password should be in encrypted format and can be a standard password for fresh installs.
14. NOTE: For the sysidcfg file, root password must be in the encrypted format, this is in the format from /etc/shadow. This can be copied from any of the existing servers.
15. create this sysidcfg file also in the /jumpstart_dir directory. However, inside the directory name of the client.
/jumpstart_dir/client-name/sysidcfg.
You need a unique sysidcfg file for each and every client.
16. a file called rules would exist in the scripts that we copied from Misc direcotry of the first CD. please edit the file, so that it contain only this line
any - - any_machine -
17. any_machine is the name of the profile file that would contain the partition information for the clients.
18. Profile file would be like the example below, this would also enable to root disk mirroring using the SVM.
File system partioning can be done based upon the following format
filesys slice start_cylinder:slice_size_by_cylinders file_system
install_type initial_install
system_type standalone
partitioning default
cluster SUNWCall
filesys mirror:d1 c1t0d0s0 c1t1d0s0 15000 /
filesys mirror:d10 c1t0d0s1 c1t1d0s1 32000 swap
filesys mirror:d20 c1t0d0s3 c1t1d0s3 32000 /var
metadb c1t0d0s7
metadb c1t1d0s7
Here we are creating a standard profile file to be used for all clients.
19. We need to verify the rules file along with the profile file for any syntax errors, to do this we would require something called the check script.
20. This check script would be available from the 1st CD, please copy the check script from the CD to the /jumpstart_dir directory.
21. after copy, please run the script.
22. If there are no errors, on profile and rules file, this would generate a rules.ok file on the /jumpstart_dir directory.
23. Share the /jumpstart_dir through NFS.
share -F nfs -o ro,anon=0 /jumpstart_dir
24. #cd /jumpstart_dir/Solaris_9/Tools/
25. Edit the inetd.conf, for tftp to work.
26. #./add_install_client -e 03:12:af:21:12:12 -s server-name:/jumpstart_dir -c server-name:/jumpstart_dir -p server-name:/jumpstart_dir/client-name sun4u
This would create the /etc/bootparams file, start the rpc.bootparamd, start in.rarpd, fill the /tftpboot directory.
27. Above steps complete the jumpstart server config.
28. Go to the client, give
{ok} boot net – install
29. See the magic happen
30. this would complete the unattended installation of client from a jumpstart-server.
2. # cd /cdrom/so/Solaris_9/Tools
3. # ./setup_install_server /jumpstart_dir
/jumpstart_dir is the directory used for storing cd-images.
4. #cd /cdrom/s0/Solaris_9/Misc
5. #cp * /jumpstart_dir
6. Put in the second CD.
7. #cd /cdrom/s0/Solaris_9/Tools
8. #./add_to_install_server /jumpstart_dir
9. This would complete the boot server image as well as the install server image to the /jumpstart_dir directory.
10. get the ethernet address of the client, either from ifconfig -a command or from the
banner command from the ok prompt.
11. create the /etc/ethers file.
03:12:af:21:12:12 client-name
12. Make an entry in the /etc/hosts file corrosponding to the client-name
10.0.0.1 client-name
13. Create the sysidcfg file. This file would contain all the client identification mechanism for client. an example would be
system_locale=US
timezone=Asia/Calcutta
terminal=vt100
name_service=NONE
timeserver=localhost
security_policy=NONE
root_password=And123MpaN
network_interface=primary
{ hostname = client-name
ip_address=10.0.0.1
netmask=255.255.255.0
default_router=10.0.0.30
protocol_ipv6=no }
Here the root_password should be in encrypted format and can be a standard password for fresh installs.
14. NOTE: For the sysidcfg file, root password must be in the encrypted format, this is in the format from /etc/shadow. This can be copied from any of the existing servers.
15. create this sysidcfg file also in the /jumpstart_dir directory. However, inside the directory name of the client.
/jumpstart_dir/client-name/sysidcfg.
You need a unique sysidcfg file for each and every client.
16. a file called rules would exist in the scripts that we copied from Misc direcotry of the first CD. please edit the file, so that it contain only this line
any - - any_machine -
17. any_machine is the name of the profile file that would contain the partition information for the clients.
18. Profile file would be like the example below, this would also enable to root disk mirroring using the SVM.
File system partioning can be done based upon the following format
filesys slice start_cylinder:slice_size_by_cylinders file_system
install_type initial_install
system_type standalone
partitioning default
cluster SUNWCall
filesys mirror:d1 c1t0d0s0 c1t1d0s0 15000 /
filesys mirror:d10 c1t0d0s1 c1t1d0s1 32000 swap
filesys mirror:d20 c1t0d0s3 c1t1d0s3 32000 /var
metadb c1t0d0s7
metadb c1t1d0s7
Here we are creating a standard profile file to be used for all clients.
19. We need to verify the rules file along with the profile file for any syntax errors, to do this we would require something called the check script.
20. This check script would be available from the 1st CD, please copy the check script from the CD to the /jumpstart_dir directory.
21. after copy, please run the script.
22. If there are no errors, on profile and rules file, this would generate a rules.ok file on the /jumpstart_dir directory.
23. Share the /jumpstart_dir through NFS.
share -F nfs -o ro,anon=0 /jumpstart_dir
24. #cd /jumpstart_dir/Solaris_9/Tools/
25. Edit the inetd.conf, for tftp to work.
26. #./add_install_client -e 03:12:af:21:12:12 -s server-name:/jumpstart_dir -c server-name:/jumpstart_dir -p server-name:/jumpstart_dir/client-name sun4u
This would create the /etc/bootparams file, start the rpc.bootparamd, start in.rarpd, fill the /tftpboot directory.
27. Above steps complete the jumpstart server config.
28. Go to the client, give
{ok} boot net – install
29. See the magic happen
30. this would complete the unattended installation of client from a jumpstart-server.
Tuesday, March 30, 2010
Removing and Unregistering a Disk Group from Sun Cluster
Lets see, how to remove a disk group from Sun Cluster running veritas volume manager. It was a bit surprising for me to see very little of this topic posted in the net, though, I did came across couple of posts for removing device groups with SVM.
Environment is a 3.1 Sun Cluster running VxVM. Normally, one would see this type of a request associated with removal of resource group or migration of applications from the server.
Make sure
a) no filesystems are mounted from the disk group.
b) Entries are not there in vfstab
In order to remove the disk group from the cluster control, you need to bring the device group offline from cluster control and then un-register the disk group from cluster.
1. Make sure no mounted file systems of the disk groups are present.
2. Make sure no entries are present in /etc/vfstab.
3. Make sure the volumes are removed ; # vxedit -g-rf rm
4. Sync the cluster ; # scconf -c -D name=,sync
5. Offline the disk group. ; # scswitch -F -D
6. Un-Register the disk group ; # scconf -r -D name=
7. Once the diskgroup is offline, Sun Cluster deports the disk group. You need to import the dg again and destroy it.
# vxdg import; # vxdg destroy
Environment is a 3.1 Sun Cluster running VxVM. Normally, one would see this type of a request associated with removal of resource group or migration of applications from the server.
Make sure
a) no filesystems are mounted from the disk group.
b) Entries are not there in vfstab
In order to remove the disk group from the cluster control, you need to bring the device group offline from cluster control and then un-register the disk group from cluster.
1. Make sure no mounted file systems of the disk groups are present.
2. Make sure no entries are present in /etc/vfstab.
3. Make sure the volumes are removed ; # vxedit -g
4. Sync the cluster ; # scconf -c -D name=
5. Offline the disk group. ; # scswitch -F -D
6. Un-Register the disk group ; # scconf -r -D name=
7. Once the diskgroup is offline, Sun Cluster deports the disk group. You need to import the dg again and destroy it.
# vxdg import
Adding Filesystem resource to Sun Cluster
There is a task to add couple of filesystems to the cluster. When I had a look at the config, I realised that each file system is configured as a hastp resource. This somewhat makes my job easier. I Just have to create the volume, make it cluster aware & enable it on Sun Cluster. Lets see how can we make this happen.
1. Create volume ; # vxassist -g testdg make testvol 25g
2. Make entries in /etc/vfstab
3. Update the cluster ; # scconf -c -D name=testdg, sync
4. Create the filesystem ; # newfs /dev/vx/rdsk/testdg/testvol
5. Register it in sun cluster ; # scrgadm -a -j testvol-res -t SUNW.HAStoragePlus -g test-rg -x FileSystemMountPoints=/global/oracle/testvol -x AffinityOn=True
6. enable the resource ; # scswitch -e -j testvol-res
7. Verify the filesystems mounted.
1. Create volume ; # vxassist -g testdg make testvol 25g
2. Make entries in /etc/vfstab
3. Update the cluster ; # scconf -c -D name=testdg, sync
4. Create the filesystem ; # newfs /dev/vx/rdsk/testdg/testvol
5. Register it in sun cluster ; # scrgadm -a -j testvol-res -t SUNW.HAStoragePlus -g test-rg -x FileSystemMountPoints=/global/oracle/testvol -x AffinityOn=True
6. enable the resource ; # scswitch -e -j testvol-res
7. Verify the filesystems mounted.
Quorum devices in sun cluster
A quorum device is a disk shared by two or more nodes in the cluster to establish a quorum for the cluster to run. Cluster operates only when a quorum of votes is available. Quorum devices are necessary to protect the cluster from split brain and amnesia situations. Each quorum device must be connected to at least two nodes.
Adding a quorum device automatically configures node-to-device paths for the nodes attached to the device. Later, if we add more nodes to the cluster, we might need to update these paths by removing then adding back the quorum device.
A SCSI quorum device is considered to be any Sun Cluster supported attached storage which connected to two or more nodes of the cluster. Dual-ported SCSI-2 disks may be used as quorum devices in two-node
clusters. However, clusters with more than two nodes require that SCSI-3 PGR disks be used for all disks with more than two node-to-disk paths. We can use a disk containing user data or one that is a member of device group as a quorum device.
Quorum Arithmetic
Quorum equation states that a cluster must have the total number of configured votes, divided by two ( Remainders are discarded ) plus one.
Q = ( TQV /2 + 1 )
TQV – Total Quorum votes
Key to understanding quorum is learning how votes are assigned and counted. Each node in a configured cluster has one ( 1 ) quorum vote. Each shared storage device configured as quorum device has votes totaling the number of connected devices minus one QD = ( TQD – 1 ). For folks who need better understanding like me, it is the number of servers the quorum device is connected minus one. If the quorum device is connected to 3 servers, then quorum devices’ vote will be two ( 2 ).
Ownership of a quorum device is decided by SCSI reservations which will be dealt at a later post. Just for better understanding I am now posting couple of outputs which are for two node and three node cluster. One can do his or her own math to understand the quorum arithmetic disscussed above.
Two-node cluster
phys-host1 # scstat -q
– Quorum Summary –
Quorum votes possible: 3
Quorum votes needed: 2
Quorum votes present: 3
– Quorum Votes by Node –
Node Name Present Possible Status
———– ——– ——– ——
Node votes: phys-host1 1 1 Online
Node votes: phys-host2 1 1 Online
– Quorum Votes by Device –
Device Name Present Possible Status
———– ——- ——– ——
Device votes: /dev/did/rdsk/d101s2 1 1 Online
Three-node cluster
phys-host1:> /usr/cluster/bin/scstat -q
– Quorum Summary –
Quorum votes possible: 7
Quorum votes needed: 4
Quorum votes present: 7
– Quorum Votes by Node –
Node Name Present Possible Status
——— ——- ——– ——
Node votes: phys-host1 1 1 Online
Node votes: phys-host2 1 1 Online
Node votes: phys-host3 1 1 Online
– Quorum Votes by Device –
Device Name Present Possible Status
———– ——- ——– ——
Device votes: /dev/did/rdsk/d200s2 2 2 Online
Device votes: /dev/did/rdsk/d199s2
Adding a quorum device automatically configures node-to-device paths for the nodes attached to the device. Later, if we add more nodes to the cluster, we might need to update these paths by removing then adding back the quorum device.
A SCSI quorum device is considered to be any Sun Cluster supported attached storage which connected to two or more nodes of the cluster. Dual-ported SCSI-2 disks may be used as quorum devices in two-node
clusters. However, clusters with more than two nodes require that SCSI-3 PGR disks be used for all disks with more than two node-to-disk paths. We can use a disk containing user data or one that is a member of device group as a quorum device.
Quorum Arithmetic
Quorum equation states that a cluster must have the total number of configured votes, divided by two ( Remainders are discarded ) plus one.
Q = ( TQV /2 + 1 )
TQV – Total Quorum votes
Key to understanding quorum is learning how votes are assigned and counted. Each node in a configured cluster has one ( 1 ) quorum vote. Each shared storage device configured as quorum device has votes totaling the number of connected devices minus one QD = ( TQD – 1 ). For folks who need better understanding like me, it is the number of servers the quorum device is connected minus one. If the quorum device is connected to 3 servers, then quorum devices’ vote will be two ( 2 ).
Ownership of a quorum device is decided by SCSI reservations which will be dealt at a later post. Just for better understanding I am now posting couple of outputs which are for two node and three node cluster. One can do his or her own math to understand the quorum arithmetic disscussed above.
Two-node cluster
phys-host1 # scstat -q
– Quorum Summary –
Quorum votes possible: 3
Quorum votes needed: 2
Quorum votes present: 3
– Quorum Votes by Node –
Node Name Present Possible Status
———– ——– ——– ——
Node votes: phys-host1 1 1 Online
Node votes: phys-host2 1 1 Online
– Quorum Votes by Device –
Device Name Present Possible Status
———– ——- ——– ——
Device votes: /dev/did/rdsk/d101s2 1 1 Online
Three-node cluster
phys-host1:> /usr/cluster/bin/scstat -q
– Quorum Summary –
Quorum votes possible: 7
Quorum votes needed: 4
Quorum votes present: 7
– Quorum Votes by Node –
Node Name Present Possible Status
——— ——- ——– ——
Node votes: phys-host1 1 1 Online
Node votes: phys-host2 1 1 Online
Node votes: phys-host3 1 1 Online
– Quorum Votes by Device –
Device Name Present Possible Status
———– ——- ——– ——
Device votes: /dev/did/rdsk/d200s2 2 2 Online
Device votes: /dev/did/rdsk/d199s2
Solaris L3 Level Questions
These are some of the L3 level unix interview questions…
1. How do you replace a failed boot disk under meta in solaris? Step by step explanation?
2. How do you remove meta only for the root slice? remaining slices should run under meta?
3. what you would do if you want to replace a slice using metareplace option?
4. what is the significance of 51% state database replicas in SVM?
5. what are the common errors you find in Solaris Volume manager?
6. You have a boot disk under svm, the machine fails to boot and remains in ok prompt? what could be the possible reason?
7. metastat -p shows a metavolume needs replacement. Metavolume is a single way mirror only. Actually you find disk and metavolumes are ok and I/O is happening to the filesystems… how will you remove the metareplace message that comes out of metastat.
8. How to create a shared disk group in VxVM?
9. What is the difference between private and public regions in Veritas Volume manager?
10. what would you do if the private region of a particular disk group is full? What are the design considerations for the size of private region in Vxvm disk group?
11. How to replace a corrupt private region? in vxvm 3.5 and greater versions…
12. How would you convert a volume from gen to fsgen? why should you do that?
13. How can you unencapsulate a boot disk in VxVM?
14. How to identify multiple paths for a disk.
15. What is the difference between Vxdmp and EMC powerpath?
16. vxdisk -o alldgs list o/p shows some disk groups in braces… What does that signify?
17. what are the various layouts that are available in VxVM?
18.What is a layered volume? how to create it using vxmake?
19.How to quickly mirror a volume, if the volume is empty?
20. How to grow a volume?
21. What is the difference between failing and failed disks?
22. How to replace a failed disk in Veritas?
23. Plex is in a disabled state. How will you recover? what are the steps to follow?
24.what is the difference between detached and disassociate state of plexes?
25. Whats the boot process of VxVM?
26. Whats the difference between SVM and VxVM? What would you recommend to your clients? why?
27.What are the various clusters you have worked on?
28. Which cluster is better VCS or Sun cluster?
29. Compare and contrast VCS and Sun Cluster.
30.how will you start VCS service? What are the configuration files in VCS?
31. How would switch a service group?
32. How would you freeze a service group?
33. What is a Split brain scenario ?
1. How do you replace a failed boot disk under meta in solaris? Step by step explanation?
2. How do you remove meta only for the root slice? remaining slices should run under meta?
3. what you would do if you want to replace a slice using metareplace option?
4. what is the significance of 51% state database replicas in SVM?
5. what are the common errors you find in Solaris Volume manager?
6. You have a boot disk under svm, the machine fails to boot and remains in ok prompt? what could be the possible reason?
7. metastat -p shows a metavolume needs replacement. Metavolume is a single way mirror only. Actually you find disk and metavolumes are ok and I/O is happening to the filesystems… how will you remove the metareplace message that comes out of metastat.
8. How to create a shared disk group in VxVM?
9. What is the difference between private and public regions in Veritas Volume manager?
10. what would you do if the private region of a particular disk group is full? What are the design considerations for the size of private region in Vxvm disk group?
11. How to replace a corrupt private region? in vxvm 3.5 and greater versions…
12. How would you convert a volume from gen to fsgen? why should you do that?
13. How can you unencapsulate a boot disk in VxVM?
14. How to identify multiple paths for a disk.
15. What is the difference between Vxdmp and EMC powerpath?
16. vxdisk -o alldgs list o/p shows some disk groups in braces… What does that signify?
17. what are the various layouts that are available in VxVM?
18.What is a layered volume? how to create it using vxmake?
19.How to quickly mirror a volume, if the volume is empty?
20. How to grow a volume?
21. What is the difference between failing and failed disks?
22. How to replace a failed disk in Veritas?
23. Plex is in a disabled state. How will you recover? what are the steps to follow?
24.what is the difference between detached and disassociate state of plexes?
25. Whats the boot process of VxVM?
26. Whats the difference between SVM and VxVM? What would you recommend to your clients? why?
27.What are the various clusters you have worked on?
28. Which cluster is better VCS or Sun cluster?
29. Compare and contrast VCS and Sun Cluster.
30.how will you start VCS service? What are the configuration files in VCS?
31. How would switch a service group?
32. How would you freeze a service group?
33. What is a Split brain scenario ?
Subscribe to:
Posts (Atom)