server client

16
www.crisconitservices.com 1)how to share a directory with nfs server and how client mount the nfs share server vi /etc/dfs/dfstab share -F nfs /ibm wq! exportfs -va --- to export the directory dfshares ---- to see the shares client mount -F nfs sun1:/ibm /ibm vi /etc/vfstab sun1:/ibm - /ibm - nfs - - yes wq! df -k - to see in if its mounted cd /ibm and see the content 2) how to create 30 gb of volume using raid 0 concatenation on three different disk First create two slices of 10GB each format command and create two slices in two disk with 10gb each metainit d0 2 1 c0t0d0s1 1 c0t0d1s1 newfs /dev/md/rdsk/d0 mount /dev/md/dsk/d0 /ibm growfs -M /d0 /c0t0d3s1 - create a slice of 10GB and then use growfs command first create 3 slices of 10 GB each on 3 disks #metainit d10 1 3 c0t1dos7 c0t2d0s7 c0t3d0s7 it will create 30 gb of volume d10 if you want to create a concantination #metainit -d d30 3 1 c0t0d0s7 1 c0t2d0s7 1 c0t3d0s7

Upload: others

Post on 04-Dec-2021

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: server client

www.crisconitservices.com

1)how to share a directory with nfs server and how client mount the nfs share server vi /etc/dfs/dfstab share -F nfs /ibm wq! exportfs -va --- to export the directory dfshares ---- to see the shares client mount -F nfs sun1:/ibm /ibm vi /etc/vfstab sun1:/ibm - /ibm - nfs - - yes wq! df -k - to see in if its mounted cd /ibm and see the content

2) how to create 30 gb of volume using raid 0 concatenation on three different disk

First create two slices of 10GB each format command and create two slices in two disk with 10gb each metainit d0 2 1 c0t0d0s1 1 c0t0d1s1 newfs /dev/md/rdsk/d0 mount /dev/md/dsk/d0 /ibm growfs -M /d0 /c0t0d3s1 - create a slice of 10GB and then use growfs command

first create 3 slices of 10 GB each on 3 disks #metainit d10 1 3 c0t1dos7 c0t2d0s7 c0t3d0s7 it will create 30 gb of volume d10

if you want to create a concantination #metainit -d d30 3 1 c0t0d0s7 1 c0t2d0s7 1 c0t3d0s7

Page 2: server client

www.crisconitservices.com

3)what are raid 0 ,1 ,5

raid 0 -concatination and stripping raid 1 - mirroring raid 5 - stripping with parity

RAID 0 - Striping: It is the Stripped Disk Array with no fault tolerance and it requires at least 2 drives to be implemented. Due to no redundancy feature, RAID 0 is considered to be the lowest ranked RAID level. Striped data mapping technique is implemented for high performance at low cost. The I/O performance is also improved as it is loaded across many channels. Regeneration, Rebuilding and functional redundancy are some salient features of RAID 0. RAID 1 - Mirroring: Non redundant disk array It is the Mirroring (Shadowing) Array meant to provide high performance. RAID 1 controller is able to perform 2 separate parallel reads or writes per mirrored pair. It also requires at least 2 drives to implement a non-redundant disk array. High level of availability, access and reliability can be achieved by entry-level RAID 1 array. With full redundancy feature available, need of readability is almost negligible. Controller configurations and storage subsystem design is the easiest and simplest amongst all RAID levels. RAID 5: RAIDS 5 is Independent Distributed parity minimum requirement of at least 3 drives to be implemented and N-1 array capacity. It helps in reducing the write inherence found in RAID 4. RAID 5 array offers highest data transaction Read rate, medium data transaction Write rate and good cumulative transfer rate.

4) how to install multiple patches pkgadd -d /directory <patch one> <patch two>

5) how to add patched to the kernel 1.) uname -a --------> To view the current patch 2.) download latest kernel patch 3.) boot through single user mode 4.) install patch with patchadd command.

Page 3: server client

www.crisconitservices.com

6)what are the deamon for nfs server Mountd,Nfsd,Lockd,Statd,Nfslogd the above mentioned daemons are we use upto solaris9 that means in NFS ver.3 but in solaris 10 means in NFS ver.4 we use another new daemon called nfsmapID and here in NFS ver.4 mountd,statd,nfslogd nolonger works. and client side we use a new daemon called nfs4cbd

