Friday 31 August 2018

useful ALOM/SC console commands

ALOM commands:
==============

connecting console

sc>console
sc>console -f
sc>#.            ---> to exit console use(OS prompt)



sc>setsc_escapchars #.    ---> to set escape character to #. to exit console

sc>logout ---> to exit from console



System info:-
------------

sc>showplatform     ----> check HW maodel and domain status
sc>showenvironment  ----> Check sensor values
sc>showfru          ----> FRUID/FRU prom
sc>showsc           ---->Display details of sc software config

Network commands:-
-----------------

Setup ALOM IP address:

sc>setsc set if_network true
sc>setsc netsc_dhcp false
sc>setsc netsc_ipaddr 192.168.1.132
sc>setsc netsc_ipnetmask 255.255.255.0
sc>setsc netsc_ipgateway 192.168.1.1
sc>resetsc

sc>shownetwork -v     ----> Display current netwoek config



sc>showuses    --> list available users

sc>userpassword username   --->set/reset userpasswd
sc>password    ---> change own password
sc>usershow username ----> to details about user


power management:

sc>poweron
sc>poweroff
sc>reset
sc>break    ----> send break signal to OS




logs:

sc>showlogs -v
sc>consolehistory

Server Locator:

sc>showlocator
sc>setlocator on/off

sc>dumpconfig -s ipaddr -f pathname     ---->save your current ALOM configuration to a remote file server using FTP

Firmware upgrade:-
-----------------

sc>flashupdate -s ipaddr -f pathname/alomfw      ---> to update single ALOM firmware image
sc>flashupdate -s ipaddr -f pathname/alommainfw  --->For the main firmware image
sc>flashupdate -s ipaddr -f pathname/alombootfw  ---> For the boot monitor image
sc>resetsc

eg:


sc> flashupdate -s xxx.xxx.xxx.xxx -f
/usr/platform/SUNW,Netrax40/lib/images/alommainfw
Username: joeuser
Password: ********
..........................
Update complete. To use the new image the device will need to be reset using 'resetsc'.
sc>


OS commands for ALOM  :-


# cd /usr/platform/`uname -i`/sbin/scadm         (path of scadm command)
# scadm resetrsc [-s]       [ -s for soft reset ]
# scadm set [variable] [value]
# scadm show [variable]
# scadm useradd user_name
# scadm userdel user_name
# scadm usershow user_name
# scadm userpassword user_name
# scadm userperm user_name
# scadm shownetwork
# scadm consolehistory -a
# scadm loghistory -a
# scadm version -v


c> help
Available commands
---------------------
poweron [-c] {FRU}
poweroff [-y] [-f]
removefru [-y] {FRU}
reset [-y] [-x] [-c]
break [-y] [-c]
bootmode [normal|reset_nvram|diag|skip_diag|bootscript="string"]
console [-f]
consolehistory [-b lines|-e lines|-v] [-g lines] [-p|boot|run]
dumpconfig [-t] -s <IPaddr> -f <pathname>
showlogs [-b lines|-e lines] [-g lines] [-v] [-p logtype[r|p]]
setlocator [on|off]
showlocator
showenvironment
setfru -c <Customer data>
showfru [-g lines] [-s|-d] [FRU]
showplatform [-v]
setkeyswitch [-y] [normal|stby|diag|locked]
showkeyswitch
showsc [-v] [param]
shownetwork [-v]
setsc [-r [y]] [param] [value]
ssh-keygen [-t rsa|dsa] [-r] [-l]
restartssh [-y |-n]
setupsc
showdate
setdate [[mmdd] HHMM | mmddHHMM[cc]yy] [.SS]
resetsc [-y]
restoreconfig [-t] [-x] [-y] -s <IPaddr> -f <pathname>
flashupdate -s <IPaddr> -f <pathname> [-v]
setdefaults [-y] [-a]
useradd <username>
userdel [-y] <username>
usershow [username]
userpassword <username>
userperm <username> [c] [u] [a] [r]
password
showusers [-g lines]
logout
help [command]
sc>




Useful XSCF commands

XSCFCommands:-
=============


showdomainstatus

console -d 00

poweron -a

poweron -d 0

poweroff -a

poweroff -d 0

rebootxscf



reset -d 0 por

reset -d 0 panic
reset -d 0 xir


sendbreak -d 0

showuser -a

shownetwork -a

cfgdevice -l ---> list attached device


showhostname -a

sethostname xscf#0 hostname

sethostname -d example.com


setnetwork xscf#0-lan#0 -m 255.255.255.0 192.168.1.22


applynetwork

rebootxscf


Hardware Info:-
------------------
showstatus

showhardconf

showdevices


fmdump -v

fmdump -e -V -u <UUID>

showlogs -v
showlogs error
showlogs power

Take snapshot :-

snapshot -L F -d username@servername:/var/tmp

Sunday 20 May 2018

Solaris Administrator Interview Questions

