Vous êtes sur la page 1sur 58

1. How to create a Null file? Ans: #touch file name. 2. How to redirect the data?

Ans: #cat source > destination. 3. How to nullify the file? Ans: # /dev/null/ file name or #_>file name. 4. If C drive is filled. Some reason it has restarted. After restarting, normal users are unable to access the server, but the server is up and running? Any reasons? Ans: 5. How many max and min slices per disk in Solaris? Ans: 0-7 slices. 6. Sometimes RAM is empty and SWAP also empty, but system says busy why? Ans: Cache is full need to restart the system. 7. What are the software groups in Solaris? Ans: Software groups are collections of Solaris OS software packages. Each software group includes support for different functions and hardware drivers. The Solaris OS is made up of six software groups. 1. Reduced Networking Support software group. 2. Core System Support software group. 3. End User Solaris software group. 4. Developer Solaris software group. 5. Entire Solaris software group.

6. Entire Solaris software group plus Original Equipment Manufacturers (OEM) support.
Minimal Core Metacluster (SUNWCmreq): The Metacluster SUNWCmreq is a Metacluster. It allows you to create a minimal core Metacluster by deselecting packages from the core Metacluster. Reduced Network Support Software Group (SUNWCrnet): This group contains the minimum software that is required to boot and run a Solaris system with limited network service support. The Reduced Networking software group provides a multiuser text-based console and system administration utilities. This software group also enables the system to recognize network interface, but does not activate network services. A system installed with the Reduced Networking software group could, for example, be used as a thin-client host in a network. Core Software Group (SUNWCreq): The core software group contains the minimum software required to boot and run the Solaris OS in a minimum configuration, without the support to run many server applications. The Core software group includes a minimum of networking software, including Telnet, File Transfer Protocol (FTP), Network File System (NFS), Network Information Service (NIS) clients, and Domain Name Service (DNS). This software group also includes the

drivers required to run the Common Desktop Environment (CDE) but does not include the CDE software. The Core software group also does not include online manual pages. End User System Support Software Group (SUNWCuser): The End User System Support Software group contains the Core Software group and also contains the recommended software for an end user plus the CDE. Developer System Support Software Group (SUNWCprog): The Developer System Software Group contains the End User System Support Software Group. It also contains the libraries; include files, the online manual pages and the programming tools for developing software. Entire Distribution Software Group (SUNWCall): The Entire Distribution software group contains the Developer System Support Software Group. It also contains additional software needed for servers. The software that is in the Entire Distribution software group is the entire Solaris OS software release minus OEM support. Entire Distribution Plus OEM Support Software Group (SUNWCXall): The Entire Distribution plus OEM Support software group contains the entire Solaris OS software release. It also contains additional hardware support for OEMs and hardware not on the system at the time of installation. This software group is recommended when you are installing the Solaris OS software on no-Sun servers that use UltraSPARC processors.

To view the names of the cluster configurations, perform the command: #grep METACLUSTER/var/sadm/system/admin/.clustertoc METACLUSTER=SUNWCXall METACLUSTER=SUNWCall METACLUSTER=SUNWCprog METACLUSTER=SUNWCuser METACLUSTER=SUNWCreq METACLUSTER=SUNWC METACLUSTER=SUNWC rnet mreq

To determine which cluster configuration has been installed on the system, perform the command: #cat/var/sadm/system/admin/CLUSTER CLUSTER=SUNWCXall

8. What is package and how to add a package?


Ans: Package: The term package refers to the methods of distributing software products and installing them in systems. In its simplest form, a package is a collection of files and directories. Software packages contain: A. Files that describe the package and the amount of disk space required for installation. B. Compressed software files to be installed on the system. C. Optional scripts that run when the package is added or removed.

The /var/sadm/install/contents File is a complete record of all the software packages installed on the local system disk. It references every file and directory belonging to every software package and shows the configuration of each product installed. To list the contents of the /var/sadm/install/contents file, perform the command: # more /var/sadm/install/contents

The pkgadd command updates the /var/sadm/install/contents file each time new packages are installed. The pkgrm command uses the /var/sadm/install/contents file to determine where the files for a software package are located on the system. When package is removed from the system, the pkgrm command updates the /var/sadm/install/contents file.

9. How to check whether a package is installed or not?


ANS: To determine if a particular file was installed on the system disk and to find the directory in which it is located, use the pkgchk command with either the full or partial path name of the command you want to report on. For example, to verify that the showrev command is installed on the system disk, perform the command: #pkgchk l p showrev

10. How to check the installed softwares and check for a particular package?
Ans: Use the pkginfo command to display information about the software packages installed on the local systems disk. The /var/sadm/pkg directory maintains a record of all installed packages. For ex: to display information about software packages installed on the local systems disk, perform the command: #pkginfo |more

To display all the available information about the software packages, use the pkginfo command with l option. For Ex: to view additional information about each software package installed on the local systems hard drive, perform the command: #pkginfo l |more

To display the information for a specific software package, specify its name on the command line. For ex: to view the information for the SUNWman software package, perform the command: #pkginfo l SUNWman

To determine how many packages are currently installed on disk, perform the command: #pkginfo | wc l

To view information about packages that are located on the Solaris 10 OS Software 1 CD-ROM, perform the command: #pkginfo d /cdrom/cdrom0/s0/Solaris_10/Product |more

To view information about packages those are located on any of the remaining Solaris 10 software CD-ROMs or on the Solaris 10 OS software DVD, perform the command: #pkginfo d /cdrom/cdrom0/Solaris_10/product |more 11. How to add a package? Ans: When you add a software package, the pkgadd command copies the files from the installation media to the local systems disk and executes scripts to uncompress files. By default, the pkgadd command requires confirmation during the package add process. For Ex: to transfer the SUNWvts software package from a CD-ROM and install it on the system, perform the commands: #cd /cdrom/cdrom0/Solaris_10/ExtraValurs/CoBundeled/SunVTS_6.0/packages #pkgadd d . SUNWvts Checking a package installation: The pkgchk command checks to determine if a package has been completely installed on the system. The pkgchk command also checks the path name, the file size and checksum, and he file attributes of a package. If the pkgchk command does not display a message, it indicates the package was installed successfully and that no changes have been made to any files or directories in the package. The following example checks the contents and attributes of the SUNWladm software package currently installed on the system #pkgchk SUNWladm

To list the files contained in a software package, use the v option. For Ex: to list the files in the SUNWladm software package, perform the command: #pkgchk v SUNWladm

The l option with the pkgchk command lists information about selected files that make up a package. For Ex: to list information about the /usr/bin/showrev file, perform the command: #pkgchk l p /usr/bin/showrev If the p option is used; the full path must be typed for the pkgchk command to return information about the file. I the p option is used; a partial path name can be supplied. For Ex: the pkgchk command does not return any information if the /usr/bin/path is removed from the previous example. #pkgchk l p showrev 12. How to remove a package? Ans: The pkgrm command removed a software package from the system and deleted all the files associated with that package, unless other packages share those files.

By default, the pkgrm command requires confirmation to continue removing a package and issues a message to war about possible package dependencies. If package dependencies do exist, the command again requires confirmation to continue with the package removal process. The following command removes the SUNWapchr software package from the system. Note: Be cautious of the dependency warnings you receive when removing a package. The system allows you to remove these packages even though they may be required by a different package. #pkgrm SUNWapchr (Here it says the following package is installed under root, do you want to remove the package? [Y, n? q] y Removal of <SUNWapchr> was successful. Note: A file shared by two or more packages displays the message filename <Shared pathname not removed>. The message is removed only when the file is no longer shared. 13. How to add a package using a spool directory? Ans: For convenience, copy frequently installed software package from the Solaris 10 software CDROMs Solaris 10 software DVD to a spool directory on the system. The default installation directory for packages that have been spooled, but not installed, is /var/spool/pkg. The pkgadd command, by default, looks in the /var/spool/pkg directory for any packages specified on the command line. Copying packages from the CD-Rom or DVD into a spool directory is not the same as installing the packages on disk. To copy a package from the Solaris 10 OS software CD-ROM into the /var/spool/pkg directory, perform the command: #pkgadd d /cdrom/cdrom0/s0/Solaris_10/Product s spool SUNWauda To verify that the package exists in the spool directory, perform the command: #ls al /var/spool/pkg To add the package from the spool area, perform the following: #pkgadd SUNWauda To remove the package from a spool directory, use the pkgrm command with the s option. #pkgrm s spool SUNWauda If alternative spooling directories exist, specify which directory to use by adding a directory path to the s option. For Ex: to select the /export/pkg directory, perform the commands: #pkgadd d /cdrom/cdrom0/s0/Solaris_10/Product s /export/pkg SUNWauda #pkgrm s /export/pkg SUNWauda

14. What is the difference between #showrev p and #patchadd p?

Ans: Command output is the same for the patchadd p and showrev p; however the patchadd command takes longer to display patch information. The showrev command is a binary, and the patchadd command is script. 15. How to check the kernel patch? Ans: #uname a 16. How to remove/back out the patch? Ans: #patchrm patchno (105050-01) When you remove a patch, the patchrm command restores all files that were modified or replaced by that patch, unless: 1. The patch was installed with the patchadd d option (which instructs the patchadd command not to save copies of files being updated or replaced) 2. The patch is required by another patch. 3. The patch has been obsolete by a later patch. The patchrm command calls the pkgadd utility to restore packages that were saved during the initial patch installation. Note: 1.Patches can be added using the d option (no save) to save space. When this option is used, patch add does not save copies of the files being updated or replaced, and therefore cannot be backed out. 2. When you use #patchadd pathno command it takes the back up of old files to the backup location and the new patch gets installed. It is a safe command to add patches. If the patch doesnt support then simply we can remove the new patch by using patchrm command. Once you fire the patchrm command it will replace the old patch (Back out patch) and deletes the new patch. 17. What is the default location for patches? Ans: /var/sadm/patch 18. Commands are stored in which location? Ans: /sbin/usr 19. When you create a new directory there should be two hidden files dot and double dot (. , ..) What are these? (ls a) Ans: Dot = root information and Double dot = parent directory information 20. What is OBP (Open Boot PROM)? Ans: 21. How to check the configuration of the system? Ans: #prtconfig 22. What is OBP (Open Boot PROM) Ans: Firmware: Program installed on hardware is called firmware. This firmware is a program built in a chip which is of 1 Mbytes size. It acts like a mediator between devices and the processor. Because processor doesnt know the high level language, so firmware is must to detect peripheral

devices like key board, mouse and so on.. This firmware program built in a chip is called PROM chip. Every system has an host ID which is unique. ROM: Read only memory (Searches Sequentially) RAM: Random Access Memory (Searches Randomly) PROM: (Programmable Read only memory) PROM has access to standard set of generic device drivers. Sun systems have a boot PROM chip which is usually found in a pluggable socket in older systems. After 3.X PROM version on wards the chips are permanently soldered to main system board. In old systems if the PROM got corrupts then we need to replace the old one with new chip. Flash memory is introduced after 3.X version of PROM. In flash memory it allows to load a new boot program into the flash memory in case of the data got corrupted. NVRAM: The user configurable parameters are called NVRAM parameters. This is also like a chip and it is located on the mother board and it contains integrated lithium battery. NVRAM is mainly used to change the default parameters. We cannot change the default parameters stored in the PROM chip. A copy of default parameters will be saved to the NVRAM chip at the time of first booting. We can change the default parameters to custom level and we will save them in NVRAM. Every time you reboot the system the NVRAM stores the PROM parameter settings. PROM: It contains A. Post, B. Generic Device Drivers, C. User Area and D. Default parameters.

A. POST: When you turn on the CPU the SMPS converts the AC into DC and which is further
divided into different voltages according to the different peripherals attached to the system. In Post a low level post code is initiated. It checks all the devices attached to the system. If the post code is not completed successfully it doesnt go the next step and throws an error message. For ex: Key board is not connected or mouse is not working properly and so on. If everything is fine then it goes to the Generic Device Drivers.

B. Generic Device Drivers: After the successful completion of post the firmware takes control of
memory and then the CPU. It searches for the devices attached to the system and installs the default generic device drivers. The CPU doesnt recognize/identify the devices without the drivers. Here it installs the device drivers which are necessary to boot the system only. The remaining drivers we will install in OS mode. After successful completion of drivers installation it goes to User Area.

C. User Area: PROM has an user area. It is place in PROM chip where a user can execute
commands like auto boot parameter and other parameters like time and date settings etc., User can only change parameters only at ok prompt.

D. Default Parameters: PROM chip has some of the default parameters to boot the system. If we
change the default parameters wrongly then there will be a boot failure. Then we need to copy the default parameters to the NVRAM chip to boot successfully. NVRAM: NVRAM contains: A. EEPROM, B. Host ID. C. Date & Time & D. Lithium Battery.

A. EEPROM (Electronically Erasable Programmable Read Only Memory): The user


configurable parameters are known as EEPROM parameters. In EEPROM we can easily change the default parameters to custom level to boot the system. User default settings will be saved in EEPROM in NVRAM.

B. Host ID: The system host ID: 805d6f9e. It is unique. If the PROM chip program corrupts then
we can reprogram only by using this Host ID.

C. Lithium Battery: It includes with NVRAM chip. It provides back up for configuration
information and also stores the system time and date. It maintains the back up of NVRAM parameters while the system is shut down. 23. What is the command in OBP to check the system configuration? Ans: ok banner. & ok printenv. 24. How to check the network cards in OBP? Ans: ok show-nets 25. What is the difference between prob scsi and prob scsi all? Ans: ok prob SCSI: It identifies and displays the internal scsi bus. Ok prob SCSI all: It identifies and displays all the devices on all the scsi buses. 26. What is the back ground process for #devfsadm command? Ans: When you fire devfsadm command it runs the following three commands. /etc/path_to_inst /dev/ /devices/ Device Tree: It is a table contains all the device drivers. It will detect the new devices connected to the system and loads the drivers. Once you fire the devfsadm command it checks in device tree and it will check for the device and drivers. If it found the device without the driver it will install the drivers and it store in the afore said three files. Dynamically updates the drivers and update to the files. Once you fire devfsadm command it will update the device info to the following three files: /etc/path-to-install; /dev/ and /devices files.

A. /etc/path_to_inst: For each device, the system records its physical name and instance name
in /etc/path_to_inst file. These names are used by the kernel to identify every possible device. This file is read only at boot time. The /etc/path_to_inst file is maintained by the kernel, and it is generally nor necessary, nor is it advisable, for the system administrator to change this file. Kernel searches for devices using instance names only, because if the kernel searches for the devices using physical names it will take time to check the full path of the physical device name. So kernel assigned abbreviated names to devices called Instance Names. Instance names can be identified by 3 types for disks: a. Sdn: Where sd is the disk name and n is the number. Such as sdo, sd1 for the first and second SCSI disks. b. Dadn: Where dad (Direct access device) is the disk name and n is the number. Such as dad0, dad1 are the first and second hard disks. c. Fcdisk

We should not edit this file. Suppose a scsi controller has many disks and all the disk names must be unique. If you assign same name to any of the two disks in a controller then the system by itself to identify and the system is in panic (restarted). This is based on major and minor numbers.

B. /dev: This directory contains logical device names. The device name contains the controller
number, target number, device number and the slice number. In this directory the logical device names for the purpose of user understanding.

C. /devices: This directory contains the physical device names. These device names are for the
purpose of CPU understanding at OBP. All devices identified by OBP by their physical device names and this directory consist of all devices that are accessible to the hardware testing at power on time. 27. You are in /dev and you run rm-rf * command and removed all the files. Now the system is down or not? Ans: Down. 28. Unexpectedly you deleted a file /etc. Now the server is up or down? Ans: Down. 29. How many Solaris groups in Solaris 9 and 10? Ans: 30. How to check the configuration of the system? Ans: #prtconfig 31. If you restart windows, VMware also restarted? Ans: No. 32. How to see the VTOC of particular disk? Ans: at Ok prompt: ok showdisks At Command prompt: #prtvtoc /dev/rdsk/c0t0d0s0 33. How to copy the VTOC to a particular disk? Ans: #prtvtoc /dev/rdsk/c0t0d0s0 > tmp (filename) #fmphard s tmp /dev/rdsk/c1t0d0s2 34. How to create the file system? Ans: 35. How to recover the boot block if boot block is corrupted? Ans:

36. What is Inode?

Ans: All files in the Solaris OS make use of a file name and record a called an Inode. A file name is associated with an Inode and an Inode provide the access to data blocks. Inode size is 64 Kbytes. We do not increase or decrease inode size. It is constant. Inode contains two parts: first part of the inode contains information about the file, including its owner, its permissions and its size. Second part of the inode contains pointers to data blocks associated with the file content. Each file system contains its own list of inode numbers. When a new file system is created a complete list of new inodes are also created in that file system. *In system 5 OS data block size is 32 sectors. The same structure is also in AIX, HP UNIX and in Linux whereas in solaris the data block size is 8 sectors only. In 32 sector blocks there are drawbacks while inserting the data the size is being wasted. In this file system max wasted space is 31 kb per sector. So we need to defrag the hard disk to reduce the waste space, but every time if we defrag the hard disk the performance of the hard disk is become poorer and poorer. In solaris 8 Kbytes file system the wastage is low when compared to the other file systems. And the max waste space is 7 Kbytes. There is an advantage here is if the previous block has a space of 2 Kbytes or more the few file less than 8 Kbytes will be inserted in the previous block. Buffering concept is introduced here to avoid the waste space of hard disk. Buffering is nothing but a smallest storage area and it is temporary area. Buffer data will be cleared after the reboot. Buffer takes the data from RAM for every 8 Kbytes of data is filled in the RAM and it writes to the hard disk. Buffer automatically refreshes within certain time. Here fsflush daemon is connected to buffer. It writes the data into disk from buffer. Buffer doesnt waste the CPU resources as it wakes up and completes the task in certain intervals of time. Daemon activity is to take u the activity scheduled and completes in a particular intervals of time and then stops the activity. Fsflush is a daemon. For ex: So many users will access the Google server. If you reboot the server all of a sudden there is a data lose. To avoid that at the time rebooting we will use command to write any of the data in RAM to hard disk: #sync It will wakes up the fsflush and completes the task. But if within a time of rebooting there may some user may write or access the data. To avoid that also we use: #sync sync sync reboot Then there is no chances of data lose.

37. How to check the Inode? Ans: #ls li 38. What is the drawback of Inodes in UFS? Ans: Downtime is must and you have to reformat the hard disk to increase the inode value as the programmer defines the inode value for ex for 1 GB you create 10 inodes. In this case you have created 10 files of 1 MB size and the 10 inode values have been completed. Now in order to create any new file it will through you an error saying that inodes are completed. Now you have to copy the data to the other disk and need to reformat the hard disk and manually edit the inode value as for 1 MB you create 1 Inode.

