1. df -h
2. format <-------- create root tag partition s0 = 5g (Please create partition on empty disk )
3. newfs /dev/dsk/c1t2d0s0
#mkdir zones
4. mkdir /zones/bdxapi01
5. vi /etc/vfstab
/dev/dsk/c1t2d0s0 /dev/rdsk/c1t2d0s0 /zones/bdxapi01 ufs 2 yes logging
6. mountall
Note: Please enable VERITAS if not enabled
vxdctl mode ( to check the status )
vxconfigd -k ( to disable the VERITAS )
vxdctl init ( if volboot file not exist )
vxdctl enable ( to enable the VERITAS )
vxdisk list ( to check the VERITAS disk information )
7. Vxdiskadm option-2 (encapsulate)
- localdg ------>Specify the disk group name
- local01 .......Specify the disk name
- sliced ......Specify the format model (by default cds format)
=====
If encapsulation fails... then
a. vxdisksetup -if c1t2d0
b. vxdiskunsetup -C c1t2d0
c. then do steps 2-7 again
=====
8. reboot
9. vxprint -ht
10. vxmksdpart -g localdg local01-01 0 0x02 0x00
vxmksdpart -g <disk group > <sub disk> slice tag flag
Or
vxmksdpart -g bdxapi01_dg0 bdxapi01_dg001-01 0 0x02 0x00 ( This is important step for future updates )
vxmksdpart -g bdxapi02_dg0 bdxapi02_dg001-01 0 0x02 0x00
11. A) vxedit -g localdg rename rootvol2-01 z1-01
vxedit -g <disk group> rename <plex old name> <plex new name>
Or
vxedit -g bdxapi01_dg0 rename rootvol2-01 bdxapi01-01 (to rename plex)
vxedit -g bdxapi02_dg0 rename rootvol2-01 bdxapi02-01
b) vxedit -g localdg rename rootvol2 z1
vxedit -g <disk group> rename <volume old name> <volume new name>
Or
vxedit -g bdxapi01_dg0 rename rootvol2 bdxapi01 ( to rename volume )
vxedit -g bdxapi02_dg0 rename rootvol2 bdxapi02
12. vi /etc/vfstab to modify the devices ( edit the volume name )
Note:
Please edit the new volume name in /etc/vfstab entry
From:
/dev/vx/dsk/localdg/rootvol2 /dev/vx/rdsk/localdg/rootvol2 /zones/z1 ufs 2 yes logging
To:
/dev/vx/dsk/localdg/z1 /dev/vx/rdsk/localdg/z1 /zones/z1 ufs 2 yes logging
13. vxassist -g localdg make localhome 5g ( to create volumes )
vxprint -ht
14. mkfs -F vxfs /dev/vx/rdsk/localdg/localhome ( to create file system for VXFS )
Note: Please create directory for mount point
Example:
#cd /zones/bdxapi01
#mkdir localhome
15. vi /etc/vfstab to add all new devices/mount points ( Please edit the /etc/vfstab file below mentioned)
#
/dev/vx/dsk/localdg/localhome /dev/vx/rdsk/localdg/localhome /zones/bdxapi01/localhome vxfs - yes -
Example:
# zone01
/dev/vx/dsk/zone1_dg/patrol /dev/vx/rdsk/zone1_dg/patrol /zones/z1/patrol vxfs - yes -
/dev/vx/dsk/zone1_dg/controlm /dev/vx/rdsk/zone1_dg/controlm /zones/z1/controlm vxfs - yes -
/dev/vx/dsk/zone1_dg/localhome /dev/vx/rdsk/zone1_dg/localhome /zones/z1/localhome vxfs - yes -
/dev/vx/dsk/zone1_dg/sbt /dev/vx/rdsk/zone1_dg/sbt /zones/z1/sbt vxfs - yes -
/dev/vx/dsk/zone1_dg/orahome /dev/vx/rdsk/zone1_dg/orahome /zones/z1/orahome vxfs - yes -
/dev/vx/dsk/zone1_dg/sbtlog /dev/vx/rdsk/zone1_dg/sbtlog /zones/z1/sbtlog vxfs - yes -
15. mountall ( it should be mounted with above mentioned mount point)
Note: Please start to create zone
#mkdir /zones/bdxapi01/boot
#chmod 700 /zones/bdxapi01/boot
#zonecfg -z <zone name > (Lets assume zone name as zone1)
#zonecfg:zone1>create (for sparse root zone )
#zonecfg:zone1>create -b ( for whole root zone )
#zonecfg:zone1>set zonepath=/zones/bdxapi01/boot
#zonecfg:zone1>set autoboot=true
#zonecfg:zone1>add net ( to add n/w interface )
#zonecfg:zone1:net>set physical=bge0
#zonecfg:zone1:net>set address=170.137.228.250
#zonecfg:zone1:net>end
#zonecfg:zone1>info
#zonecfg:zone1>verify
#zonecfg:zone1>commit
#zonecfg:zone1>add fs
#zonecfg:zone1:fs>set dir
#zonecfg:zone1:fs>set special=/zones/bdxapi01/localhome
#zonecfg:zone1:fs>set type=lofs
#zonecfg:zone1:fs>set options=rw
#zonecfg:zone1:fs>end
#zonecfg:zone1>info
#zonecfg:zone1>verify
#zonecfg:zone1>commit
#zonecfg:zone1>exit
Note: you can specify no. of file systems using above mentioned configuration
16. zoneadm list -vc ( Now you can find zone1 is in installed state )
Note: Please create any file name under /var/tmp for backup purpose
17. zonecfg -z zone1 -f /var/tmp/z1
18. zoneadm -z zone1 install (after execution of this command it should be in configured state )
19. zoneadm -z zone1 boot (after execution of this command it should be in running state)
20. zlogin -C zone1 <-- If you want set time zone, hostname, root-password, etc
No comments:
Post a Comment