7)how to see the kernel information or how many bit operating system you have isainfo –kv

8)how many run level in solaris? Totally there are 9 run levels. init -0 prom stage ok init -s single user mode with out network init -S single user mode with network init -1 single user mode with non system disk init -2 multi user mode with out nfs init -3 multi user mode with nfs init -4 currently not in use init -5 halt the system init -6 reboot the system Bydefault sys is booting upto runlevel 3 In reverse way (3,2,1,S,s,0) it is shutting down

9)solaris network daemon inetd

10) how to stop the process using process name kill for (numeric PID) pkill for (process name) 1) First of all find the process as follows: #prstat | grep <process-name> (or) #ps -ef |grep <process-name>

Page 4: server client

www.crisconitservices.com

2) After findinf the process-id of that process u want to stop, do the following: #kill -9 <process-id> (or) #pkill -9 <process-name> (or) #pkill -9 <process-id>

11)solaris kernel name For 32 bit: The Kernel is made up of two core files. 1. "genunix" which is platform independent, location: /kernel/genunix 2."unix" the platform dependent version of the kernel,location /platform/'uname -m'/kernel/unix The two files are combined in mem at bootime to form the Kernel.

12)what is RBac and how to create a role? RBAC is role based access control list it is used to assign user some roles of administrator like creating user and deleting and shutdown the system in the absence of the admin vi /etc/security/prof_attr - create a profile usermgt:::"user can create users" wq! vi /etc/security/exec_attr usermgt:smuser:cmd:::/usr/sbin/useradd:uid=0 wq! #roleadd -d /usr/role1 -P usermgt -m role1 #usermod -R role1 user1 #passwd role1 new passwd #su - user1 passwd $su - role1 passwd $/usr/sbin/useradd user2 - he can now create users.

13)If root file system 100% full what you have to do? If system is running, affirmative action is that move all log files to some other file system then find out which file/files have been created recently other than logs and

Page 5: server client

www.crisconitservices.com

then first stop the process which is creating and then mv or delete that files.

14)How to find & replace bad disks in solaris & VXVM?plz explain step by step? fist check "iostat -en " output & see which disks having large Hard, tran ,soft errors . In Vxvm see Vxprint o/p in u will get failed disk.

15)what are soft links and hard links, and differentiate them. soft link : we can create soft link by using #ln -s command we can create soft link,if the source file doesnt exist. If the source file delete,we cannot access the content.But the link exist.we can create a link file which is belong to another file system,another directory. Soft link doesnt share the inode number.if u issue ls -l command l in the first column display the file is a soft link. Across the file system Hard link: #ln <source file> <link> we cannot link the file,if the file doesnt exist. we can link the file with in a directory. if the source file delete,we can view the content of the link file.. Hd share the inode number. With in the file system (Ex)/etc/init.d and /etc/rc#.d both are same inode

16)how to recover boot-block, if it it corrupted. and what happens to the os if it gets corruted. boot cdrom -s mount /dev/rdsk/c0t0d0s0 /a cd /a cd /usr/platform/`uname –m`/lib/fs/ufs installboot bootblk /a /dev/rdsk/c0t0d0s0 umount /a init 6

17)How can i stop the telnet service in solaris 8 and 9? vi /etc/inetd.conf comment the telnet line with # refresh inetd daemon

Page 6: server client

www.crisconitservices.com

18)I want to Know how many LUNs are in my Solaris10 server as well as NIC cards ? format command-for lun dladm show-link -NIC's

to see the Hba on the system cfgadm -al fcinfo format NIC card Dladm

19)can you explain about the vxencap command in veritas volume manager? Encapctulation means to bring the disk under VxVm control without loss of data. The vxencap script identifies any partitions on the specified disk that could be used for file systems or special areas such as swap devices, and then generates volumes to cover those areas on the disk. This process is known as encapsulation. In the case of partitions that contain file systems, the entries in /etc/vfstab will be modified to use the new volume devices.

20)what are the two conditions need to be taken before encapsulating the disk under the VxVm control(Veritas volume manager) -> One free partition -> 2048 sector free in the begining/end of disk for pvt region 1.two free disk partion 2.S2 slice represnts the whole disk size. 3.Minimum amount of free space in the beginning or end of the disk.