39. What are the super block states and explain? Ans: There are four states of Super Block: 1. Clean, 2. Stable, 3. Active, 4.Bad. At the time of booting the OS the Operating System checks the status of Super Block. If it finds the status as clean it will try to repair on its own for any type of inconsistencies. (Clean: When you shut down the system properly it saves the state as clean). If it finds the status as stable in this case also it will try to repair the inconsistencies. (Stable: When any application is running and you shut down the system manually by pressing the power button then it will save the state as stable. If it finds the state as active, in this case also it will try to repair the system on its own. ( Active: When the OS is up and running: you open an application and it is not executed properly you suddenly shutdown the system then it saves the state as Active) If it finds the status as bad: You need to manually repair the file system on super block. (Bad: When the OS is up and running some applications are running and you suddenly removed the power cable from the CPU. Then it saves the state as bad.) Note: For clean, stable and active states the operating system will repairs the file system. Whereas it saves the state as bad you have to manually repair the file system by creating the new file system (Format) 40. How to recover the super block if corrupted? Ans: 41. How to check the mount points? Ans: # df k (Disk Free) Once you fire this command it will display the used and free space available on the disk and the slice details also. 42. What is the difference between rdsk (character device) and dsk (disk device?) Ans: In rdsk it will copy the data character by character whereas in dsk it will use the buffering concept and once the buffer fills the space it copies the entire block to the hard disk. 43. How many fields are there in /etc/vfstab? Ans: 7 tabs are there in /etc/vfstab. At the time of typing this command do not press space bar and press tab. Otherwise it would not work. 7 fields are: 1. Device to mount (/dev/dsk/c#t#d#s#), 2. Device to fsck (/dev/rdsk/c#t#d#s#), 3. Mount point (/a), 4. File system type (UFS), 5. Fsck pass (1), 6. Mount at boot (No) and 7. Mount options. 44. /a mount point is added to /etc/vfstab whereas /b is not mounted why? Ans: /a has mount point in /etc/vfstab 45. Fsck checks in how many pages? Ans: 5. 1. Checks blocks and size 2. Checks path names

3. Checks connectivity 4. Checks reference count 5. Checks cylinder group. 46. You created a mount point. By default it will create a file what is that? Ans: Lost+Found. 47. How many groups can we create in Solaris OS? Ans: 0-65000 48. How many fields in a group? Ans: 4 49. Present in which shell you are working? Ans: #echo $SHELL 50. How many fields are there in /etc/passwd file? Ans: 7 Fields are there in /etc/passwd file. 51. How do you log in to your server? Ans: As a normal I will login to the server and then using su command I will log in as admin. 52. What is min free? How to increase or decrease the min free space and what are the advantages? Ans: The newfs command reserves between 1 and 10 % of the file system space, depending on the size of the file system, for maintenance. This free space, referred to as minfree, specifies the amount of the space on the slice that is reserved or held back from the regular users. You can use the newfs m %free command to present the percentage of free space when you create a new file system. #fstyp v /dev/dsk/c#t#d#s# |head #newfs m 2 /dev/dsk/c#t#d#s# |head #fstyp v /dev/rdsk/c#t#d#s# |head (to check the minfree value for a file system on a particular disk) #tunefs m 1 /dev/rdsk/c#t#d#s# (to change the minfree space to 1 % on a particular disk) 53. What is the difference between soft link and hard link? Ans: Soft/Symbolic Link: A symbolic link is a file that points to another file. Like directories, which contain only directory information, symbolic links contain only one type of data. A symbolic link contains the path name of the file to which it points. Because symbolic links use path names to point to other files, they can point to files in other file systems. The size of a symbolic link always matches the number of characters in the path name it contains. Symbolic links can point or regular files, directories, other symbolic links, and device files. They can use absolute or relative path names. The ln command with s option creates a symbolic link

#ln s file1 link1 Advantages: 1. It will be implemented across the file system. 2. Physical data will be saved in source and the physical path will be saved in destination. 3. If you do not have the enough space also we can use the data by linking the soft link. (Ex: In Google server you have 100 GB of data. In local system you have the space of 10 GB. In order to access 100 GB data you need soft link. There is no need to 100 GB physical space) Disadvantages: 1. In soft links Inodes will be wasted. If the destination file corrupted then we can retrieve the data from source file, whereas if the source file got corrupted we cannot retrieve the data. Hard Link: A hard link is the association between a file name and an inode. A hard link is not a separate type of file. Every type of file uses at least one hard link. Every entry in a directory constitutes a hard link. Information in each inode keeps count of the number of file names associated with it. This is called a link count. In the output from the ls l command, the link count appears between the column of file permissions and the column identifying the owner. A new hard link for a file name increments the link count in the associated inode. The find inum command locates files and directories that have the same inode numbers. # find . inum 1282. Advantages: 1. In hard link inodes will not be wasted. 2. Hard inode numbers will be same. Disadvantages: 1. We can provide hard link only within the file system. 2. If the data in the /a file corrupts we can retrieve from /b, whereas the data in /b corrupts we can retrieve form /a. But if the file system corrupts we cannot retrieve the data.

54. What is a Directory? Ans: Directory: Directories hold only file name-to-inode information. A directory contains entries for files of all types that are logically found within that directory. 55. What is the difference between copy and link? Ans: Copy: Copy command (CP) will overwrites the data in the destination. There is no automatic update will happen whenever you will modify the data. In copy command you have to manually update the data. Link: Main advantage of linking is whenever you update the data it will automatically updates in both source and destination.

56. How to break the link? Ans: Deleting one of the files has no effect on the other file. The link count decrements accordingly. But in soft link delete the destination links (Dont delete the main physical data file. You will lose the data) 57. What is Inode? Can we create single inode for multiple files? Ans: Whenever you create any file or directory, the system will assign a number for its convenience. This is called Inode. Inode contains two parts.
1. 2.

First part of the inode contains information about the file Second part of the inode contains pointers to the data block.

Yes we can create one inode for more than a single file using hard links or creating hard links.

58. ls l command brings the output from where?


Ans: It retrieves the output from the first of inode.

59. What is boot process? Ans: When a system is powered on, the PROM monitor runs a POST procedure that checks the hardware and memory on the system. If no errors are found, and the auto boot parameter is set to true and then it finds the boot device next, then system begins the boot process. The entire boot process is described by five phases: 1. The Boot PROM phase 2. The Boot Programs phase 3. The Kernel initialization phase 4. The init phase 5. The svc.startd phase. Until Solaris 9 the boot phases are defined as 4 only and after Solaris 10 onwards they added 5 th phase also.

1. The Boot PROM phase:


A. The PROM runs the POST. The boot PROM firmware runs the POST to verify the systems hardware and memory. It then begins its boot sequence upon successful completion of the self-test diagnostics. B. The Prom displays the system identification banner. The model type, processor type and speed, keyboard status, PROM revision number, amount of RAM installed, NVRAM serial number, Ethernet address, and the host ID are displayed. C. The boot PROM determines the boot device by reading the PROM parameter boot-device. D. The boot PROM reads the disk label located at sector 0 on the default boot-device.

E. The boot PROM finds the boot program from the default boot device programmed into the PROM.

2. The Boot Programs Phase:


A. After successful completion of the boot PROM phase the boot program phase begins: In this phase the boot program searches the VTOC of the hard disk (boot device) and it finds and loads the boot block (boot strap code) program on the boot disk and it initializes the boot block program. This is called Primary Boot Block Phase. The boot block program loads the secondary boot program, ufsboot from the boot device into memory. This is called Secondary Boot Block Phase. The path to ufsboot is recorded in the bootblk program, which is installed by the install boot command. B. The ufsboot program locates and loads the appropriate two-part kernel. 3. The Kernel Initialization Phase:

A. The core of the Kernel is two pieces of static code called genunix and UNIX, where genunix
is the platform-independent generic kernel file and UNIX is the platform-specific kernel file. Note: On a system running in 64-bit mode, the two-part kernel is located in the directory: /platform/uname m/kernel.sparcv9.

The process of detecting the processor architecture (whether it 16-bit, 32-bit or 64-bit) and copying the data from hard disk to RAM is called kernel initialization. Kernel initialization is of two types:

A. Monolithic Kernel Initialization: When you switch on the system the RAM copies the
entire OS (whether it is 2 GB or 4 GB) copied from hard disk to RAM. It is a burden for RAM or RAM performance is decreased at the time of booting it may slow down the booting process. This is monolithic kernel initialization.

B. Modular Kernel initialization: In this it will copy only the required drivers to boot the
system. It doesnt give any burden to RAM. performance is fast. RAM usage is low here. Booting

Modules can consist of device drivers, binary files to support file systems, and streams, as well other module types used for specific tasks within the system. The modules that make up the kernel typically reside in the directories /kernel and /usr/kernel. Platform-dependent modules reside in the /platform/uname m/kernel and /platform/uname I/kernel directories. The following describes the types of modules subdirectories contained in the /kernel, /usr/kernel, /platform/uname m/kernel and /platform/uname I/kernel directories: . . . . drv/sparcv9 Device drivers. exec/sparcv9 Executable file formats. fs/sparcv9 File system types, for ex: ufs, nfs, and proc misc/sparcv9 Miscellaneous modules, for ex: usb

. . .

sched/sparcv9 Scheduling classes (Process execution scheduling) strmod/sparcv9 Streams modules (Generalized connection between users and device drivers) sys/sparcv9 System calls (Defined interfaces for applications to use)

Note: For static drivers: Reboot must when we install application drivers (Software drivers) For dynamic drivers: Reboot not required. The /kernel/drv/sparcv9 directory contains all of the device drivers that are used for system boot. The /usr/kernel/drv/sparcv9 directory is used for all other device drivers. Modules are loaded automatically as needed either at boot time or on demand, if requested by an application. When a module is no longer in use, it might be unloaded on the basis that the memory it used is needed for another task. a. The kernel reads its configuration file, called /etc/system/ b. The kernel initializes itself and begins loading modules. The kernel uses the ufsboot command to load the files. When it has loaded enough modules to mount the / (root) file system it unmaps the ufsboot program and continues. c. The kernel starts the /etc/init daemon.

4. The init phase: Once after copying the /etc/system to RAM it checks the init phase. Init is
nothing but a process. It is the last phase of booting process. Init phase ID is equal to 1. It starts the init process 1 (before 1 it executes the 0 process as it is for username and password authentication). This phase information stored in /etc/inittab file. Init commands are not controlled by operating system. Once we fire the init command we cannot stop or terminate the command. Init has divided into 8 different run levels. They are 8 run levels in solaris. 1. Init0 or #halt - take the system to ok prompt 2. Inits - Single user mode with critical file system mounted (Root User only can access)(/, /var, /swap critical file system). 3. InitS Single user mode with all file system mounted. 4. Init2 Multi user mode without networking 5. Init3 Multi user mode with networking. 6. Init4 Future purpose. 7. Init5 or # power off Power off 8. Init6 or #reboot - reboot These 8 init run level commands are also called as RC (Run Control) Scripts. At the time of booting the system the init phase initializes these RC scripts from init0 to init6 and when you reboot the system the RC scripts will execute from init6 to init0. If you want to check the present run level you working in: #who r

Init commands are very safe to execute. The commands inito/halt, init5/power off and init6/reboot will give the same output. But they differ in execution. Once you fire the init command it will kill/closed the application/programs safely, whereas once you fire the halt/power off/reboot commands they will terminate the applications/programs. It may corrupt the Operating system. (For halt/power off/reboot commands they dont know the parent child relation whereas init is the parent directory) 60. What are the main two files to boot the system? Ans: /etc/system and /etc/vfstab 61. What is Kernel file? Ans: Kernel is considered to be the heart of the OS. It takes request from shell and gives the output from hardware. It is the mediator between hardware and software. The /etc/system file is the control file for modifying which modules and parameters are to be loaded by the kernel at boot time. By default, all lines in this file are commented out. 62. What is the init process ID no.? Ans: 1

63. Is there any process before 1 and what it will do? Ans: Yes 0 is there and it will check the username and password authentication. 64. What are the run levels in solaris? Ans: There are 8 run levels in solaris. (See 59 Ans) 65. What is the difference between inits and initS? Ans: inits is single user mode with critical file system mounted (/, /var/ /swap) and initS is single user mode with all the file system mounted. 66. What is the default run level in solaris? Ans: init3 is the default run level. 67. How to check the default run level or in which run level you are in? Ans: #who r 68. What is the difference between inito, halt and init5, power off and init6, reboot? Ans: See 59 Ans 69. To go to run level 3 system reads which file? Ans: /etc/inittab 70. After switching on the system the system is continuously rebooting why? Ans: No run level is mentioned in the /etc/inittab 71. What is the difference between df and du? Ans: df: Displays the number of free disk blocks; du: Summarizes the disk use; quot: summarizes file system ownership.

Df: It will display the amount of disk space used in file systems. This command lists the amount of used and available space and the amount of the file systems total capacity being used. #df a : Reports on all file systems, including those with entries in the /etc/mnttab file for which the ignore option is set #df b: Prints the total number of Kbytes free #df e: Prints only the number of files free. #df k: Displays disk allocation in Kbytes. #df h: Acts like k option, except that sizes are in a more readable format, for example, 14k, 234M, 2.7G, or 3.0T #df l: Reports on local file systems only. #df F FSType: Specifies the file system type on which to operate. This is intended for use on unmounted file systems. Du: It will display the number of disk block used by directories and files. Each disk block consists of 512 bytes. #du k: Displays the use in Kbytes #du s: Displays only the summary in 512 byte blocks. Using the s and I options together shows the summary in Kbytes #du a: Displays the number of blocks used by all files in addition to directories within the specified directory hierarchy. Quot: It will display how much disk space, in kilobytes, is being used by users. #quot a: Reports on all mounted file systems. #quot f: Includes the number of files. Note: When you fire the df k or du k commands both will show you the same output. But, du k only will show you the correct result. As the df k command will calculate the output from the memory, whereas the du k will calculate from hard disk. For ex: you have opened a 5 GB application and it is in memory. You may not save this data to the hard disk or not. At this point if you fire the commands df k will display from memory and du k will display from hard disk. So du k will give you the exact information. 72. How to check the open files? Ans: #lsof (List of open files) 73. How do you check if the file system filled? Ans: # cd /a (Go to the mount point) #du adk | sort nr | head -10 (a: Hidden, d: directories, k: kilobytes, nr: Ascending order) #du adk | sort rn | tail -10 (rn: Descending order) 74. How to recover the password file if deleted? Ans: #opasswd #oshadow (To recover the shadow file)

Note: If you delete the passwd file you can retrieve using shadow file, if you delete the shadow file you can retrieve from passwd file. If you delete both the files you cannot retrieve the data. To check the status of password expiry: #password S username #password X1 (Password never expires)

75. What is process management?


Ans: Process: A process is any program that is running on the system. All processes are assigned a unique process identification number which is used by the kernel to manage the processes. Process ID 1 is assigned to init. 0 process ID is there before init 1 process. It is for checking the username and password and to transfer the data to memory and to swap or swap to memory. Processes are of two types:

1. Fork process (If you create any process using fork it overwrites the existing process)
2. Exec process (It will create new process) Init is a parent process and it maintains the childs process IDs and name s in memory. By default system takes the fork type processes. Fork type process maintains memory table individually and can run many processes at a time. But exec type process maintain only single memory table and any new process warns to run it would overwrite the old process. #echo $SHELL: To check the shell currently we working. #exec ksh: To change the shell to korn shell. If we execute exit command it will directly exit from the shell. System defiantly uses fork type processes. If we execute exit command in fork type process, it would exit from the shell to the before shell used by the system. We can manage processes using signals: #kill l: List of signals #find: To search #prstat: To display information about active processes on the system. We will kill the unwanted processes using kill or pkill commands using signals. Before terminating a process we must know the process name or process ID of the particular process. To locate the PID for the process use either ps or pgrep command. #pgrep l or #ps e | grep sendmail We can terminate more than one process at the same time. If we fire the kill command without a signal the command line will take the default signal no 15 to kill or terminate the process. Signal Number 1 9 HUP Kill Signal Name Event Hang up Kill Exit Exit Default Action

15

Terminate NOHUP

Terminate

Exit Exit

If you want to kill a process using process ID: #kill -15/9 256 If you want to kill a process using Process Name: #pkill -15/9 java Terminate signal (15) may not execute 100% whereas kill command (9) will kills the process 100%. By default kill command will take the signal 15. HUP (Hang up): HUP signal will inform the processes that check the program in the hard disk once. (Some program is running already. You have modified some changes in the program and saved to the hard disk. To take the changes effective you need to restart the program. Here some downtime is there for the program. To avoid the downtime or to avoid restarting the program we will inform the process using HUP command that you do not kill or stop the program which is already running in the memory (RAM) hold that program and the check for the program updates in the hard disk force fully to update the changes to the program). NOHUP: When we start any process it executes in the front end and runs in the back end till it completes the process execution. For ex: If we fire find command and we are searching for something the command searches the entire system for that. In the meanwhile some one knowingly or unknowingly might terminate or end the program. To avoid this we will use nohup command. It will execute the program in the back end and gives the output to the root user. It will not appear in the front end.

76. What is zombie process or defunk process? Ans: Zombie process means it is an inactive process which resides in the process table after they are killed. It is also called as defunk process. It is a process that has completed the execution and it has an entry in the process table, the child process has died but has not been reaped out. #top (to check zombie process in Linux) #ps aux/awk {print $8 $2} | grep wt You cannot kill a single zombie process if it is running single. Whereas you can kill the multiple zombie processes. To kill the single zombie process we need to reboot the server. To kill the multiple zombie processes #kill -9 processID. #preap (To kill zombie process) #ps ef (To show all processes list) #prstat (To display information about active processes in the system) By default prstat command displays information about all processes sorted by CPU usage. #sar (system activity reports. It is a third party package command) 77. What is a process?

Ans: A process can create another process call a child process. Any process that creates the child process is called the parent process. This creation of new processes from existing parent processes is called forking. State of a process: A process undergoes many changes during its life time. For Ex: If a parent process waits for the child process to complete the execution, the parent process puts itself in sleep state. A process can exist in any of the 4 states:

1. Ready: A ready process is ready to execute and is just waiting for the CPU to become available. 2. Running: If the process is in the run state means that the process is running the CPU.
3. Sleep: The process waits for a child process to complete if it is in sleep state. 4. Zombie: Ans 76. 78. How will you monitor processes? Ans: #ps: Print status and information about active processes #pgrep: Find the process ID of a process #prstat: View overall process statistics #pwait: Blocks and waits for termination of a process. #preap: To reap zombie processes or to clear up zombie processes #pstop: Temporary freeze a process. #prun: Continues a process that was stopped by pstop command. #pwdx: List working directory for a process #truss: Trace system calls an signals for a process (tru d date) #ps: -f: List full information for all processes. -u: Lists only process data for a particular process. Process statistics using prstat: This command interactively examines all active processes on the system and reports over all statistics on screen and gets updated on the screen periodically. By default this command updates the information for every 5 seconds. #prstat #prstat 1 (With the sampling interval as one second) 79. What are Nice and Renice commands? What is at command and how will you use that? Nice and Renice commands: Every process has a nice value ranging from 0-39. The higher the nice value the lower the priority. #nice n 5 (process): Its nice value (20+5=25). It will have lower priority. #nice n -5 (process): Its nice value (20-5=15). It will have higher priority. Renice value can be used to alter the nice value of the running process.

#renice n 5 (12345): It will have lower priority. #renice n -5 (12345): It will have higher priority. At command: This command executes a job only at a time automatically. #at 09:00PM today At > clear /usr/bin/clear >> /dev/pts/3 #at l: Displays information about the execution times of jobs. #at2: To display the jobs queued to run at specified time by chronological order of execution. #at r: To remove a job. Note: All the at jobs currently scheduled in the queue in /var/spool/cron/atjobs at view. #ls l /var/spool/cron/atjobs. Note: *As a root user we control who has access to the at command with the at.deny and at.allow files. */etc/cron.d/at.deny file. This file identifies users who are prohibited from using the at command. If this file is empty the all logged in users can access the at command. */etc/cron.d/at/allow file. This file doesnt exist by default. So all users in this file can create the at command jobs except the users in /etc/cron.d/at.deny file. *If neither the file exists, only the root user can use the at command. *If a user is listed in both the files, the user is denied. *If at.allow file exists and the users existed in this file can only execute at command. *If at.allow file doesnt exist, all users can execute at command except the users listed in at.deny file. Cron Tab Command: Cron facility to schedule regularly re carrying commands. All cron tab files maintained in /etc/spool/cron/crontabs directory. Cron tab file consists of lines of six fields. Each of these fields are separated by spaces or tabs. First 5 fields provide the date and time the command is to be scheduled and the last field is the full path to the command: Min Hour Day of Month Month Day of Week Command

0-59

0-23

1-31

1-12

0-6

#crontab l: To view the contents of the root crontab file. #crontab l [user name]: To view the contents of any regular users crontab file. Note: If we accidentally fire the crontab command on the command line without option then to terminate or prevent execution press ctrl+c to exit, do not press ctrl+d as this option overwrites the existing crontab file with an empty file.

To create or edit crontab file: #EDITOR = vi #export EDITOR #crontab e 30 17 * * 5 /usr/bin/banner Time to go > /dev/console :wq #crontab r [username] (To remove any users crontab file) **We can control access to the crontab command with 2 files. They are cron.deny and cron.allow file in /etc/cron.d directory. #tty identiry the device associated with current terminal 80. What is the command used to check the CPU running state since how long? Ans: #uptime It displays the status in 3 fields as 5.67, 6.03, and 2.17 If the usage is below 6.03 No issues on the server If the usage is greater than 6.03 check the processor state. (Red symbol) If the usage is 6.03 (this is threshold limit or max limit. 81. What are the tools you used in your organization? Ans: Tool: Bulk of commands executed is a single program is called tool. If the number of servers is more than1 then it is difficult to check/monitor the status of server statuses of df k. prtconf, format, /var/adm/messages outputs. So bulk of commands will be executed in a single program to check the status. This will do by using the monitoring tools Big brother monitoring tool and remedy ticketing tool to send/raise tickets to the administrator. command / Server Name CMR-1 CMR-2 CMR-3 CMR-4 CMR-50

df -k Ok Ok Ok Ok Ok

prtconf Ok Ok Ok Ok Ok

format Ok Ok Ok Ok Ok

var/adm/msgs Ok Ok Ok Ok Ok

Green = server is working fine. Yellow= Warning Red= Critical Purple= Server is not running Big brother will monitor the servers Remedy (7.0) will monitor the big brother tool defined by the admin.

All server passwords will be maintained in a particular file.

82. What are the possible reasons for server rebooting continuously?
Ans: There is no run level mentioned in the init phase and in the local user system /usr/sbin or usr/bin folder got corrupted. To overcome from here we need to mention the run level and for the second reason copy the usr/sbin or usr/bin folder from the other computer and paste it in single user mode.

83. What is SVM? What is RAID? What are the RAID levels and explain them?
Ans: SVM: Solaris Volume Manager software is used to manager large number of disks and the data on those disks. It is used to increase the storage capacity and data availability. Easy administration of large storage devices and improve the I/O performance. SVM used virtual disks to manage physical disks and their associated data. In SVM a virtual disk is called as a Volume. Volume: A volume is a group of physical slices that appears to the system as single, logical device. Volume Manager: Until solaris 8 the SVM based on Solstice Disk suit/(ODS) Object disk suit. After solaris 9 it is SVM. SVM provides 3 basic advantages over disk partitioning and file system creation. 1. It increases data availability by creating volumes with some degree of internal redundancy. 2. It improves disk performance when certain options (striping) are used. 3. It allows system administrators to respond to disk space shortage without down time. The Solaris Volume Manager is used to implement of RAID levels: RAID: Redundant array of independent disks. RAID systems provide improved performance, protection against disk failure and space for very large file systems. All levels except RAIS 0 (striping) provide a way to reconstruct data when disk failure occurs. They are 5 types of RAID configuration available in Solaris: 1. RAID 0: Concatenation or striping. 2. RAID 1: Mirroring. 3. RAID 0+1: Concatenation or striping with mirroring 4. RAID 1+0: Mirroring with concatenation or striping. 5. RAID 5: Block-interleaved striping with distributed parity. RAID 0: RAID 0 volumes allow you to quickly and simply expand disk storage capacity. But the drawback in RAID 0 volumes is they do not provide any data redundancy. If a single component fails on a RAID 0 volume, data will be lost. We can configure the RAID 0 in two ways. Concatenated Volumes: A concatenated volume writes data to the first available slice sequentially and adjacently across components forming one logical unit. When the first volume is full, the volume writes data to the next available volume. A concatenation combines the capacities of several slices to get a larger storage capacity. We can add more slices to the concatenation as the demand for storage increases. We can add slices at anytime, even if other slices are currently active. 100 % space utilization is the advantage here. But if one of the volume/disk corrupts we

cannot retrieve the data. No redundancy for concatenated volumes. I/O operation is slow. To create concatenate volumes we need min of 1 hard disk and max no limit. In Concatenated volumes single controller will work for I/O operations.

Striped volumes: A stripe distributes data equally across all slices in the stripe. To create striped volumes min of 2 hard disks and max n no. In striped volumes the data writes alternatively to all the striped volumes. If one of the striped volume got corrupts 50% loss of data. I/O operation is fast as all the controllers perform at a time. You cannot convert an existing file system directly to a stripe. You must take the backup and then create the new stripe and restore the file system. For sequential I/O operations on a stripe, the Solaris Volume Manager software reads all the blocks in an interlace. An interlace is the size of the logical data chunks on a stripe. At the time of creating the stripe, SVM uses the default value 16kb. Once we create the stripe volume we cannot change the interlace value. To change we have to recreate the stripe volume.

RAID 1: RAID 1 volume, also known as mirrored volumes. A RAID 1 volume maintains identical copies of the data in raid 0 volumes. Mirroring requires more disks. We need at least twice as much disk space as the amount of data to be mirrored. After configuring a mirror, you may use it as if it were a physical slice. We can mirror any file system, including existing file systems. A mirror is made of two or more RAID 0 volumes configured as either stripes or concatenations. The mirrored RAID 0 volumes are called as sub mirrors. We can attach or detach a sub mirror from a mirror at any time, though at least one sub mirror must remain attached to the mirror at all times.

RAID 1+0: RAID 1+0 volumes consists of multiple mirrors striped together. It provides greater data security, because a failure of a single physical disk slice causes a failure for only one half of one of the sub mirror. We cannot implement RAID1+0 volumes on SVM.

RAID 0+1: In raid 0+1 volumes, stripes are mirrored to each other. In RAID 0+1 volumes first striped volumes are created and then the mirrors will be created.

A failure in slice A, B or C causes failure of the entire sub mirror. One failure in each sub mirror of the RAID 0+1 mirror causes a failure of the entire mirror

RAID 5: RAID 5 volumes are striped volumes that use a distributed parity scheme for data protection. A RAID 5 volume is a combination of hard drives that are configured for data to be written across 3 or more drives. In a RAID 5 configuration, additional data is written to the disk that should allow the volume to be rebuilt in the event that a single drive fails. Once the failed drive is replaced with new one the parity data is used to rebuild the contents of the failed drive on the new one.

Advantages: RAID 5 volumes provides faster data access and fault tolerance, or protection against one of the drives failing during use.

When a disk fails, lost data from the failing disk is rebuilt on the failed volume from the other disks using the distributed data and parity information stored on the remaining disks. Disadvantages: RAID 5 writes are not as fast as mirrored writes and mirrored writes are not as fast as unprotected writes. A RAID 5 volume performance is lower than stripe performance. We could not use RAID 5 volume for the critical file systems. To check the SMF service with SVM: #svcs a | grep md/meta 84. How to create the Meta Data base? Ans: #metadb a f c 3 c#t#d#s# (f: if you are creating the database first time you need to use the f option, -c for count: no of replica images, -a: add) Note 1: To boot the solaris OS minimum 3 replicas we need to create, otherwise the system wont boot. If you create 2 replicas the system will not boot. If you have 3 replicas and after rebooting the system one of the replica got corrupted then it will give pop ups to create replica. If two replicas got corrupted then it will continuously give the pop ups to create replicas. Note 2: Majority consensus algorithm formula will be used at the time of creating the replicas. Formula is Hals of the disks/slices + one (For ex: you have 20 disks/slices, half of the disks = 10 +1 + 11 replicas you need to create) Note 3: How many no of replicas you will create but the system will use only one replica. If you check the replicas using #metadb (to check the metadb replicas) Here you see m (small m) in one of the replica. That means system is using that replica and that is the master replica. Remaining all are replica images and if for any reason master replica got corrupted then it will use the next replica automatically. If you see any letter in capital letter that means that replica or volume is in problem or got corrupted. To delete the metadb replicas: #metadb d c#t#d#s#. (Use f you want to do forcefully)

85. What is hot spare disk and hot spare pool and explain them?
Ans: Hot Spare Disk: Providing redundancy for every disk in solaris is called as Hot spare disk (like mirroring). You need arrange back up disk for every hard disk. Double space is required.

Hot Spare Spool: Providing redundancy for a bulk of disks called hot spare spool. For ex: For a bulk of 45 or 50 hard disk you need arrange 5-10 hard disk as a spool and in case of failure they will write the data to the spool hard disk. When you replace the corrupted disk it will automatically copy the data from pool of disk to new hard disk. Here space will not be wasted.

Note: Hot spares and hot spare pools provide additional physical slices for automatic recovery from RAID 1 mirror and RAID 5 volume failures. Hot Spares: A hot spare is a slice (not a volume) that is functional and available, but not in use. A hot spare is on reserve to substitute for a failed slice in a sub mirror or RAID 5 volume. You cannot use a hot spare to hold data or state data base replicas until the hot spare is assigned as a member. A hot spare must be ready for immediate use in the event of a slice failure I the volume with which it is associated. To use hot spares, invest in additional disks beyond those that the system required to function. Hot Spare pool: A hot spare pool is a collection of slices. The Solaris Volume Manager software uses hot spare pools to provide increased data availability for RAID 1 volumes and RAID 5 volumes. The SVM software reserves a hot spare for automatic substitution when a slice failure occurs in either a sub mirror or a RAID 5 volume. Note: Hot spares do not apply to RAID 0 volumes or to one way mirrors. For automatic substitution to work, redundant data must be available.

86. How to create concatenation or striped volumes? Ans: In solaris we call the disks as slices or call using instance names, whereas in SVM we call it as Meta devices. There are two types two brings hard disks or slices from solaris to SVM: 1. Concatenation (At least one disk or slice required) 2. Striping (At least two disks or slices required) Using concatenation command: #metainit d11 1 1 c#t#d#s# (Here d11 is Meta device name; 1 is for one device and 1 is for one concatenated volume) #metainit d12 3 1 c#t#d#s# 1 c#t#d#s# 1 c#t#d#s# (Here d12 is Meta device name; 3 for three meta device volumes each 1 1 1) Using striping command: #metainit d13 1 2 c#t#d#s# c#t#d#s# (Here d13 is Meta device name; 1 is for two disks into one striped volume and the 2 is for two disks) #metainit d14 1 3 c#t#d#s# c#t#d#s# c#t#d#s# (Here also same and 1 is for three disks into one volume and the three is three disks) To delete the Meta devices: #metaclear d11 (Meta device name)

87. How to create the mirrored volume? Ans: To create mirrored volume we need to disks/slices. (Concatenated mirroring) #metainit d11 1 1 c#t#d#s# #metainit d22 1 1 c#t#d#s# #metainit d12 m d11 (Here d12 mirror volume name and m: mirror) (First mirror created) #metattach d12 d22 (Second mirror created) Now need to create file system and attach to a mount point: #newfs /dev/md/rdsk/d12 #mount /dev/md/dsk/d12 mountpt1 Add this entry in vfstab.

To create striping mirror: #metainit d11 1 2 c#t#d#s# c#t#d#s# #metainit d22 1 2 c#t#d#s# c#t#d#s# #metainit d12 m d11 #metattach d12 d22 Same as above steps to create file system and mountpt. 88. Customer wants redundancy for existing data on one of his drive? Or how to bring the data disk into SVM control without losing the data? Ans: To bring the data drive into SVM Control: #metainit f d11 1 1 c#t#d#s# (Here f means do not disturb the data. Without losing the data bring the data disk into SVM control) (c#t#d#s# is the data slice; 1 &1 is for concatenation) (d11 is the mirror name) (data disk concatenation is completed) #metainit d22 1 1 c#t#d#s# (d22 is the Meta device name; 1 & 1 are concatenation & c#t#d#s# is the empty disk) #metainit d12 m d11 (First one way mirror created with data disk) #metattach d12 d22 (With empty disk second mirror is created) Now check the disk space using df k command. It wont show you the space. Now you need to edit the mount point in /etc/vfstab and unmount the mount point and mount it. Down time is there. Note: First mirror the one way mirror with concatenated data slices and then create the two way mirror with empty concatenated volume. If you done in reverse the data will be lost and empty data will be written to the data disk. Note: To bring the data disk into SVM control you need to use only concatenation. If you use striping you will lose the data as it stripe the slice and then brings to the SVM control. In order to bring the data disk into SVM control and to provide mirroring first create the one way mirror on

data disk after creating the concatenation on the data slice only. If you create the mirror on the empty slice first it will sync the data of empty disk to the data disk. In this case you lose the data. Please take care of here. 89. How to increase the file system in solaris? Ans: There is no option to increase the file system in solaris. You need to bring the hard disk/slices into SVM control to increase the file system: to do so: #metainit f d11 2 1 c#t#d#s# 1 c#t#d#s# (Here f means do not disturb the data; 2 is for two hard disks, data disk and empty disk) (Do not use striping. Use only concatenation) Edit the Meta device in /etc/vfstab file /dev/md/dsk/d11 /dev/md/rdsk/d11 mountpt ufs - Yes Yes Now increase the file system: #growfs M /mountpt /dev/md/rdsk/d11 Now unmount and remount the file system. Check in df k. It will show you the space now.

To create mirroring for /swap, /var. file systems: 1. Bring the data disk and empty slices into SVM control 2. Concatenate both the slices. 3. Create the one way mirror first. 4. Edit the /etc/vfstab 5. Reboot the OS. Note: A. Here we are not able to unmount and remount the mount points of /swap, /var file systems. Here you need to reboot the OS to unmount and remount the mount points. B. Before editing the /etc/vfstab file take the back up of /etc/system and /etc/vfstab files as a precaution. C. If you edit the /etc/vfstab wrongly OS will be crashed. So first create the one way mirror and then edit the /etc/vfstab, reboot the system. If all done well create the two way mirror. 6. Create the two way mirror. 90. How to create the mirror for root disk? Ans: Follow the steps:

1. #prtvtoc /dev/rdsk/c0t0d0s2 > /etc/root.vtoc. (First copy the vtoc of the root disk) 2. #fmthard s /etc/root.vtoc /dev/rdsk/c#t#d#s2 (Copy the vtoc of the root disk to the empty
hard disk. For mirroring the root disk take the same of hard disks, dont take the size lesser than root disk). Check the vtoc copied or not.

