Wednesday, April 3, 2019

solaris interview questions


  • What's the difference between a whole root zone and a sparse root zone ?

Whole root zone
– Gets its own writable copy of all file systems. Thus installation takes a longer time than the sparse root zone.
– Also called as big zone.
– Bigger disk footprint, thus consumes more disk space

Sparse root zone
– critical file systems like /usr, /lib, /etc, /platform etc are inherited from the global zone to the non-global zone as a read-only loopback file system. Thus installation is quick compared to a whole root zone.
– Also called as small zone
– The default zone type.
– small disk footprint, thus consumes less disk space.

https://www.thegeekdiary.com/the-ultimate-solaris-zones-containers-interview-questions


  • One of the most commonly using virtualization technologies on Solaris .It’s very lightweight and easy to use and administrate. Oracle renamed the zones as containers and now it has a meaningful name too.  

“Zones + resource control = containers”. Yes. We can control the resource per zones by using rcap or dedicated method. In one Solaris global zone we can create more than 8000 zones.

There three types of zones in Solaris.
1. Sparse root zone.
2. Whole root zone.
3. Branded zone.
https://www.unixarena.com/2012/07/oracle-server-virtualization.html/


  • Brief about init phases ?

There are 8 run level.
What is the difference between init 1 and init s ?
If you switch from multiuser mode to init s and switch it back to multiuser mode.then remote useres automatically reconnects to the system. whereas in the case of init 1. they have to reconnect manually means they have to relogin
What is the difference between dsk and rdsk ?
dsk: Block level devices, FS Which are formatted and mounted that device is called block device.
rdsk: Raw level device or character level device

3. Explain the boot process?
Boot process dived into 4 phases.
POST :
Power on self test (POST), It will detect hardware, machine host ID,serial No, architecture type, memory and Ethernet address and it will load the primary program called bootblk.
OBPROM
Open boot programmable
Diagnosing all the system hardware and memory.
Initializing the boot parameter.
Creating device trees and load the boot block from (0-15 sector), it is called as secondary boot -- programmable ufsboot.
KERNEL INITIALIZATION
ufsboot load the kernel (generic unix)
kernel will load all the necessary devices modules to mount the root partition to continue the booting process
INIT PHASES
It will start by executing of /etc/init program and start other process reading the /etc/inittab files, as the directory in the /etc/inittab files.

What is Zombie process?
"Zombie" processes is also known as "Defunct" Processes. Due to the errors/bugs some processes didn't kill even after cleared all it's related processes. It's consider as a dead processes which are still consuming memory. We have to kill those defunct/zombie process in order to free Memory and make system Normal.

What is orphan Process?
An Orphan process which runs even after parent process is terminated and these processes doesn’t know what to do and when to terminate

30. What is the different between "Zombie" and "Orphan" Processes?
Zombie: It's a dead processes which is no execution.
Orphan: It's a live process which is still in execution state even without parent process.

34. What is OBP ? How to check the OBP version ?
OBP : Open Boot PROM (Programmable Read-Only Memory), While booting the server, OBP firmware will load immediatly which is stored in the boot PROM of the system. this primary role is that it boot the server either Mass Storage device or from a network.

40.  Different between Hard and Soft Mount ?
Hard Mount : Hard mount is Default, NFS client keep trying to mount the NFS shares if its not available, this may cause application hung. However, it will mount the NFS share automatically once its is available.
Soft Mount: NFS client will try to mount the NFS share for the particular period and then it won't try.

41.  Difference between TAR and UFSDUMP ?
UFSDUMP can be used either mounted or umounted Filesystem.
UFSDUMP will take complete file system backup which is including Block device and Spl Characters files

TAR can be used only when the FS is mounted status.
TAR Used for single and multiple file backup
TAR will not backup Block device and Special Charecters files.

42.  Difference between Cron and At jobs?
Cron     : Repetitive schedule can be done
At Jobs : Only One time schedule

11. Brief filesystem structure ?
VTOC present in the first sector in the raw disk area.
VTOC - 512 sector
Boot Block - 1-15 sector
Super Block - 16-31
First Cylinder Group - 32


7. How to view VTOC (Volume Table Of Contents) ? and How to copy ?
Print the VTOC
# prtvtoc /dev/rdsk/c0t0d0s2