21) how will you execute backup and restore using the tar command in a single command tar cvf - /attachments/filename.txt | tar xvf -

Page 7: server client

www.crisconitservices.com

22) how to now the network speed, whether it is a full duplex or half duplex? and what is full duplex and half duplex # dladm show-dev bge0 link: up speed: 100 Mbps duplex: full bge1 link: down speed: 0 Mbps duplex: unknown

23)how to install a patch in solaris 10( step by step details)? 1)Mount the cdrom 2)/cdrom/eis-dvd/sun/install 3) . ./profile-EIS 4) ./setup-standard.sh After Logout and Login 5) cd /cdrom/eis-dvd/sun/patch 6) goto the desired directory where the patches are available 7) unpack_patches 8) provide the path for unpacking for ex : /var/sun 9) init S 10) cd /var/sun 11) ./install_all_patches

24) Need to take the backup of the filesystem through ufsdump or ,need to remove one of the root mirror from the server . 25) Need to check the current patch version on the server. # uname -a ( For kernel patch ) # showrev -p ( For other patches ) 3) Check the latest patch in http://sunsolve.sun.com 4) Gothrough the Read me file 5) Boot the server in to the single user mode #shutdown -g0 -y -i1 ( or #init 0 & ok boot -s ) 6) Install the patch #Patchadd < Patch > 7) Down the machine in to the OBP using #init 0 8) Do the reconfiguration boot

Page 8: server client

www.crisconitservices.com

#boot -r 9) Check the patch is updated pr not

26)how to find bad disk in VERITAS VOLUME MANAGER vxprint -hrt This command will give the entire status of the disks

27) how to find NIC card type. is there any command to display the card type when it not plumbed. for solaris 10 you can execute below command to get nic information. #dladm show-dev

29)don’t want to ask password reset in ever month to particular user. How to enable the same for only one user. passwd -x -1 username

30)what is the purpose of autofs and automountd commands..? The AutoFS file system automatically mounting NFS file systems on demand and for automatically unmounting these file systems after a predetermined period of inactivity. The mount points are specified using local or distributed automount maps. The /lib/svc/method/svc-autofs script starts the automountd daemon. Note:- The automountd daemon is completely independent from the automount command. Because of this separation, you can add, delete or change map information without having to stop and start the automountd daemon process.

31) what is the difference b/w /etc/system profile and user profile...? /etc/system is used for changing kernel variables and user profile is used for changing a user's profile like path, PS1 etc....

Page 9: server client

www.crisconitservices.com

32)What is the profile file for ordinary user, when those will execute..? These files provide an environment for the entire community of users who log in to the system. The solaris OS provides the system initialization files. They reside in the /etc directory. The /etc/profile file and the /etc/.login file are the two main system initialization files. The Bourne, Korn, and Bash login shell look and execute the system initialization file /etc/profile during login. The C login shell looks for and executes the system initialization file /etc/.login during the login process. When a user logs in to the system, the system invokes the user’s login shell program. The shell program looks for its initialization files in a specific order, executes the commands contained in each file, and displays the shell prompt on the user’s screen.

33)In solaris we have 2 directories for commands. what are they..? is there any difference b/w those..? they are /usr/bin and /usr/sbin /usr/bin This is the primary directory for executable programs. Most programs executed by normal users which are not needed for booting or for repairing the system and which are not installed locally should be placed in this directory. /usr/sbin This directory contains program binaries for system administration which are not essential for the boot process, for mounting /usr, or for system repair.

33) what is the 3rd field of /etc/inittab file..? what are thepossible values of that field...? inittab fields Field Description label a unique identification label of up to four characters run_level the init level at which the entry is executed action a keyword indicating the action that init is to take on the process process the process init executes upon entering the specified run level

34)how to add a run control script..?

Page 10: server client

www.crisconitservices.com