3. We have to create replicas on the root disk. But it is not possible to create replicas in root mirror. So create the replicas in cot0d0s7 & in c#t#d#s7 slices (empty disk) #metadb a f c 4 cot0d0s7 #metadb a c 4 c#t#d#s7

4. Now concatenate the root slices force fully (-f option). (Bringing the slices into SVM control)
Note: For mirroring the root disk you need to create the mirror the slices of /swap, /var, /usr and /opt also. #metainit f D## 1 1 c0t0d0s0 (Root slice concatenated) #metainit f D## 1 1 c0t0d0s1 (Swap slice concatenated) #metainit f D## 1 1 c0t0d0s3 (Var slice concatenation) #metainit f D## 1 1 c0t0d0s5 (usr slice concatenated)

5. Now concatenate the empty slices: (These are for second sub mirror volumes and it must be
same size or larger than the original sub mirror slices) #metainit D## 1 1 c#t#d#s# (Empty slice for root slice) #metainit D## 1 1 c#t#d#s# (For swap) #metainit D## 1 1 c#t#d#s# (For Var) #metainit D## 1 1 c#t#d#s# (For usr) 6. Now attach/create the one-way sub mirror: #metainit d# -m c0t0d0s0 #metainit d# -m c0t0d0s1 #metainit d# -m c0t0d0s3 #metainit d# -m c0t0d0s5 7. Now we have to add these entries in the /etc/vfstab and in /etc/system files. Take the back up of these files as a precaution and then edit these files. #cp /etc/system /etc/system.bkp #cp /etc/vfstab /etc/vfstab.bkp Now run the metaroot command to replace the volume name with the name of the mirror. Then /dev/dsk/c0t0d0s0 replaced with /dev/md/dsk/d#. It is not recommended to edit these entries manually using vi editor. (For root slice only) #metaroot d# Now edit the remaining slices info in /etc/vfstab: #vi /etc/vfstab /dev/md/dsk/d# /dev/md/rdsk/d# mountpt ufs yes yes (add all the entries like this) Save the file.

Reboot the system by using init 6. Because root file system could not be unmounted while the system is up and running. So reboot is must to take the changes effective in /etc/vfstab and /etc/system files. #init 6 8. You will see the SVM control slices at the time rebooting the system. Now attach the second sub mirror to the mirror #metattach d# D## #metattach d# D## #metattach d# d## #metattach d# d## Now the data will sync from d## to d## To check the status: #metastat | grep I sync Or #while true ; do metastat c ; sleep 10 ; done 9. Now bring down the system to OK prompt to boot using sub mirror disk. #init 0 or Stop+A Now check the nvramrc status and if it is set to false change to true. Ok printenv use-nvramrc Ok setenv use-nvramrc? True (Note: if you do not set the nvramrc to true at the time of primary mirror failure it wont check the secondary mirror. It sets to true then it will check the primary mirror, if at all it got corrupted then it will boot from secondary mirror) Now use the nvalias command to define backup root device alias for the secondary file system mirror. Ok nvalias backuproot [physical path] Ok reset-all Note: Do not attach the second sub mirror before the system is rebooted. 91. Tell me some of the mirror commands? Ans: #metadetach (To detach a sub mirror) #metaonline (To bring a sub mirror online) #metaofline (To bring a sub mirror offline)

#metareplace (To enable a slice in sub mirror) #metastat (To check the status of mirror) #metaronm (To change the mirror options) #metattach (To expand the capacity of mirror and to attach sub mirror) #metaclear (To clear mirror) #metarename (To rename volumes) 92. What is soft partition? What are hot spares and hot spare pools? Ans: Soft partition: The storage capacity of disks has increased, disk arrays present larger logical devices to solaris systems to create more manageable file systems or partition sizes. We need to sub divide logical volumes into more than 8 partitions. SVM can support up to 8192 volumes per disk set. We must provide a name for each soft partition. Slices that are used for soft partitions cannot be used for other purpose. Soft partitions behave differently. We can extend a soft partition up to the amount of space on the device without moving or destroying data on other soft partitions. #metainit d# -p c#t#d#s# 10g (To create soft partition on a slice) #metainit d# -p e c#t#d#s# 10g (To create partition and to format the disk. This action destroys data and create soft partition on s0) #metastat d# (To check the status of soft partition) #metastat d# 10g (To attach space to a soft partition) #growfs M /ora /dev/md/dsk/d# (To expand file system while the soft partition is online and mounted) #metaclear d# (To delete soft partition) #metaclear p or r d# (-p will purge all the soft partitions on the specific component and r recursively delete logical volumes) #metaclear p c0t0d0s7 (To delete all partitions on c0t0d0s7) Hot spares and Hot Spare pools: A hot spare is a slice that is functional and available, but not in use. Hot spare provide protection from hardware failure. Slices from RAID-1 and RAID-5 volumes are automatically replaced by hot spares when they fail. It can be used temporarily until the failed volumes replaced. Sub mirror or RAID-5 volume can use only a hot spare whose slice is equal to or greater than the size of failed slice in the sub mirror or RAID-5. A hot spare pool is an order list (Collection) of hot spares. We can place hot spares into one or more hot spare pools to get the most flexibility and protection from the fewest slices. When I/O error occurs SVM searches the hot spare pool for a hot spare based on the order in which hot spares were added to the hot spare pool. When a slice experiences i/o errors the failed slice is placed in the Broken state. To fix the issue, first repair or replace the failed slice. Then bring the slice back to the Available State by #metahs c command. States:

Available: The hot spare in the hot spare pool are running and ready to accept data and not currently being written to or read from In-Use: This hot spare pool includes hot spares that are being used to replace failed slices in a redundant volume. Broken: A problem exists with a hot spare or hot spare pool. However there is no immediate danger of losing the data. This status displayed if all the hot spares are in use. #metainit hspool c0t0d0s7 (To create a hot spare pool) #metans a hspool /dev/dsk/c0t0d0s7 (To add a hot spare slice to one hot spare pool) #metans a all /dev/dsk/c0t0d0s2 (To add a hot spare slice to all hot spare pools) Hot spare pool with sub mirrors: Hot spare pool hsp100 with two sub mirrors d10 and d11 of mirrors d12 #metaparam h hsp100 d10 #metaparam h hsp100 d11 #metastat d12 Delete Hot spare from a Hot spare pool: #metastat hsp100 #metahs d hsp100 c0t0d0s2 Replacing the Hot Spare: #metans r hsp100 c3t0d0s2 c3t1d0s2 #metans r all c1t0d0s2 c3t1d0s2 Enabling Hot Spare: #metans e c0t0d0s2 Partitions for Troubleshooting SVM: We have to take the back up of following for troubleshooting SVM problems: Output from the metadb command Output from the metastat command Output from the metastat p command Backup copy of the /etc/vfstab file Disk partition information from prtvtoc command Solaris Volume Manager Version on system List of solaris patches that have been installed List of SVM patches that have been installed To recover from improper /etc/vfstab entries:

If we made any incorrect entry in the /etc/vfstab file, we need to edit this file in single user mode. 1. Boot the system to single user mode 2. Run the fsck command on the mirror volume 3. Re-mount the file system with read-write options enabled. 4. Run the metaroot command for a root mirror (optional) 5. Verifying that the /etc/vfstab file correctly 6. Reboot the system 93. How to recover the root mirror volume? Ans: If you forgot to enter the entries in vfstab and rebooted the os. Then it will go to single user mode. Ok boot Init services are failed. Then type ctrl+d to precede normal startup. At this point the root and user file systems are read only. Run the fsck command on the root mirror #fsck /dev/md/rdsk/d0 Re mount the file system as read-write file system. So that we can edit the /etc/vfstab file #mount o r,w remount /dev/md/dsk/d0 / #Run the meta root command Verify the /etc/vfstab and /etc/system files Reboot the system To recover from a boot device failure: If the root mirror and boot device fails: We need to setup alternate boot device. When the boot device fails we will see the message cant open the boot device. 1. Boot from other root mirror. 2. If there are any insufficient or inaccessible replicas delete in single user mode 3. Disk 2 is the alternate boot device. 4. Determine how many replicas have failed by using metadb command. #metadb The system can no longer detect replicas on slice which is the part of failed disk. Here half of the /root, /swap, /usr mirrors have failed by using metastat command Metastat will show you that which sub mirrors are in need maintenance mode.

5. Delete the failed replicas and add them back using the metadb command.
6. #metadb d c0t0d0s3 7. #metadb a c 2 c0t0d0s3 8. #metareplacde e d0 c0t0d0s0 9. #metareplace e d1 c0t0d0s1 10. #metareplace e d2 c0t0d0s3 After some time the resynchronization complete. Now we can return to booting from the original device.

94. What is meant by sudoes? What is RBAC? Explain the? Ans: Sudoes and RBAC (Role Based Access Control) are third party tools to ease the administration tasks. Till solaris 9 it Sudoes and from solaris 10 onwards it RBAC Entire Sudoes file is divided into three parts: 1. User aliases 2. Command aliases 3. Host aliases The sudoes file stored in /etc/sudoes.

95. In mirroring in a particular slice says need maintenance, then how will you resolve the issue?
Ans: If a particular slice is corrupted or when you fire metastat command it shows the slice says need maintenance then 1. #metadetach d12 d22 (Here D12 is the mirror and d22 is the corrupted or need maintenance mirror or sub mirror) (Detach the sub mirror first) #metattach d12 d22 (Here D12 is the main mirror and D22 is the detached mirror) ( You need to attach the mirror) 2. #metareplace e d22 (Corrupted mirror) After executing the above two process commands it will give you # prompt. If it gives the # prompt then the corrupted slice is rectified, if not it will through you error message. In this case you need to replace the disk. 96. How to find out the bad disk? Ans: The process is like this: 1. Check the /var/adm/messages file. In this it will through you SCSI hardware error messages saying the disk is bad.

2. #format. When you fire this command it will show you the disk names with physical paths also.
If it shows you disk not available messages then you need to replace the disk.

3. #metastat. When you fire this command it will show you the disk status as okay or need
maintenance. (If one slice got corrupted then you may rectify it. If more than one slice got corrupted you need to replace the hard disk) (If more than one disk got corrupted then it is going to be bad in future)