14. Brief /etc/vfstab ?
Virtual File System Tab /etc/vfstab  file lists all the FS to be automatically mounted at system boot time
device to mount   device to fsck   mount point   FS type   fsck pass   mount at boot   mount options

15. Brief /etc/mnttab ?
/etc/mnttab file is a mntfs file that provides read-only info about mounted FS on the local server.

16. How to check installed packages?
# pkginfo |more
# pkginfo –l <pkgname>

http://www.unixrock.com/2014/01/solaris-basic-interview-questions.html


  • Explain rc script and run level

Rc script : check and mount the file system, start and stop the various process.
Run level: Base on the init phases 8 run level

Where the ip address will be stored
# /etc/hosts
# /etc/hosts.equi
# /etc/hosts.hme

After creating swap file update the same to /etc/vfstab  what will be the fstype.
tempfs

How will you find out enough memory?
# /use/platform/sun4u/sbin/prtdiag
# prtconf | grep –i mem

How to find the boot path in solaris
# prtconf –vp | grep bootpath
       or
# eeprom

How to bring the process to offline or online
# psradm –f (no of the process)
# psradm –a –n no of the process)

How to check the no of the processor available
# psrinfo –v

How do you check the run level
# who –r

What is difference between Hard and Soft mount?
Hardmount:Normal file system mount used mainly for mounting local file systems.
                 Once a file system is hard mounted, can use a normal filesystem untill
                  its umount.

Soft mount:It allows automatic unmounting if the filesystem is idle for a specified timeout
                 period. It is mainly used for network filesystems like NFS It can be configured
                 using Autofs and the network filesystem can be soft mounted.

How to do the disk cloning on solaris
Here is the procedure
1.install the disk
you can do this few ways, let’s the scenario be, the disk is already attached and its been label through format.
2.If primary disk is u r c1t0d0s2
#dd if=/dev/dsk/c1t0d0s2 of=/dev/dsk/c1t1d0s2 bs=256k
This will take time, depends on the size of the primary disk
3.verfy the clone disk has a clean filesystem, for that
#fsck -y /dev/rdsk/c1t1d0s0
4.To verify that mount the clone disk
#mount /dev/dsk/c1t1d0s0 /mnt
5.change the /etc/vfstab to point to the clone device
#vi /mnt/etc/vfstab
After making changes, boot the clone disk


Difference between ufs and tar commnad
ufsdump
1. Used for complete file system backup.
2. It copies every thing from regular files in a file system to special character and block
    device files.
3. It can work on mounted or unmounted file systems.
Tar:
1. Used for single or multiple files backup.
2. Can’t backup special character & block device files.
3. Works only on mounted file system.

https://www.unixarena.com/2013/05/solaris-10-interview-questions.html/


  • Q.1 What is the definition of process and Daemon in Solaris 10 ?


Process
Process runs one time, when called by a daemon
Once done it will stop
EX-telnetd (in.telnetd) or ftpd called from xinetd/inetd daemon.

Daemons
A ‘daemon is a software process that runs in the background (continuously)
provides the service to client upon request.
EX-named is a daemon. When requested it will provide DNS service.

http://theunixdude.com/blog/2019/12/04/solaris-interview-questions-answer-solaris-10-11/



  • On transport protocols such as TCP, UDP, and SCTP, ports 1-1023 are by default privileged ports. To bind to a privileged port, a process must be running with root permissions. Ports that are greater than 1023 are by default non-privileged. You can use the ipadm command to extend the range of privileged ports, or you can mark specific ports in the non-privileged range as privileged ports

https://docs.oracle.com/cd/E36784_01/html/E37476/gnkmn.html

Oracle Solaris 11.3 Cheat Sheet
General Administration
Common system configuration tasks have changed in Oracle Solaris 11 with the Service Mana gement Facility (SMF) configuration repository being used to store configuration data.

Users and Roles
The  traditional  root  account  has  been  changed  to  a  root’  role  on  all  Oracle  Solaris  11 installations  as  part  of  the  Role  Based  Access  Control  (RBAC)  feature  set.This  change  gives improved auditability across the operating system, and the ability for administrators to delegate various system tasks to others in a safe way.

Boot Environments
Boot  Environments  are  individual  bootable  instances  of  the  operating  system  that  take advantage of the Oracle Solaris ZFS filesystem snapshot and clone capability. During a system update, new boot environments are created so that system software updates can be applied in a safe environment. Should anything go awry, administrators can boot back into an older boot environment.  Boot  environments  have  low  overhead  and  can  be  quickly  created,giving administrators an ideal best practice for any system maintenance work

