Configuring rootdg on a slice

January 25th, 2010

Use this procedure if you want to create a rootdg diskgroup on a single slice.

Remember that rootdg is needed for Volume Manager to start the daemons.

After this procedure vxinstall is no longer needed. Use vxdiskadm to create other diskgroups.

1. Install the software packages for Veritas Volume Manager.

2. Configure the slice as a virtual disk in the diskgroup rootdg
# vxconfigd -m disable (to kill the vxconfigd)
# vxdctl init (to initialise VxVm database)
# vxdg init rootdg (to create rootdg)
# vxdctl add disk c0t0d0s7 type=simple (IGNORE THE WARNING : Not in configuration database)
# vxdisk -f init c0t0d0s7 type=simple (to add a disk record)
# vxdg adddisk c0t0d0s7 (make a slice into a virtual disk)
# vxdctl enable (reread config in memory)
# rm /etc/vx/reconfig.d/state.d/install-db (remove placeholder file for vxinstall)

3. Reboot or restart daemons manually.

# init 6

4.Create other diskgroups with vxdiskadm

# vxdiskadm

zone migration

January 25th, 2010

Procedure to do a zone migration.
——————————————-

Actions on nodeA

create a pool called pool1 with some disk in it on NodeA

NodeA# zpool import pool1
NodeA# zfs create zones/labzone3 /zones/labzone3
NodeA# chmod 700 /zones/labzone3
NodeA# zonecfg -z labzone3
>create
>set zonepath /labzone3
>set autoboot=true
>set pool=pool_default
>add net
net:set physical=eri0
net:set address=10.45.13.202
net:end
>verify
>commit
>exit
NodeA# zoneadm -z labzone3 intall ( this takes about 20 Minutes)
NodeA# zoneadm -z labzone3 ready
NodeA# zoneadm -z labzone3 boot
NodeA# zlogin -C labzone3
labzone3# df -k
labzone3# init 0
NodeA# zonecfg -z labzone3 export -f /tmp/labzone3.cfg
NodeA# umount /zones/labzone3
NodeA# zpool export pool1

Actions on nodeB

NodeB# mkdir -p -m 700 /zones/labzone3
NodeB# zpool import pool1
….successfull
NodeB# zpool iostat
NodeB# zpool ls
NodeB# mount -F zfs pool1/labzone3 /zones/labzone3
NodeB# scp NodeA:/tmp/labzone3.cfg /tmp/labzone3.cfg
NodeB# zonecfgadm -z labzone3 -f /tmp/labzone3.cfg

NodeB# vi /etc/zones/index
change here configured into installed
NodeB#zoneadm -list -i
NodeB#ftp NodeA
get> /etc/zones/labzone3.xml
to> /etc/zones/labzone3.xml
NodeB#zoneadm -z labzone3 boot

zone boot successfullly on NodeB

Zone Configuration in step

January 25th, 2010

Here is a short guide to creating zones with Solaris Containers technology, with examples using Solaris Volume Manager and an Oracle database. It’s easy to modify these steps and add more file systems into the script.

Notes: In this example, I make only one instance or zone, called zone1. I used Solaris Volume Manager in Steps 2 and 3, and I tested this on Oracle 10.1 and 10.2.

1. Format the hard disk into slice 0.

2. Make the meta devices. For example, I have three SAN disks, and I want to make a meta device with the three disks concatenated. (Note: Please type the command all on one line.)

# metainit d60 3 1 c2t50060E800456EE02d0s0 1 c2t50060E800456EE02d1s0
1 c2t50060E800456EE02d2s0
d60: Concat/Stripe is setup
3. Make the soft partitions:

# metainit d61 -p d60 6g
d61: Soft Partition is setup
# metainit d62 -p d60 10g
d62: Soft Partition is setup
# metainit d63 -p d60 30g
d63: Soft Partition is setup
#
4. Create the file systems:

# newfs /dev/md/rdsk/d61
newfs: construct a new file system /dev/md/rdsk/d61: (y/n)? y
# newfs /dev/md/rdsk/d62
newfs: construct a new file system /dev/md/rdsk/d62: (y/n)? y
# newfs /dev/md/rdsk/d63
newfs: construct a new file system /dev/md/rdsk/d63: (y/n)? y
#
5. Create the mount point for the root file system (/ fs) and /u00 and /u01 for the Oracle database.

mkdir -p /export/zone1
mkdir /u00
mkdir /u01
mount /export/zone1
6. Execute the following script, which is shown in its entirety after Step 11.

zonecfg -z zone1 -f /usr/scripts/make.zone1.ksh

# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
– zone1 configured /export/zone1
# chmod 700 /export/zone1
7. Install zone1:

# zoneadm -z zone1 install
Preparing to install zone .
Checking file system on device
to be mounted at
Checking file system on device
to be mounted at
Creating list of files to copy from the global zone.
Copying <124550> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1021> packages on the zone.
Initializing package <49> of <1021>: percent complete: 4%
8. Run the following command to get the zone state:

# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
– zone1 installed /export/zone1
9. Transition the zone to the ready state by running the following command:

# zoneadm -z zone1 ready
10. Use the following command to get the zone state:

# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
1 zone1 ready /export/zone1
11. Boot the zone:

# zoneadm -z zone1 boot
The script to be executed is /usr/scripts/make.zone1.ksh, and here are the details:

create -b
set zonepath=/export/zone1
set autoboot=true
add fs
set dir=/u00
set special=/dev/md/dsk/d62
set raw=/dev/md/rdsk/d62
set type=ufs
end
add fs
set dir=/u01
set special=/dev/md/dsk/d63
set raw=/dev/md/rdsk/d63
set type=ufs
end
add net
set address=10.11.33.144
set physical=ce2
end

IPMP with single interface

January 25th, 2010

• For IPv4, create the single interface IPMP group.
Use the following syntax to assign the single interface to an IPMP group.

# ifconfig interface group group-name
The following example assigns the interface hme0 into the IPMP group v4test:

# ifconfig hme0 group v4test
After this step is performed, IPMP enables link-based failure detection on the interface.
In addition, you can also use the -failover subcommand of the ifconfig command to enable probe-based failure detection. The following example enables probe-based failure detection on hme0 by using the IP address currently assigned to hme0:

# ifconfig hme0 -failover
Note that unlike multiple-interface groups, the same IP address can act as both a data address and a test address. To enable applications to use the test address as a data address, test addresses must never be marked deprecated on single-interface IPMP groups.
• For IPv6, create the single interface IPMP group.
Use the following syntax to assign a single interface to an IPMP group:

# ifconfig interface inet6 group group-name
For example, to add the single interface hme0 into the IPMP group v6test, type the following:

# ifconfig hme0 inet6 group v6test
After this step is performed, IPMP enables link-based failure detection on the interface.
In addition, you can also use the -failover subcommand of the ifconfig command to enable probe-based failure detection. The following example enables probe-based failure detection on hme0 by using the IP address currently assigned to hme0:

# ifconfig hme0 inet6 -failover
Note that unlike multiple-interface groups, the same IP address can act as both a data address and a test address. To enable applications to use the test address as a data address, test addresses must never be marked deprecated on single-interface IPMP groups.
In a single physical interface configuration, you cannot verify whether the target system that is being probed has failed or whether the interface has failed. The target system can be probed through only one physical interface. If only one default router is on the subnet, turn off IPMP if a single physical interface is in the group. If a separate IPv4 and IPv6 default router exists, or multiple default routers exist, more than one target system needs to be probed. Hence, you can safely turn on IPMP.

Zone Configuration in the Solaris 10 OS

December 24th, 2009

Here is a short guide to creating zones with Solaris Containers technology, with examples using Solaris Volume Manager and an Oracle database. It’s easy to modify these steps and add more file systems into the script.
Notes: In this example, I make only one instance or zone, called zone1. I used Solaris Volume Manager in Steps 2 and 3, and I tested this on Oracle 10.1 and 10.2.
1. Format the hard disk into slice 0.
2. Make the meta devices. For example, I have three SAN disks, and I want to make a meta device with the three disks concatenated. (Note: Please type the command all on one line.)
# metainit d60 3 1 c2t50060E800456EE02d0s0 1 c2t50060E800456EE02d1s0
1 c2t50060E800456EE02d2s0
d60: Concat/Stripe is setup
3. Make the soft partitions:
# metainit d61 -p d60 6g
d61: Soft Partition is setup
# metainit d62 -p d60 10g
d62: Soft Partition is setup
# metainit d63 -p d60 30g
d63: Soft Partition is setup
#
4. Create the file systems:
# newfs /dev/md/rdsk/d61
newfs: construct a new file system /dev/md/rdsk/d61: (y/n)? y
# newfs /dev/md/rdsk/d62
newfs: construct a new file system /dev/md/rdsk/d62: (y/n)? y
# newfs /dev/md/rdsk/d63
newfs: construct a new file system /dev/md/rdsk/d63: (y/n)? y
#
5. Create the mount point for the root file system (/ fs) and /u00 and /u01 for the Oracle database.

mkdir -p /export/zone1
mkdir /u00
mkdir /u01
mount /export/zone1
6. Execute the following script, which is shown in its entirety after Step 11.
zonecfg -z zone1 -f /usr/scripts/make.zone1.ksh

# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
– zone1 configured /export/zone1
# chmod 700 /export/zone1
7. Install zone1:
# zoneadm -z zone1 install
Preparing to install zone .
Checking file system on device
to be mounted at
Checking file system on device
to be mounted at
Creating list of files to copy from the global zone.
Copying <124550> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1021> packages on the zone.
Initializing package <49> of <1021>: percent complete: 4%
8. Run the following command to get the zone state:
# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
– zone1 installed /export/zone1
9. Transition the zone to the ready state by running the following command:
# zoneadm -z zone1 ready
10. Use the following command to get the zone state:
# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
1 zone1 ready /export/zone1
11. Boot the zone:
# zoneadm -z zone1 boot
The script to be executed is /usr/scripts/make.zone1.ksh, and here are the details:
create -b
set zonepath=/export/zone1
set autoboot=true
add fs
set dir=/u00
set special=/dev/md/dsk/d62
set raw=/dev/md/rdsk/d62
set type=ufs
end
add fs
set dir=/u01
set special=/dev/md/dsk/d63
set raw=/dev/md/rdsk/d63
set type=ufs
end
add net
set address=10.11.33.144
set physical=ce2
end