4. #iostat en. When you fire this command It will show you the statistics in four columns: A. Software error, B. Hardware Errors, C. Transaction Errors and D. Total Errors.
If software errors are > than 1, 00,000 then you may ignore. There is no problem. If hardware errors are > 10/15/20 the disk need to be replaced. (Depending on the company the errors messages count varies. If the server is very important and that is production server then you need to replace the hard disk as soon as possible. If the server is in development side then the error count will be 30 or higher) Note: According to OS point of view if you do anything on the server the task will be completed in a particular interval of time. For ex: if you copy some file it should be copied in 10 sec or below sec. If takes more than 10 sec then there must be the I/O cable problem or bad hard disk or on the particular day the users requesting the server very high. You need to check these concerns and act accordingly. If at in the above situations you need to replace the hard disk then you need to call the oracle to replace the hard disk.

1. When the call landed on the oracle it will ask some inputs or info (over interactive voice
system). Press 1 to create new request, press 2 to know the status of the service request, press 3 to know the hard ware errors . After pressing 1 help desk people will receive the call and they will ask you the system serial no: and then they will ask you the address primary contact no, data center address to replace the hard disk. First of all they will check the warranty status of the server whether it is under contract or not. (The contract is depending on the civiority levels: For ex: For one year if you pay 1000 the issue will be resolved in 2 days (Civiority 1) and for 5000 the issue will be resolve in 1 day (Civiority 2) and for 20000 the issue will be resolved in 5-8 hours (Civiority 1). 2. Help desk people will transfer the call to technical team. Now they will ask you the status of format and i0stat commands outputs. They will confirm that the hard disk needs to be replaced. Now we will inform the tech team that we will inform the same to cx and will let you know. Here we need to ask one thing is replace is hot swappable or down time needed. If he says anything we need to take down time from the cx as the tech may replace the correct hard disk also. So we will ask down time.

5. #format. When you fire this command, you selected the disk (corrupted one) then here one
option is analyze the disk. Here two more options are Read and Write (Harmful: you may lose the data). You need to select Read option. (If you select Write it will erase the hard disk data) It will take around 2-3 hours of time to complete the data checking. It will be check the data in 5 stages. Phase1, phase2 ..phase5. It will give you the status at the end.

97. How to recover the bad disk? Ans: Assume c0t0d0s0: root, C1t0d0s0: Root mirror. For some reasons cot0d0so got corrupted. Now we need to replace the hard disk and analysis the root cause: 1. If /, /swap, /var any of these critical file systems got corrupted then the system will shut down immediately. Now go to ok prompt and boot from the root mirror (c1t0d0s0).

2. Check the /var/adm messages: As it generates the I/O errors if any. #tail /var/adm/messages (Check for the scsi error messages if any) #uptime Or # lost 10 Or # lost | grep I reboot (Note lost | grep I reboot is not a recommended command, as if you forgot to mention I it will again reboot the server. Better use #lost 10) It will show you in the error messages that, who rebooted the system or it has rebooted automatically.

3. #echo | format (To check the hard drive is there or note (Detected or not))
#i/ostat en (To check the hard errors) #metastat | grep I state (To check the status of the slices) Make a note of these commands outputs. 4. Now we need to call the oracle people for replacement of hard disk. One year back we have only one way to replace the hard disk is over phone. Now we have two ways. A. Thru telephone support

B. www.oracle.support.com
Once we enter into the oracle site it will prompt you to enter the username and password details. (Every company has these details). After successfully log into the site we need to create/raise Service Request for the new hard disk. It will ask you the system serial number and some other details. After submitting the form oracle people will call us back in 4 hours. They will ask you the out puts of format and i/ostat commands. They will confirm that the hard disk got corrupted and they will send you the new hard disk. Here we need to confirm him that is it hot swappable or normal and down time is there or not and then inform him that we will get back to you once we take the approval from the client. After taking the approval from the client for down time we will inform the same thing to oracle people. (Client will give you the time on mid night. We have to take at least 4-6 hours of down time. We should be very careful here as the time exceeds we have to pay penalty for downtime exceeding according to the SLAs. In order to avoid that if the issue is not able to resolve then call the client half an hour before and inform him that this will take do you want me to continue or else shall I up the server as it is. If he gives the permission we will continue or else we will do that later time) Here we need to fill the form that issue is resolvable or not. If resolvable what are the steps you are going to perform. All these details we need to fill and send to the client. 5. Once the oracle engineer came to replace the hard disk. We will ask him to wait for 10 minutes for maintenance purpose. 6. We have to fire some commands here to replace the corrupted hard disk. 7. First detach the mirror of the corrupted hard disk. #metadetach d## (If says in use #metadetach f d## It will remove forcefully)

In the same way detach all the mirrors in this hard disk (/swap, /var) Now check the replicas and delete them. #metadb #metadb d c0t0d0s7 Now clear the mirror. #metaclear d## 8. We have removed the hard disk from SVM control. We need to remove from solaris control also. (Note: For old servers there are no power leds on the hard disk to check the status. For new hard disks green, amber and red leds are there to check the status. Green means hard disk is working fine, amber not in use, Red no use. It is very easy to replace the hard disk to find and reinsert the hard disk using these leds for sun engineer) (If he replace some other hard disk the server will be down and we need to pay for it. We have to inform the hard disk controller number of times to the engineer) #format (To check the status here) We need to know the controller ID to remove the hard disk and to remove from the solaris control: # cfgadm al (To check the controller ID) #cfgadm c unconfig controller ID (To disable the controller ID) #format (Check the hard disk once) (It wont show you the hard disk) 9. Now inform the oracle engineer to remove and insert the hard disk. Once the engineer inserted the hard disk: 10. You need to enable the controller and then fire devfsadm command. Otherwise it doesnt show any disks connected to that controller. #cfgadm c config controller ID. (Controller enabled) #devfsadm (It will update the hard disk info in /etc/inst_to_path, /dev and /devices files) #format (Check the hard disk) Still if you are not able to see the disk (Reboot is compulsory) #touch reconfigure #reboot Or #reboot r Still no go check the hard or ask the engineer to reinsert correctly once again. 11. Now we need to copy the vtoc of the root mirror (c1t0d0s2) to the new hard disk (c0t0d0s2) #prtvtoc /dev/dsk/c1t0d0s2 > /temp/rootmirror.vtoc (copy the root mirror vtoc) #fmthard s /temp/rootmirror.vtoc /dev/dsk/c0t0d0s2 (copy the vtoc to c0t0d0s2)

(Note: Root hard disk size should be 73 Gb only. If more than that also it wont take and for mirroring identical/more than the original hard disk should be used) 12. We need to concatenate the slices and attach to the mirror To do so first we need to create the meta data base #metadb a c 3 c0t0d0s7 #metainit d## 1 1 c0t0d0s0 (Concatenate and do the same for the remaining slices also) #metattach d## d## (Attach the slices to the mirror and the remaining slices too) #metastat | grep I sync (To check the status of mirroring)

98. What is the command to check the status of file system?


Ans: #fsck -m /dev/rdsk/slice 99. What is the command to check the amount of ram? Ans: #prtconf | grep -i mem 100. Ans: #cpustate or #cputrace (Monitors performance of a system (hardware performance counter)) #netstat and #nfsstat (To display about the network performance) #ps and #prstat (Display about active processes) #swap (Display about available swap space on system) #vmstat and #iostat (Summarizes system activity data, virtual memory and disk usage activities) #kstat (Displays available kernel statistics on the system) #mpstat (Displays processor statistics in a tabular format) #fs fu (user) (uses all user processes) #priocntl (To change scheduling priority of processes) (-l option is to list information) #pc ecl (Displays the global priority of a process) #priocntl e c class m user-limit p pricommandname (-e executes the command; -c class; TS (Time Sharing); IA (interactive) FSS (Fair share) and fx (fixed priority); -m user limit (specifies maximum amount of priority you can raise or lower); -p specify the user supplied priority from How do you check the system load/utilization or system health checking?

#prtconf #top #sar and #sadc (Collects and reports on system activity data) 1. Kill -l command is used for? Ans: 2. What is the command to check the process ID? Ans: ps -df | grep processname (Send mail) 3. When you fire format command where it stores the information? Ans: #prtvtoc /dev/dsk/slice name #/etc/format.dat file (second place to store the information) 4. How to check the mount point is using the users or not? Ans: fuser -cu mountptname (It will display the usernames who are using the mount point 5. What is the command to check how many users there without passwords? Ans: passwd -sa | grep np (It will display the no password users)

6. Forgot the root password? How to recover the root password?


Ans:

7. How to install Kernel patch? Ans: In organizations for OS disk redundancy will be provided compulsory. To install kernel patch: 1. Find out that the OS is booting from which disk. #prtconf pvv | grep boot Using this we can know the physical path of the disk. To know the logical name we need to check the format command output and compare the physical path. Note down the logical name (c0t0d0s0) #format 2. Now take the back up of important system files like /etc/system, /etc/vfstab, prtconf, df k. 3. Now perform the sanitary boot. Sanitary boot means reboot the system without any changes. As the servers is running from couple of months or years. So we have to check whether the server is booting successfully or not. Note: To reboot a production in any organization we need to take the back up of important system configuration files and after rebooting we need to take the back up again and compare them. Servers are running for a longer time so in this time some of the files may be corrupted. So before rebooting the server we have to take the back up and after completion of successful reboot we need to compare if any changes.

4. Now let us assume that d12 is the mirror; d11 is the sub mirror (c0t0d0s0) and d22 is the
second sub mirror (c1t0d0s0). Before installing any kernel patch we need to detach the second sub mirror (stand by mirror) because if any problem occurs during or after the patch installation on the current disk we will boot the system using mirror disk. If we do not detach the stand by mirror the same data will be synchronized to the stand by mirror we will not be able to boot the system and for reinstallation it will take 6 hours to 1or 3 days (it depends) #metadetach d12 d22

5. After detaching the sub mirror we need to check the disk by booting the OS from disk detached
disk whether it is working fine or not. Now this disk is not under SVM control after detaching. 6. To boot from the d22 disk we need to change some of the entries in /etc/system, /etc/vfstab and boot block program. To change the entries we need to mount this disk to a mount point. #mkdir /a #mount /dev/md/dsk/d22 /a Now edit both files /etc/system and /etc/vfstab using vi editor. Put a * in front of the SVM entry in system file and change the SVM entries in vfstab from dev/md/dev/d22 to /dev/dsk/c0t0d0s0. Or copy the old back up files and edit the vfstab entries only the controller and target numbers.

#cd /a #cd etc #vi vfstab Note: We should be very careful here while editing the system and vfstab entries. If you fire #vi /etc/vfstab or system it will opens the working OS files not the mounted disk files. We need to check the present working directory many times (Each time we fire a command) So we need to fire #cd etc and check the pwd then #vi vfstab. 7. Now install boot block on this disk by #installboot /usr/platform/uname-I/lib/fs/ufs/bootblk /dev/dsk/c1t0d0s0 (sub mirror) 8. Now bring down the system to ok prompt and boot with the sub mirror disk (Detached one)

9. If you are able to boot the system successfully with the detached disk then we need to boot the
system into single user mode to install the Kernel patch. Ok boot s 10. Install the kernel patch by using the patch add command #patchadd patch no. (If it is single patch we will fire patchadd patch no, if we need to install multiple patches we will fire #./cluster-bundle patch no) If the patch installed successfully without any errors then we have to monitor the system for a period of 1-7 days. Now confirm with the application team that there are no performance issues then we need to attach the sub mirror (detached one). Note: Please edit the entries of /swap, /var slices also when you detach.

SVM daemons: 1. Md maniford 2. Rfc metad 3. Rfc metamedd 4. Rfc metamind 5. Rfc mdcommd

VXVM (VERITAS Volume Manager)

1. What is VXVM (VERITAS Volume Manager)?

Ans: VERITAS Volume Manger is software is proprietary logical volume manager from VERITAS (Now part of Symantec: Symantec take over VERITAS product). It is available for Windows, AIX, Solaris, and HP-UX. It offers volume management of multiple I/O functionalities. It is a storage management sub system that allows you to manage physical disks as logical devices called as volumes. VXVM provides easy to use online disk storage management for computing environments and SAN (Storage Area Network) environments. By supporting RAID (Redundant Array of Independent Disks) model, VXVM can be configured to protect VxVM can be configured to protect against disk and hardware failure, and to increase I/O throughput. Additionally, VxVM provides features that enhance fault tolerance and fast recovery from disk failure. VxVM overcomes physical restrictions imposed by hardware disk devices by providing a logical volume management layer. This allows volumes to span multiple disks. VxVM provides the tools to improve performance and ensure data availability and integrity. You can also use VxVM to dynamically configure disk storage while the system is active. Veritas provides three products: A. Veritas Volume Manager (VxVM). B. Veritas Net Backup. C. Veritas Cluster Manager. 2. What is the difference between SVM and VXVM? Ans: 1. In solaris SVM is a free software where as VxVM is Key based software (We need to purchase the software on yearly basis)

2. Without application down time we cannot increase of decrease the file system in SVM where in
VxVM we can increase/decrease the file system without down time.

3. We cannot increase the inodes once the file system is created in SVM (Inodes are constant)
where as in VxVM inodes will be generated dynamically (For ex: If the inodes are 100 and 90 inodes are completed then it will generate 100 more inodes. If 190 are completed then it will generate 100 more inodes). 4. We cannot implement RAID 1+0 in SVM where as in VxVM we can implement both RAID 1+0 and 0+1 levels. 5. I/O performance is slow in SVM where as I/O performance is fast in VxVM. 6. To increase/decrease the file system we need to unmount the mount points where as in VxVM no need to unmount. 7. We cannot utilize the space efficiently in SVM where as in VxVM we can utilize efficiently.

VxVM runs on top of the OS. Whenever you boot the Operating system (Windows, Solaris, HP-UX, AIX, Linux) first it runs the VxVM and then the Operating system. First priority should be VxVM and second priority would be OS but without the Operating System we cannot run the VxVM. Note: File System should be unmounted to take the back up of File System. 3. What are VxVM objects how to create those?

Ans: VxVM uses two types of objects to handle storage management: physical objects and virtual objects. Physical objectsphysical disks or other hardware with block and raw operating system device interfaces that are used to store data. Virtual objectsWhen one or more physical disks are brought under the control of VxVM, it creates virtual objects called volumes on those physical disks. Each volume records and retrieves data from one or more physical disks. Volumes are accessed by file systems, databases, or other applications in the same way that physical disks are accessed. Volumes are also composed of other virtual objects (plexes and sub disks) that are used in changing the volume configuration. Volumes and their virtual components are called virtual objects or VxVM objects. Physical Disk: A physical disk is the basic storage device (media) where the data is ultimately stored. You can access the data on a physical disk by using a device name to locate the disk. The physical disk device name varies with the computer system you use. Not all parameters are used on all systems. Typical device names are of the form c#t#d#s#, VxVM writes identification information on physical disks under VxVM control (VM disks). VxVM disks can be identified even after physical disk disconnection or system outages. VxVM can then re-form disk groups and logical objects to provide failure detection and to speed system recovery.

Virtual objects
Virtual objects in VxVM include the following:

Disk groups VM disks Sub disks Plexes Volumes

The connection between physical objects and VxVM objects is made when you place a physical disk under VxVM control. After installing VxVM on a host system, you must bring the contents of physical disks under VxVM control by collecting the VM disks into disk groups and allocating the disk group space to create logical volumes. Bringing the contents of physical disks under VxVM control is accomplished only if VxVM takes control of the physical disks and the disk is not under control of another storage manager such as Sun Microsystems Solaris Volume Manager 28. Software. For information on how to convert Solaris Volume Manager disks to VM disks, see Migrating from Solaris Volume Manager to VxVM. VxVM creates virtual objects and makes logical connections between the objects. The virtual objects are then used by VxVM to do storage management tasks. Note: The vxprint command displays detailed information on existing VxVM objects. For additional information on the vxprint command, see Displaying volume information on page 274 and the vxprint(1M) manual page.

Combining virtual objects in VxVM


VxVM virtual objects are combined to build volumes. The virtual objects contained in volumes are VM disks, disk groups, subdisks, and plexes. Veritas Volume Manager objects are organized as follows:

VM disks are grouped into disk groups (each representing a specific region of a disk) are combined to form plexes

Subdisks

Volumes are composed of one or more plexes

Figure 1-6 shows the connections between Veritas Volume Manager virtual objects and how they relate to physical disks. The disk group contains three VM disks which are used to create two volumes. Volume vol01 is simple and has a single plex. Volume vol02 is a mirrored volume with two plexes.
How VxVM handles storage management Figure 1-6 Connection between objects in VxVM

.................................disk02 vol01 Disk group Physical disksdevname1 vol02 vol02-01 vol02-02 vol01-01 vol0201 vol02-02 vol01-01 disk01-01 disk02-01 disk03-01 devname3devname2 disk01-01 disk02-01 disk3-01 disk01 disk01-01 disk03 disk03-01disk02-01

The various types of virtual objects (disk groups, VM disks, subdisks, plexes and volumes) are described in the following sections. Other types of objects exist in Veritas Volume Manager, such as data change objects (DCOs), and cache objects, to provide extended functionality. These objects are discussed later in this chapter.

Disk groups
A disk group is a collection of disks that share a common configuration, and which are managed by VxVM (see VM disks on page 30). A disk group configuration is a set of records with detailed information about related VxVM 30 Understanding Veritas Volume Manager objects, their attributes, and their connections. A disk group name can be up to 31 characters long. In releases prior to VxVM 4.0, the default disk group was rootdg (the root disk group). For VxVM to function, the rootdg disk group had to exist and it had to contain at least one disk. This requirement no longer exists, and VxVM can work without any disk groups configured (although you must set up at least one disk group before you can create any volumes of other VxVM objects). For more information about changes to disk group configuration, see Creating and administering disk groups on page 175. You can create additional disk groups when you need them. Disk groups allow you to group disks into logical collections. A disk group and its components can be moved as a unit from one host machine to another. The ability to move whole volumes and disks between disk groups, to split whole volumes and disks between disk groups, and to join disk groups is described in Reorganizing the contents of disk groups on page 205. Volumes are created within a disk group. A given volume and its plexes and subdisks must be configured from disks in the same disk group.

VM disks
When you place a physical disk under VxVM control, a VM disk is assigned to the physical disk. A VM disk is under VxVM control and is usually in a disk group. Each VM disk corresponds to at least one physical disk or disk partition. VxVM allocates storage from a contiguous area of VxVM disk space. A VM disk typically includes a public region (allocated storage) and a small private region where VxVM internal configuration information is stored. Each VM disk has a unique disk media name (a virtual disk name). You can either define a disk name of up to 31 characters, or allow VxVM to assign a default name that takes the form diskgroup##, where diskgroup is the name of the disk group to which the disk belongs (see Disk groups on page 29).

Subdisks
A subdisk is a set of contiguous disk blocks. A block is a unit of space on the disk. VxVM allocates disk space using subdisks. A VM disk can be divided into one or more subdisks. Each subdisk represents a specific portion of a VM disk, which is mapped to a specific region of a physical disk.

The default name for a VM disk is diskgroup## and the default name for a subdisk is diskgroup##-##, where diskgroup is the name of the disk group to which the disk belongs (see Disk groups on page 29). A VM disk can contain multiple subdisks, but subdisks cannot overlap or share the same portions of a VM disk. Figure 1-9 shows a VM disk with three subdisks. (The VM disk is assigned to one physical disk.) 32
Understanding Veritas Volume Manager

..........................VM disk with three subdisks disk01 disk01-01 disk01-02 disk01-03 disk01-01 disk01-02 disk01-03 Any VM disk space that is not part of a subdisk is free space. You can use free space to create new subdisks. VxVM release 3.0 or higher supports the concept of layered volumes in which subdisks can contain volumes. For more information, see Layered volumes on page 53.

Plexes
VxVM uses subdisks to build virtual objects called plexes. A plex consists of one or more subdisks located on one or more physical disks. For example, see the plex vol01-01 shown in Figure 1-10.
How VxVM handles storage management

You can organize data on subdisks to form a plex by using the following methods:

concatenation striping (RAID-0) mirroring (RAID-1) striping with parity (RAID-5)

Concatenation, striping (RAID-0), mirroring (RAID-1) and RAID-5 are described in Volume layouts in VxVM on page 36.

Volumes
A volume is a virtual disk device that appears to applications, databases, and file systems like a physical disk device, but does not have the physical limitations of a physical disk device. A volume consists of one or more plexes, each holding a copy of the selected data in the volume. Due to its virtual nature, a volume is not restricted to a particular disk or a specific area of a disk. The configuration of a volume can be changed by using VxVM user interfaces. Configuration changes can be accomplished without causing disruption to applications or file systems that are using the volume. For example, a volume can be mirrored on separate disks or moved to use different disk storage. Note: VxVM uses the default naming conventions of vol## for volumes and vol##-## for plexes in a volume. For ease of administration, you can choose to select more meaningful names for the volumes that you create. A volume may be created under the following constraints:

Its name can contain up to 31 characters. can consist of up to 32 plexes, each of which contains one or more subdisks.

It It

must have at least one associated plex that has a complete copy of the data in the volume with at least one associated subdisk.

All subdisks within a volume must belong to the same disk group. 34 Understanding Veritas Volume Manager

Note: You can use the Veritas Intelligent Storage Provisioning (ISP) feature to create and administer application volumes. These volumes are very similar to the traditional VxVM volumes that are described in this chapter. However, there are significant differences between the functionality of the two types of volume that prevent them from being used interchangeably. Refer to the Veritas Storage Foundation Intelligent Storage Provisioning Administrators Guide for more information about creating and administering ISP application volumes.

Plexes Volume vol06 has the following characteristics:


It contains two plexes named vol06-01 and vol06-02. Each plex contains one subdisk.

Each subdisk is allocated from a different VM disk (disk01 and disk02). For more information, see Mirroring (RAID-1) on page 44. Figure 1-6 Connection between objects in VxVM Figure 1-7 VM disk example Figure 1-9 Examples of three subdisks assigned to one VM Disk Figure 1-11 Example of a volume with one plex.

4.

How to install vxvm software? Ans: 1. Before installing the vxvm software take the backup of important configuration files in solaris (/etc/system/ and /etc/vfstab) and take the backup of boot block also (prtvtoc /dev/rdsk/c0t0d0s0 > /etc/tmp)

2. Now copy the vxvm software from desktop to solaris machine using winscp tool.
3. Go to that folder #pkgadd d .VRTSvxvm (To install the package) #pkgchk VRTSvxvm (To check the status of package is installed successfully or not) #./vxinstall ( To enter the license key) Now it will prompt you to create the disk group. The first group created by default in vxvm 3.5 is called rootdg. At the time of prompting if you type no also it will create the default disk group. 4. 5. 5. Note: Up to vxvm 3.5 version, default disk group rootdg was created automatically, But after 4.0 version no need to create default disk group. After successful installation of the vxvm software you are not able to run the vxvm commands, as you need to edit the /etc/profiles file and add the /etc/vx entries path to run the commands.

How to bring the hard disk into vxvm control? Ans: They are two ways to bring the hard disk into vxvm control. 1. 2. Initialization and Encapsulation.

In initialization it will format the hard disk and then brings into the vxvm control. All slices will be converted into single volume. In encapsulation hard disk will bring into vxvm control without losing the data and single slice will be converted as single volume.

Once we bring the hard disk into vxvm control, the hard disk will be divided into two parts:

A. Private region (Slice-3) and B. Public region.(Slcice-4)


Private region: (Slice-3) Entire volumes configuration will be store here. Data base size is 4 cylinders. It will take first 4 cylinders or last 4 cylinders to store the data. It stores the server name, status of the volume, disk group name, By default 4 private regions are enabled if you have 1000 hard disks also. (Like replicas in metadb)

Public Region: (slice-4) It contains data blocks. Note: Up to vxvm 3.5 it was based on the slices mechanism, after 4.0 it is based on the CDS format. CDS: It came from 4.0 version onwards and it is a software on the hard disk. CDS means Crossed disk sharing. Using this we can see the data in any file system. For Ex: Remove the hard disk from solaris machine and connect to AIX or any other vxvm installed machine then it will over writes the CDS according the Operating system.

6. What are the vxvm daemons and explain them? Ans: They are 6 vxvm daemons: 1. Vxconfigd daemon 2. Vxrecoverd daemon 3. Vxiod daemon 4. Vxreload daemon 5. Vxnotifyd daemon

6. Vxconfigbackupd daemon 1. Once you turn on the CPU the first daemon would start is Vxconfigd. It checks the disk group is
enabled or disabled. If it is enabled it copies the entire private region into the memory. (We call it as memory based configuration. If it boots from hard disk we call it as disk based configuration)

Note: Once after successful installation of vxvm software in solaris operating system first priority will always to the vxvm software and then to the solaris OS. So once you turn on the CPU vxconfigd daemon will check the disk group to find the boot file. If it doesnt find the vxvm entry it will try to boot from native solaris or SVM entries in /etc/system and /etc/vfstab and boots from there. Note: At the time of booting the fsck option is set to yes then it will check the file system entries in the vfstab and it will check the jfslog, if it finds any discrepancies it resolves and boots the OS. If we run the fsck manually it wont check the jfslog and directly checks the file system. 2. Before fsck check vxvm daemon Vxrecoverd will check the vxfs file system entries in the vfstab. It checks the DRL (Dirty Region Log) for I/O errors and recovers them. (Like fsck jfslog). Because first priority is always for vxvm and then solaris. 3. After recovering the I/O errors the system will be up and running.

4. If we modify any configuration settings while the settings are in the memory to update these
settings Vxiod daemon will take care as we dont have the permission to edit the configuration settings in memory. So we will take the help of Vxiod daemon. (For ex: creating a disk group or adding or removing the volume or plex. While these are in the memory and need to write to the hard disk to take the changes effective. At this time if the power failure comes to update these settings we will take the help of Vxiod daemon) 5. Vxiod will update the changes into the memory and vxconfigd will sync the same to the hard disk. (vxconfigd daemon will copy the private region to the memory and then it will sync the changes made in the memory to the hard disk and it finds the corrupted hard disks also)

6. If at all in any situation vxconfigd daemon finds any corrupted hard disk, then it will
immediately wakes up the Vxreload daemon to copy the data to hot spare disk or hot spare pool by sending a signal. 7. If the hot spare disk hot spare pool disk is being used at the time of hard disk corruption, to notify this to the system admin vxnotify daemon will be work in the back ground. 8. If at all in any situation the private region got corrupted in the memory it is difficult to get any output of the vxvm. To get rid from here Vxconfigbackupd daemon will back up the private region to the hard disk. 7. Vxconfigd daemon or all the daemons got killed. What happened to the system? Ans: Nothing will happen to the system. It will be up and running but we are not able to get any output of vxvm. 8. Vxvm license got expired? How to check that and any outage? Ans: To check the license: #vx lic rec No outage will be there but any add/remove request wont work. 9. How to resize a file system? Ans: 1. Check the volume size using max grow command 2. Check the disk group. 3. Raise the SR to SAN team.

4. SAN team will add the LUN to system and intimate the same to us. 5. Run devfsadm command. Note: After firing the devfsadm command it will show you the disk in format output. It shows the hard disk in format output and it doesnt show you in vxvm: 6. We need to run #vxscan disk 7. Still no go then you need to check the vxdctl mode and you need to disable and enable the vxdctl mode. 10. What is root disk mirroring in vxvm? Ans: Let us assume c0t0d0s0 is the Current OS disk and c1t0d0s2 is the empty disk. Take the back up of /etc/system and /etc/vfstab files. For root disk mirroring we are also follow menu based procedure. Note: Menu based procedure (GUI) used by sys adms who are not very well in command line. But for root disk mirroring we are also following the menu based procedure. #vxdiskadm It is a menu based procedure and it will show you the options to select (0-14): Select the option 2 (Encapsulation: bring the data disk into vxvm control) It will ask you to enter the device name Enter c0t0d0s2. It will prompt you to enter the disk group name: root disk. It will prompt you some of the option to fill. Fill all the fields. Once after completing the encapsulation, it will automatically take the back up of etc/system and /etc/vfstab files and saves these two files as system.org and vfstab.org Now we need to add the vxvm entries into the vfstab and system file. Now bring the empty hard disk into vxvm control using initialization. #vxrootmr g rootdg disk01 disk02 (Here disk01 is the source and disk02 is the destination) #vxtask monitor (To check the status of synchronization) #init 0 (Bring the system to ok prompt to edit boot disk and mirror disk settings) Ok setenv nvramrc = true Ok show disks Ok nvalias physical path = mirror disk Ok reset all Ok setenv boot disk = disk01 mirror disk Now check with mirror disk.

11. How to install kernel patch in vxvm? Ans: Take the permission from the customer, application and data base team for down time. 1. If the server is running more than 300 days we need to do sanitary reboot. #uptime #reboot Fine the boot disk using #prtconf pvv | grep boot. Note down the physical path and compare the physical path which same matches in the format output and note down the logical name. 2. Take the back up of important configuration files before installing the kernel patch. (ifconfig, df k or h, etc/system, /etc/vfstab, prtconf, vmstat outputs) 3. Now detach/dissociate the sub mirror. Note: The difference between dissociate and detach is: after rebooting the system the detached sub mirror will automatically attached to the mirror when you detach the sub mirror using detach command where as if you detach the sub mirror using dissociate command you need to manually attach the sub mirror after reboot. #vxplex g rootdg disk02 dissociate root-vol02 Now the disk02 will be detached from the mirror.

4. Now we need to mount the disk02 to edit the /etc/system and /etc/vfstab. In etc/system and
vfstab entries to check that we are able to boot from the hard disk also. #mount f vxfs /dev/vx/dsk/rootdg/rootvol2-02 /a #cd /a #vi etc/system Add * infornt of the vx entry and save it. Copy the backup vfstab files and edit the controller and target number and save it. 5. Install boot block also if required. 6. Now boot from this hard disk and check whether you are able to boot or not. 7. If you are able to boot then reboot the system to the single user mode and install the kernel patch. #boot s 8. Now check the server up to 24 hours and take the confirmation from the application team and data base team and then attach the sub mirror. 12. How to upgrade vxvm 4.0 to 5.0? Ans: Take the back up of critical system files. Check the system using sanitary reboot option.

Now dissociate the plex. Now we need to bypass the volume: Means before going to boot the system into vxvm we need to stop the services of vxvm and configure the system boot in solaris mode: Now reboot the system in Single User mode. #cd /etc/vx/reconfig.d/state/d #touch installdb Now bring down the system into ok prompt. Ok boot s #pkgrm vrtsvxvm #pkgadd vrtsvxvm Now enter the license (It will remove the installdb file and creates root)

13. How to identify and replace bad disk in vxvm?


Ans: #vxdisk list In the above output if you find the disk flag status online or online invalid the disk is working fine. If you find the failed or failing then you need to check. If the status is failed then you need to replace the disk. If the status if failing then 99 % we can resolve the issue as there may be the loose contact of scsi cable or something like that. Depending on the situation we need to fix the issue. IF the status says error then we need to check whether the disk is labeled at format or not. Without labeling the disk we cannot be able to use in vxvm or in solaris. After all the above steps you find that the disk needs to replace: You need to inform the customer and take the written approval to replace the disk from the customer. Now remove the disk from disk group. #vxdg g dg rmdisk k disk01 #vxdg g dg k adddisk disk01 Here k switch is to save the existing disk data base or back up in some other place. 14. How to change/off the flag status? 15. How to rename plex and how to online/offline/disable the plex? How to increase the plex? 16. How to reset/increase the volume?

17. How do you know if the CPU fan got corrupted? Ans: If you find any error messages in /var/adm/messages stating DIMM or AFT then there is a problem with RAM. #prtconf or # prtdiag v (To find the status of hard ware components) In the above output it will show all the devices status attached to the system. Now we need to replace the fan. We need to raise SR for the replacement of FAN. Sun Engineer will come and replace the fan. Ask him to wait for a minute and we will check now. We tried to boot the system, but unable to boot and we are unable to go to ok prompt also. It went to diagnosis mode. Now we have asked the sun engineer that did you disturb any other cable or something like that. After completion of the diagnosis mode ok prompt came back. OK boot Boot not found. Ok boot mirror Boot not found. Note: We are unable to see the shut down and restart process what is going on internally. To see that we need to shut down or restart the machine we have to go to console port and there we will initiate shutdown or restart. Now we will see the messages where went wrong. There are two ways to access the server. 1. Thru Terminal session (Multiple users can log in and troubleshoot at a time depending on the performance of the server) 2. Thru Console port (Only one person can log in and troubleshoot each and every thing) In organizations if any reboot request came in then we need to reboot the system in console port only. Console port will check each and every hard ware and software errors if any it will tell you the status by throwing the error messages. We will read all messages in Console port only. In the above scenario it is saying that the scsi cable error. Informed the Sun engineer to reinsert the scsi cable. Now we will be able to boot.

VCS (Veritas Cluster Software) 1. What is HA (High Availability) and what is VCS (Veritas Cluster Software) and what are the differences? Ans:

High-Availability Cluster - A group of computers, whose purpose is to increase the up-time of services, by making sure that a failed machine is automatically and quickly replaced by a different machine, with little service disruption. Cluster service - A computer service that is managed by the cluster software. The cluster service includes all resources required to deliver the service - the data (e.g. file systems), virtual IP addresses, processes... Cluster Group - a group of servers that run the cluster software, and together handle a set of services. Cluster node - A server that is a member of a cluster group. High-Availability Cluster Software - an application that manages a high-availability cluster. VERITAS Cluster Server (VCS) connects, or clusters, multiple, independent systems into a management framework for increased availability. Each system, or node, runs its own operating system and cooperates at the software level to form a cluster. VCS links commodity hardware with intelligent software to provide application failover and control. When a node or a monitored application fails, other nodes can take predefined actions to take over and bring up services elsewhere in the cluster. Differences: 1. HA cluster is a active-passive node. 2. VCS is a active-active cluster. 3. There is no load balancing in HA where as in VCS Load will be balanced.

4. In HA cluster one application fails all the applications will be moved to the other node where
as in VCS the particular failed application will moved to the other node and load will be balanced. 5. In HA max and min only two nodes where as in VCS up to 32 node cluster we can create.

6. We cannot increase or add the node. (As is HA one cluster is always idle and cost is too
high) 7. In VCS we can create and add up to 32 cluster. 8. HA supports only active-passive cluster node and VCS supports active-passive and activeactive cluster nodes. 2. What are the storage technologies? Ans:

3. What are the minimum requirements to configure VCS cluster? Ans: VCS/HA both will identify the hardware or software errors immediately and failover the applications in that node to the other node within the cluster. If the server is restarted for any hardware or software error then the VCS/HA present in that node will identify two minutes before shutting down the node and it failover the applications running in that node to the other node within the cluster. VCS will move the IP of the particular application but not the data or the application.

VCS application downtime for the application is .9999% (It is just like a hang for a second) 1. To avoid single point of failure we use two network cards/adaptors. Note: At the time of implementing the VCS Server Admin, Application Admin, Database Admin and Storage Admin will work together. (Two n/w cards or channels are like heart of the cluster. If the n/w channel got corrupted then there will be huge loss of data and there is no software to recover this data. It is a major loss for the cluster. These two internal cards (n/w cards) or channels are called as private channels) 2. Minimum two private channels and one public channel are required to configure a cluster. Note: Two private channels (One is for node to node internal communication and the other one is for redundancy) are for node to node internal communication and the public channel is for users to access the server (To access applications in the server by the users we will provide one more n/w card or channel is called as public channel). 3. At the time of starting the cluster it will check the minimum requirement of two n/w channels. If only one n/w card or channel is present then the cluster wont start. If two channels present then the cluster will start up and after starting the cluster if one of the channel got corrupted also the cluster wont be down. Note: If the public channel got corrupts then there is no loss to the data where as if the private channel got corrupts then the data will be over writes and there is huge loss of data.

4. In clustering we will provide shared storage to access data and to provide redundancy. To
access storage from node to storage we will provide two connectivity ports from the node to the storage box. (If one port got corrupts then the other port will be used. We will provide redundancy for each and everything in clustering is to avoid single point of failure.) We will provide two UPSs also for the cluster. 5. We will call the hard disks in solaris is c0t0d0s0 where as in clustering: disk access point (from server to storage) (LAN port from the server end) is called controller. Controller is called as initiator in VCS. Storage end LAN port is called target and the disk in the storage is called device. 4. If the private channel got corrupts then how the issue will create? Ans: Let us assume /ora and /java applications are running on one node and /sap is running on second node in the two node cluster. If for any reason any one of the application or server fails then the application will moved to the other node. The data will be written on the blocks of the disk in the storage box. Private channels work is to communicate and inform each other that this block is using this node. So that the data will not over writes to the blocks. If the private channel got corrupts then there is no communication happens. Thus the nodes assume that the other node is down and writes the data to the blocks and the other node also assumes the same and writes the data to the same blocks. Then there will be huge loss of data and we cannot retrieve this data at any cost. This is called split brain condition.

5. To avoid this type of data loss we are using two private channels. If one private channel got
corrupts then the other private channel will be used. If both the private channels got corrupt then again we will face split brain condition.

6. To avoid this split brain condition we will inform to the cluster that do not go to split brain condition
and we will provide communication to both the nodes using gap disk as shared disk for both nodes. The Size of the gap disk is 64 MB.

Note:

7. If the gap disk also got corrupts then it will go to split brain condition. To avoid this we will inform
to the Cluster that do not go to split brain condition and use the public channel as private channel. ( The impact of this situation may slow down the performance of the application and the server as many requests being handled) This is the lowest priority.

8. Up to VCS 4.0 we are using the above VCS config steps. After VCS 4.0 io fencing concept was
introduced to avoid split brain condition permanently. To configure io fencing we need SCSI 3 PAR technology. In SCSI 3 PAR technology we can implement Io fencing. In SCSI 3 PAR technology storage it will assign IDs to the blocks called as block IDs. Depending on the block IDs io fencing will work. If the public region also got corrupts then we will implement io fencing concept after VCS 4.0 to avoid split brain condition. 9. When the server is accessing the block in the storage box to write the data io fencing will block that block by io fencing on. After completing writing/accessing the block io fencing off will be on. To on/off the io fencing it will use block ID. In this situation there is no chance of going to split brain condition and there is no chance of over writing data.

Vous aimerez peut-être aussi