Wednesday, December 15, 2010

Encapsulation and Rootability

Encapsulation :

Solaris :

Encapsulation is the process of converting partitions into volumes to bring those partitions under VxVM control. Only sliced layout is allowed on encapsulated disk. Boot disk can not be in cds layout.
You can not use stripe, Raid-5, concat-mirror or strip-mirror layouts for root disks. Also do not use DRL on system volumes except in opt and var.

You should use the menu based tool vxdiskadm tool to "Encapsulate one or more disks".

Partition table of an encapsulated disk :
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -  2060       10.00GB    (2061/0/0)   20972736
  1       swap    wu    2063 -  5358       15.99GB    (3296/0/0)   33540096
  2     backup    wm       0 - 14086       68.35GB    (14087/0/0) 143349312
  3        usr    wm    5359 -  8450       15.00GB    (3092/0/0)   31464192
  4 unassigned    wm    8451 - 10511       10.00GB    (2061/0/0)   20972736
  5          -    wu       0 - 14086       68.35GB    (14087/0/0) 143349312
  6        var    wm   12161 - 14086        9.35GB    (1926/0/0)   19598976
  7          -    wu    2061 -  2062        9.94MB    (2/0/0)         20352

Mappping of Volumes and slices in an encapsulated disk :

root slice -> rootvol
usr slice ->  usr
var slice -> var
swap slice -> swapvol


HP-UX :

Conversion is the process of enabling LVM PVs to be used by VxVM.
You can convert unused physical volumes and PVs in the Volume groups.

Following are limitations of LVM conversion :
a. A VG containing /, /usr, dump or primary swap volumes
b. A VG with insufficient space for metadata
c. Disk usedused by Service Guard cluster
d. Disk containing bad blocks

To convert unused PVs :

1. Check for any LVs in the PV. There should not be any data on the PV
# pvdisplay /dev/dsk/c1t0d0

2. Remove the LVM disk information.
# pvremove /dev/dsk/c1t0d0

3. Put the disk into VxVM control
# vxdisksetup c1t0d0

To convert volume Groups :
1. You can use vxvmconvert utility.

Volume requirements :
1. All volumes on the root disk must be in the disk group that you  choose to be the bootdg disk group.
2. The names of the volumes with entries in the LIF LABEL record must be standvol, rootvol, wapvol and dumpvol. The names of the volumes for other file systems on the rootdg are  generated by appending vol to the name of their mount point under /.
3. Any volume with an entry in the LIF LABEL record must be contiguou. It can have only one subdisk and it cannot span multiple disks.
4. The rootvol and swapvol must have the special  volume usage types root and swap respectively.
5. Disk layout should be hpdisk and you should not use DRL on the rootdg volumes


Rootability :
It is the proces of putting the root file system, swap and other file systems (/usr,..) on the boot disk under VxVM control.

Limitations of VxVM Boot disk :
1. You have to perform additional steps during OS upgrades on Solaris machines.
2. You should not grow or change the layout of boot disk volumes as the volumes are mapped to the underlying partition (slice).

Solaris :
Include rotdisk and rootmirror in the bootlist using eeprom.

HP-UX :
Set primary or alternative boot path from the boot menu or from the command line.
Main Menu -> co pa alt path
setboot - p primary_path -a alternative_path


Creation of Alternate Boot Disk:

Solaris:
1. Mirror root volume only
# vxrootmir alternate_disk

2. Mirror other volumes
# vxmirror -g rootdg boot_dik alternate_disk

3. Setup boot information
# vxbootsetup

HP-UX :
1. Mirror the root volume :
# vxrootmir -v -b alternate_disk

2. To mirror individual volumes manually :
# vxdisksetup -iB c0t1d0 format=hpdisk
# vxdg -g rootdg adddisk rootdisk02=c0t1d0
# vxassist -g bootdg mirror standvol dm:rootdisk02

3. Create the boot information on the alternative disk
# vxvmboot -v /dev/rdsk/c0t1d0


To boot from alternative disk in Solaris :

1. Set the eeprom variable use-nvramrc?
ok> setenv use-nvramrc? true
ok> reset

2.  Check for available boot disk aliases
ok> devalias
rootdisk
rootmirror

3. Boot from the alternate boot dik
ok> boot rootmirror

To boot from alternative disk in HP-UX :

1. Interrupt the boot process by pressing any key within 10 seconds of seeing the first message in the console.

2. In the main menu, check forthe alternate boot path
co alt path

3. If the alternate path is found, you can boot from it.
bo alt

1 comment:

  1. Really liked your blog Raja.. Keep doing the good job

    ReplyDelete