Packaging
Oracle  Solaris  11  includes  IPS,  a  new  network-centric  package  management  framework  with automatic   dependency   checking.   IPS   has   integrated   package   and   patching,   and   can seamlessly manage system updates to Oracle Solaris Zones environments.

File Systems -Basic ZFS Administration
Oracle  Solaris  ZFS  is  the  default  root  file  system  on  Oracle  Solaris  11.  ZFS  has  integrated volume management, preserves the highest levels of data integrity and includes a wide variety of data services such as data compression, RAID,and data encryption.
iSCSI
NFS

Storage URI
In order to identify storage resources uniquely between nodes the concept of Storage URIs was introduced  in Oracle Solaris  11.  For  example  they  are  used  for  Zones  on  Shared  Storage  to identify the shared storage objects.


Basics of Oracle Solaris Zones
Oracle Solaris Zones provide isolated and secure virtual environments running on a single ope-rating system instance, ideal for application deployment. Whenadministrators create a zone, an application execution environment is produced in which processes are isolated from the rest of the system.
Immutable Oracle Solaris Zones

Advanced Networking -highly available loadbalancer
Inthis  example  the  Virtual  Router  Redundancy  Protocol  and  the  Integrated  Loadbalancer features  of Oracle Solaris  are  used  to  create  an  highly  available  loadbalancer.  This  longer example thus shows how to configure VRRP as well as the ILB feature, which could both used without the other.

Compliance
Run a compliance assessment with the PCI-DSS benchmark
DISA-STIG
CIS

How todo packet filtering in Solaris 11?
Solaris has a packet filtering functionality for several versions now. For Solaris 10 and 11 you can use the Ipfilter (IPF) mechanism. In Solaris 11.3 however a new mechanism was introduced.It’s based on the OpenBSD 5.5 Packet Filter (PF). In Solaris 11.3 you can use bothmechanisms. As indicated by the End-of-feature“ list, IPF will not be available in future Solaris versions. Please keep in mind that IPF and PF are mutually exc

How to enable IPsec?
This example assumes that server1 is 192.168.1.200 and server2 is 192.168.1.202. We will use IKEv2 in the shared-secret mode.

Managing Oracle Solaris 11 Security Extensions
Since Oracle Solaris 11 there is a command to manage security extensions in Solaris. The first to  appear  was  the  adress  space  layout  randomization  and  it  was  the  only  one.  Since Oracle Solaris 11.3

Just because a binary is setuid rootin Oracle Solaris11,it doesn't mean that it is run as root. Oracle Solaris  11  has  a  feature  called  Forced  Privileges.  Most  of  the  setuid  root  binaries  of Oracle Solaris just add the nescessary privileges when executed to allow the proper run of the application without switching to user id rootat all.

Tasks and Projects
Workloads seldomly  consists  just out  of  a  single  process,  thus  a  convient  way to  lavel  all processes  of  workloads  is  really  useful.  With  such  a  label  you  could  address  all  processes  of workload  in  one  step  instead  of  repeating  this  step  for  each  process.  Tasks  and  projects  are suchfacilities  to    label  workloads.  The  predominant  uses  of  Task  and  projects  are  accounting and (probably more important ) a way to group processes for resource control

Binding processes to a CPU or a group of CPU
A  new  feature  in Oracle Solaris  11.2  is  the  capability  to  bind  a  process  not  just  to  one processor,  but  to  multiple  ones. 

Resource Management
Using the Fair Share Scheduler without processes
In this example I want to ensure that one process is getting 75\% of the compute power and another one is getting 25% in case CPU resources are a contended resource. The FSS schedulerist based on the concept of shares:

Installation and Deployment
Automated  Installer  (AI)  is  the  new  network  based  multi-client  provisioning  system in  Oracle Solaris  11.  AI  provides  hands-free  installation  of  both  SPARC  and  x86systems  by  using  an installation  service  that  installs  systems  by  leveraging  software  package  repositories  on  the network.
System Configuration Profiles
System Configuration Profiles are used to provide system configuration information profiles, as used by Automated Installer.

https://www.oracle.com/technetwork/server-storage/solaris11/documentation/solaris-11-cheat-sheet-1556378.pdf