The following procedure describes how to add a run control script: 1.. Create the script in the /etc/init.d directory. #Vi /etc/init.d/<filename> #chmod 744 /etc/init.d/<filename> #chgrp sys /etc/init.d/<filename> 2. Create links to the appropriate /etc/init.d directory. # cd /etc/init.d # ln filename /etc/rc#.d/S##filename # ln filename /etc/rc#.d/K##filename For instance, you might link a file in /etc/init.d called database to a file called /etc/rc3.d/S99database, with a corresponding stop script called /etc/rc3.d/K99database. 3. Use the ls command to verify that the script has links in the appropriate directories. # ls -li /etc/init.d/filename # ls -li /etc/rc#.d/S##filename # ls -li /etc/rc#.d/K##filename 4. Test the filename by performing the following commands: # /etc/init.d/filename start

35)wht is the umask value to crate directory with only rw options to root..? umask 177 drw------- 2 ramas sysadmin 512 Mar 6 15:21 ttt

36) Difference b/w crash dump and core dump files..? When an operating system has a fatal error, it generates a crash dump file (crash dump). When a process has a fatal error, it generates a core file. If a fatal operating system error occurs, the operating system prints a message to the console, describing the error. The operating system then generates a crash dump by writing some of the contents of the physical memory to a predetermined dump device, which must be a local disk slice. You can configure the dump device by using the dumpadm command. After the operating system has written the crash dump to the dump device, the system reboots. The crash dump is saved for future analysis to help determine the cause of the fatal error. When a process terminates abnormally, it typically produces a core file. You can use the coreadm command to specify the name or location of core files produced by abnormally terminating processes.

Page 11: server client

www.crisconitservices.com

DEFAULT DUMP DEVICE --- SWAP

36)Explain sar commands.? Sar – system activity reporter In the first instance, the sar utility samples cumulative activity counters in the operating system at n intervals of t seconds, where t should be 5 or greater. If t is specified with more than one option, all headers are printed together and the output can be difficult to read. If the –o options is specifeied, it saves the samples in filename in binary format. The default value of n is 1. In the second instance, no sampling interval is specidied. Sar extracts data from a previously recorded filename, either the one specified by the –f option or, by deafault, the standard system activity daily data file /var/adm/sa/sad for the current day dd. Example:- sar –o temp 10 5 Binary read sar –f temp

37)Command to check all the process statistics..? Prstat, prstat –a Prstat – report active process statistics

38)what is major number and what is minor number..? major number maps to the device drivers(ex: printer , cdrom, screen) minor number maps to the specific device

39)what is the use of /etc/path-to-inst file..? it contains the physical name and instance names of the devices instance names r the kernel abbriviated names which is used by the kernel for reffering to a device

40) If ping command is not working then how to check the status of the server..? You can always use traceroute if ping command is not working.

Page 12: server client

www.crisconitservices.com

41) which information superblock contains..? whre u can find the bootblock..? primary superblock resides in 1-15 sectors this field consistes information abt the file system like the number of data blocks number of cylindergroups name of the mount file systems file system states (clean , sable, active)

42)What r the different file systems..? Disk Based File System 1.ufs 2.hsfs 3.pcfs 4.udfs Distributed File System 1.nfs Pseudo Based File System 1.tmpfs 2.swapfs 3.mntfs 4.procfs 5.objfs....etc.

43)How many secondary groups allows to add..? 15 44)wht is the difference between mkfs & newfs is there any difference..b/w both of them.? mkfs creates filesystems depends upon the option which we have given. for example : mkfs -F vxfs /dev/rdsk/c0t0d0s7 mkfs -F ufs /dev/rdsk/c0t0d0s6 but with the help of #newfs we can creates only UFS, this command is only for unix file system. ---------------------------------------------------------------------------------------- 45)wts differnce between svm&vxvm? compare to vxvm in svm online resizing is not possible ,no relaouts

46)what is the difference between solaris 8&9, Solaris Secure Shell Software,IPSec with Internet Key

Page 13: server client

www.crisconitservices.com

Exchange (IKE),Extensible Password Encryption,Random Number Generator,Secure LDAP,Extended File Attributes,Flexible Installation,Solaris 9 Resource Manager Software,Solaris Volume Manager Software,Solaris Patch Manager Software,Multiple Page Size Support,Directory and Application Integration. 47)what is the main difference between windows , unix ,linux, operating syatems? And why the companies in the industry prefer to use solaris os ? why may be the reason? for security purpose and hackers cannot hack the data while transferring the data form server to server compare to all unix flavor solaris servers cheep and easy to maintain