1.Is it possible to change the M series processor to T series server ?
2.Difference Control domain vs IO domain?
3.How to replace HBA card in T series And what will be impact and how resolve those?
4.How to replace PCI card in M9k? process vise
5.How to break the servers T-series
6.How view the entire ldom console logs?
7./etc/system set max user value purpose?
8.Application team is starting app's they are gettig error no device space avalibale but application mount point has enough space?
9.How take ldom configuration backup?
10.how take backup of all ldom's?
11.Which multi path will recommend to storage  for better perfoemance in Hittachi ,IBM ?
12.How will you confirm multipath enabled or not?
13.How will confirm IPMP is working ?
14.how to do DC migration ,how will you backup of FS?
15.What is the private & public region in VXVm?
16.When public and private region gets' created in VXVM ?
17.How to take backup of particular volume in VXVM?
18.There 2 plex in volume 1 got failed is there any impact of volume and data ?
19.what is mean by plesx status "tmp_recovery"?
20.There are multiple volume in Diskgroup ,1 disk got failed on DG ,no layout,volume not mounted .what is the impact of data & volume?
21.how to send  break to server in ILOM ?
22.how to take snapshot in T-series ?
23.how to panic the server?
24.what is the jeopardy in vcs?
25.how to create raw data set in ZFS ?
26.How to take clone in ZFS?
27.How to recover the ldom's useing sp-conifg ?
28.Do you share the root password to oracle ?

Procedure To Configure a Whole Root Zone on Solaris 10


Steps:-

1.Start the zone configuration.

#zonecfg -z wholerootzone, where wholerootzone is the name of the new whole root zone.

Create a configuration for the specified zone.

zonecfg:wholerootzone> create -b

2.Set the zone path.

The zone path must specify a highly available local file system. The file system must be managed by the SUNW.HAStoragePlus resource.

zonecfg:wholerootzone> set zonepath=/global/zones/HA/wholerootzone (Any local filesystem which has enough space to host)

3.Set the autoboot value.

If the autoboot value is set to true, the zone is automatically booted when the global zone is booted. The default value is false.

zonecfg:wholerootzone> set autoboot=false

If resource pools are enabled on the system, associate a pool with the zone.

zonecfg:wholerootzone> set pool=pool_default, where pool_default is the name of the resource pool on the system.

4.Add a network virtual interface.

zonecfg:wholerootzone> add net

5.Set the IP address for the network interface.

zonecfg:wholerootzone> set address=10.255.255.255

6.Set the physical device type for the network interface.

zonecfg:wholerootzone> set physical=hme0

zonecfg:wholerootzone> end

7.Verify and commit the zone configuration.

zonecfg:wholerootzone> verify

zonecfg:wholerootzone> commit

zonecfg:wholerootzone> exit

Friday 18 May 2018

Solaris LDOM useful commands

ldm ls-devices -a  ---> To List I/O device on control domain.
ldm ls-services    ---> To list available Virtual services on control domain
ldm ls ---> To list ldom's

ldm ls-bindings primary
ldm set-mau 1 primary

ldm set-vcpu 8 primary ---> Adding  vcpu to ldom
ldm set-mem 16g primary ---->Assigning memory to ldom
ldm add-config base   --> Save  sp-configuration file
ldm ls-config    ---> to list sp-config
ldm -V   ---> list the hypervisor version
virtinfo -a   ---> To check control domain name on ldom


Ldom  creation :-
================

ldm add-domain ldom1

ldm ls-domain

ldm add-memory 4g ldom1

ldm add-cpu 8 ldom1

ldm add-vnet vent0 primary-vsw0 ldom1

ldm ls-bindings ldom1

ldm add-vdsdev /dev/dsk/c1t1d0s2 ldom1-OS@primary-vds0

ldm ad-vdsik vdisk1 ldom1-OS@primary-vds0 ldom1


ldm add-vdsik cdrom  iso1@primary-vds0 ldom1

ldm ls-services

ldm ls-services vds0

ldm bind-domain ldom1

ldm set-variable auto-boot\?=false ldom1

ldm start ldom1

telnet 0 5002

Adding zfs data set to LDOM's:
==============================

zfs create -V 25G pool1/ldom1

ldm add-vdsdev /dev/zvol/dsk/pool1/ldom1 ldom1-app@primary-vdso

ldm add-vdisk vdisk2 ldom1-app@primary-vdso ldom1


Adding IsO to control domain:-
=============================


ls /export/home/sol1-10-u10-ga2-sparc-dvd.iso


ldm add-vdsdev options=ro /export/home/sol1-10-u10-ga2-sparc-dvd.iso iso2@primary-vds0


Removing service and domains:-
=============================

ldm stop-domain ldom1

ldm unbind-domain ldom1

ldm remove-domain ldom1


ldm remove-vdisk vdisk1 ldom1
ldm remove-vdisk vdisk ldom1


ldm ls-services

ldm remove-vdsdev ldom1-os@primary-vdso
ldm remove-vdsdev ldom1-app@primary-vdso


LDOM configuration Backup and Restore:-
======================================

ldm ls-config

ldm ls-constraints -x >config .xml

ldm ls-contraints -x ldom1 > ldom1.xml



ldm ls-config

ldm rm-config baseconfig

powercycle
=====================================================================
Once the system has restored to the factory default,then you can restore the system backup using the XML files which we have created.
Login to the control domain and restore it.
=====================================================================

ldm init-system -i config.xml

ldm add-config baseconfig2

#ldm ls-config
factory-default
baseconfig
baseconfig2


ldm init-system -i ldom1.xml -----> only particular ldom restore

ldom add-config baseconfig3