Wise people learn when they can; fools learn when they must - Arthur Wellesley

Sunday, 28 December 2014

Solaris Practice-2 [ zones ]


PRACTICE WORK-SHEET-2 [zones]

Well, learned Zones?

OK…

Now time to have some Practice to check How Frequently or without looking to our notebook we can solve the things OR how much command we have on the Topics.

1.  What is zone?
2.  What are the types of zones?
3.  List some benefits of zones?
4.  What is Global zone & Non Global zone?
5.  What are the types of NGZ?
6.  What is diff between whole root zone & sparse root zone?
7.  What is zonepath?
8.  List & define the daemons & their functions for zones?
9.  Is it possible to assign different types of file systems to NGZ? If yes then what is the procedure to do so.
10. What are the zone states? Define all
11. How to assign physical disk to NGZ?
12. What are the IP management schemes available in zones? Define with         example
13. What is difference between zone login and zone console login?


14. How to do console login to NGZ?
15. How to add the extra IP to NGZ?
16. How to rename the NGZ?
17. How many NGZ created in one GZ?
18. Where the zones config files stored? [/etc/zones/<zone-name>.xml]
19. Which file has zones current config state? [/etc/zones/index.xml]
20. How to check the zone is global or non-global?
There is a hit & run method to know this, run the “dladm show-dev” cmd Wherever it runs mean GZ, & where throw error its NGZ… hohoho hihihi …. What? It’s true; ok don’t like this… no prob
I have one more tech solution of this; have heard “pkgcond” cmd?
Ok… no issues, just man it.
root@sol-test-1:>/# pkgcond is_nonglobal_zone
root@sol-test-1:>/# echo $?
1
So what was that? I was asking to sol-test-1 that is this nonglobal zone? And by echo$? I checked the status of exit_code & it is 1 (unsuccessful) means no it is not NGZ,
Let’s check this again by asking about GZ
root@sol-test-1:>/# pkgcond is_global_zone
root@sol-test-1:>/# echo $?
0
Hurrraaaah, this is GZ

21. How to check the zone is whole root or sparse root?
We can check this also by two methods
One is as above mentioned
root@sol-test-1:>/# pkgcond is_whole_root_nonglobal_zone
root@sol-test-1:>/# echo $?
1
This way we need to login in zone and then run the cmd, otherwise we can
root@sol-test-1:>/# zonecfg -z tzone4 info |grep -i inherit
There is nothing in o/p, means it is whole root zone
root@sol-test-1:>/# zonecfg -z newzone info |grep -i inherit
inherit-pkg-dir:
inherit-pkg-dir:
inherit-pkg-dir:
inherit-pkg-dir:
This is sparse root zone
22. How to boot/reboot/halt a zone?
23. What are common resources available for NGZ’s?
24. What is rctl?
25. What is the process to delete a zone?
Halt à uninstall à delete [if required use –F option]
26. How to control the resources in NGZ?
27. How to boot NGZ in single user mode?
28. How to check the process statistics of NGZ’s?
29. How to check the disk utilization of NGZ’s?



LAB WORK

30. Create a simplest NGZ sparse root zone “testz1” with shared ip
31. Install & boot the testz1 also check zone state after each step
32. Console login to testz1 and complete the installation
33. Add a lofs FS in testz1
34. Add a device “tape” in testz1
35. Add a disk from GZ to NGZ testz1
36. Add a zfs dataset to testz1
37. Add an additional ip to testz1
38. Add attributes like name—department—phone no in testz1
39. Mount a dir /testdir from GZ to NGZ testz1 without rebooting NGZ
40. Add 1 cpu to NGZ testz1
41. Remove the recently added cpu
42. Again add cpu with range 1-2 to NGZ testz1
43. Add physical memory=200mb,swap=100mb,lock the mem to min 100mb in testz1
44. Remove the cpu setting
45. Add the cpu share of 30% to testz1
46. Increase the phy mem temporarily by 400mb in testz1 without reboot
47. Increase the swap to 256mb in testz1 without reboot
48. Check the rctls of testz1 from GZ
49. Check all zone related available rctls
50. View the config file of testz1
51. Remove all FS, devices, cpus, memory, swap….. from testz1
52. Delete the testz1
53. Create another NGZ testz2 with size limitation of 1gb
54. The ip setting for testz2 will be exclusive
55. Add a ufs /testdir to testz2
56. Move this zone to /export/zones/newzone
57. Add a zfs dataset to this NGZ newzone
58. Migrate the newzone to other solaris system and boot there
59. Rename the newzone to testz3
60. Change the hostname/ip of testz3
61. Clone the testz3 and create new NGZ clonedzone1 from the clone of testz3
62. Create a whole root zone testz4 
63. Check the resources on all zones from GZ   [prstat –Z]
64. Try to find the files greater than 100mb on testz4 from GZ
65. Renice the find process to -19 from GZ
66. Check all running services of testz3 from GZ
67. Find the processes on tetsz3 from GZ   [prstat –z testz3]
68.  







No comments:

Post a Comment