48)what is the back up software we r using in solaris 8,9,10 EMC Legato Networker

49)How to use disk quotas in solaris (command mode) ? what is the procedure for checking disk space of the particular user in command mode? df -h /home/username repquota -v /export/hom

50)How can u configure DNS & configuration files Configuring DNS: For DNS server /etc/named.conf /var/named/named.host /var/named/named.rev For DNS client /etc/resolve.conf Demons: in.named named.conf

51)What are the packages for DNS? BIND is the package for DNS

52)How to stop if Solaris system it rebooting continually. What is the steps to come normal position.? There might be some problem is hardware ..need to chek the cables connected to the server specifically power cable....

Page 14: server client

www.crisconitservices.com

still problem persist ...need to chek the physical RAM on the server.once remove it and clean properly and place it on the same position.else need to chage the RAM. Check and edit /etc/inittab file. 1. Go to ok> prompt by using stop+a keys 2. Boot in single user mode i.e., ok> boot -s 3. check the /etc/inittab file and make sure you can see the number 3 is entered before default. 4. Once you make the changes reboot the system it should work

53)About ARP protocol? Adress Resolution Protocol , is a method for finding Hos't link layer address when only it's IP or network layer known.It is mainly used to translate IP address to MAC address.

54)what r the daily responsibilities of u as a system administrator user administration performance tuning ensuring service stability Validating all syslog, monitoring sys performance, checking any latest patches/firmware with OEM vendors etc..

55) what r the daemons have been started when u install Veritas vxconfigd, vxiod, vxnotifyd

56)u have 10 solaris boxes and u have given to add 200 users? At fast how can u add the 200 users? By using Shell Scripting.....

57)what r the configuration files for SAMBA and how can u configure samba on

network with windows machines

configuration file for SAMBA is smb.conf. location is /etc/sfw/smb.conf.

Page 15: server client

www.crisconitservices.com

edit the smb.conf file. $ cd /etc/sfw $ ls $ vi smb.conf 1) replace workgroup=your workgroup 2) server string=samba server 3) hosts allow=give which hosts you want to give access 4) passwd server=your server ip 5) interfaces=give your server ip address 6) copy from [my share] to create mask line to the last. remove comment in front of the lines.change the lines to which dir. u want to share it and whom users u want to access this dir. go to windows machine. click on run and enter your server ip address like this \\server ip and hit enter. the shared dir. will appear in windows machine.

58)in this what is the configuration of .profile file and the other files .profile is a unix shell script which is executed for a user every time that user may logs in.This .profile may be stored in user's directory.this profile may be used by Born ,Korn ,Bash shells. For Born shell the configuration may be /etc/skel/local.profile $HOME/.profile For Korn shell /etc/skel/local.profile $HOME/.profile And profile is a initialization file /etc/profile

59)what is the use of Jumpstart in Solaris and how can u configure it The Jump start feature is an automatic installation process available in the Solaris operating environment. It allows system administrators to categorize machines on their network and automatically install systems based on the category to which a system belongs. · Simplifies installations · Speed - Faster then CD-ROM installation · Allows unattended installation

Page 16: server client

www.crisconitservices.com

· Replication - same systems across the enterprise Main configuration files are is sysidcfg, ethers, rules. You can copy the image of the OS in the server and run boot-net install on client systems. 60)if u have given to install Solaris on Intel machine with more fast (70% to 80% compare to SPARC) then how can u install ? Well if u want to run the solaris directly on the intel machine u must have min 1GB ram & HDD up to 8GB for solairs 10. Another method is to install the virtual machine & u have to install solairs by using virtual machine.This method can be used in multiplatforms like(windows).But we have min 2Gb of Ram....to run Fastly..

61)which is the fast SPARC or Intel ? and why? Intel and Sparc have different architectures. One uses Little Endian and the other Big Endian Architecture. This is the way the order of bytes are arranged. When we compare the from a cost to performance perspective Intel Platforms would give us better performance. if you plan to move Files systems / Raw data over these architectures you will have to byte swap them. Not required on a OS level because the Solaris VFS takes care of it.

62)what r the port numbers for HTTP and DNS HTTP POrt no. is 80 & DNS port no is 53. how u can push the user details in NIS cd /var/yp /usr/ccs/bin/make command will update the information in NIS.