Beruflich Dokumente
Kultur Dokumente
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.
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
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 CD-
ROMs 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
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. RAM usage is low here. Booting
performance is fast.
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 Signal Name Event Default Action
1 HUP Hang up Exit
9 Kill Kill Exit
15 Terminate Terminate Exit
NOHUP 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.
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.
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.
#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:
SVM daemons:
1. Md maniford
2. Rfc metad
3. Rfc metamedd
4. Rfc metamind
5. Rfc mdcommd
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
Subdisks (each representing a specific region of a disk) are combined to form plexes
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
vol02-01 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.
It can consist of up to 32 plexes, each of which contains one or more subdisks.
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.
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.
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 active-
active cluster nodes.
2. What are the storage technologies?
Ans: