Tuesday, December 25, 2018

How to setup a 3 node swarm cluster in OEL 7.6 with Kernel 3.10.0-957.el7.x86_64

1.0) Install Oel 7.2
2.0) Ensure your having having a valid repo configured in /etc/yum.repo/
2.1) yum update -y, Once the latest Kernel is updated reboot the node.
2.2) yum install docker -y ========================> Install docker on all the 3 nodes
3.0) If your behind the proxy you can configure the proxy @ /etc/systemd/system/docker.service.d/
3.1) Create a systemd drop-in directory for the docker service:
$ mkdir -p /etc/systemd/system/docker.service.d
Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY and HTTPS_PROXY environment variable:
[Service]
Environment="HTTP_PROXY=http://x.x.x.x:80/" HTTPS_PROXY=http://x.x.s.x:80/"
4.0) systemctl enable docker
5.0) systemctl start docker
6.0) Flush changes.
7.0) systemctl daemon-reload
7.1) systemctl show --property Environment docker
Environment=HTTP_PROXY=http://X.X.X.X:8080/ HTTPS_PROXY=http://Y.Y.Y.Y:8080/
7.2) systemctl status docker
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/docker.service.d
+-docker-sysconfig.conf, http-proxy.conf
Active: active (running) since Mon 2018-11-12 00:26:56 EST; 1h 20min ago
Docs: https://docs.docker.com
Main PID: 20249 (dockerd)
Memory: 73.5M
CGroup: /system.slice/docker.service
+-20249 /usr/bin/dockerd --selinux-enabled --storage-driver devicemapper --storage-opt dm.basesize=25G
+-20260 docker-containerd --config /var/run/docker/containerd/containerd.toml
Nov 12 00:59:08 sukhoi dockerd[20249]: time="2018-11-12T00:59:08.003626658-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Nov 12 01:04:08 sukhoi dockerd[20249]: time="2018-11-12T01:04:08.203598640-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Nov 12 01:09:08 sukhoi dockerd[20249]: time="2018-11-12T01:09:08.403655398-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Nov 12 01:14:08 sukhoi dockerd[20249]: time="2018-11-12T01:14:08.603535523-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Nov 12 01:19:08 sukhoi dockerd[20249]: time="2018-11-12T01:19:08.603644944-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Nov 12 01:24:08 sukhoi dockerd[20249]: time="2018-11-12T01:24:08.803625057-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Nov 12 01:29:09 sukhoi dockerd[20249]: time="2018-11-12T01:29:09.003692469-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Nov 12 01:34:09 sukhoi dockerd[20249]: time="2018-11-12T01:34:09.203640712-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Nov 12 01:39:09 sukhoi dockerd[20249]: time="2018-11-12T01:39:09.403656758-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Nov 12 01:44:09 sukhoi dockerd[20249]: time="2018-11-12T01:44:09.603580926-05:00" level=info msg="NetworkDB stats sukhoi (f512c7cd0519...tMsg/s:0"
Hint: Some lines were ellipsized, use -l to show in full.
7.4 ) docker info, Once the docker is installed
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.03.1-ol
Storage Driver: devicemapper
Pool Name: docker-8:2-4831-pool
Pool Blocksize: 65.54kB
Base Device Size: 26.84GB
Backing Filesystem: xfs
Udev Sync Supported: true
Data file: /dev/loop0
Metadata file: /dev/loop1
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 14.42MB
Data Space Total: 107.4GB
Data Space Available: 107.4GB
Metadata Space Used: 581.6kB
Metadata Space Total: 2.147GB
Metadata Space Available: 2.147GB
Thin Pool Minimum Free Space: 10.74GB
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.02.149-RHEL7 (2018-07-20)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
NodeID: zcbc4vv5757m20385cz7jqxpu
Is Manager: true
ClusterID: 1s6r7l37c7bzlvkh6ovthf4tr
Managers: 1
Nodes: 1
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: x.x.x.x
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-327.el7.x86_64
Operating System: Oracle Linux Server 7.2
OSType: linux
Architecture: x86_64
CPUs: 24
Total Memory: 125.7GiB
Name: sukhoi
ID: ZOOZ:24F2:FWUS:OBQ4:DBRU:5YCU:G364:EMQQ:EUZ7:2VGH:4L2W:DPJB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
HTTP Proxy: http://x.x.x.x:80/
HTTPS Proxy: http://x.x.x.x:80/"
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
8) Once we install the docker ( Default networks)
[root@x4270akash]# docker network ls
NETWORK ID NAME DRIVER SCOPE
29d3ba90ff4c bridge bridge local
8e955dd25905 host host local
63ac0e5cf0e7 none null local
9) Once the docker swarm init command issue it will create two networks overly/ingress/docker_gwbridge ( Following network are used for inter communication)
NETWORK ID NAME DRIVER SCOPE
fb31d601ef35 bridge bridge local
07501da8723e docker_gwbridge bridge local =======================>
a36af19fa85b host host local
tf6dmepnxekf ingress overlay swarm =======================>
37ca581e5d57 none null local
Swarm initialized: current node (dfmvr0p41u2xaroxju772ea8f) is now a manager.
8) From the client you can add the worker to this swarm, run the following command:
docker swarm join --token SWMTKN-1-3pgpsq9agfxbsy2asvjew2p30afm8rdfw5szlh9zcb3c5u8aps-20dz136qydn4n05rkpfe592o0 x.x.x.x:2377
9) To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
[root@sukhoi /]# docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
v0c5jzt313g58jn5hhl5bxfl2 akash Ready Active 18.03.1-ol
dfmvr0p41u2xaroxju772ea8f * sukhoi Ready Active Leader 18.03.1-ol
sit20yl9qgftlc6r8vie62nax lca Ready Active 18.03.1-ol
Note: Deocker swarm commands only work from the manager.
[root@sukhoi /]# docker info From the manager node
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.03.1-ol
Storage Driver: devicemapper
Pool Name: docker-8:2-2148748183-pool
Pool Blocksize: 65.54kB
Base Device Size: 26.84GB
Backing Filesystem: xfs
Udev Sync Supported: true
Data file: /dev/loop0
Metadata file: /dev/loop1
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 14.35MB
Data Space Total: 107.4GB
Data Space Available: 107.4GB
Metadata Space Used: 17.36MB
Metadata Space Total: 2.147GB
Metadata Space Available: 2.13GB
Thin Pool Minimum Free Space: 10.74GB
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.02.149-RHEL7 (2018-07-20)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active =============================================> Swarm
NodeID: dfmvr0p41u2xaroxju772ea8f
Is Manager: true
ClusterID: q2lp94b3oe1a0q6ee3y8y8pv6
Managers: 1 ===============================================>
Nodes: 4 ===============================================>
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: x.x.x.x
Manager Addresses:
x.s.x.x:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-957.el7.x86_64
Operating System: Oracle Linux Server 7.6
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 251.7GiB
Name: sukhoi
ID: DFC4:HDQE:RT3W:LZ7K:FZUT:Z7FD:I36D:IV7F:5U6C:QALR:ISZP:L2V2
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
HTTP Proxy: http://x.x.x.x:80/
HTTPS Proxy: http://x.x.x.x:80/"
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Regards
Gurudatta N.R
How to setup a 3 node swarm cluster in OEL 7.6 with Kernel 3.10.0-957.el7.x86_64
.

Tuesday, November 6, 2018

Tuesday, October 30, 2018

How to Find Exadata Rack Model (Eight/Quarter/Half ..)

From the DB nodes.


cd /opt/oracle.SupportTools/onecommand/

grep -i MACHINETYPES databasemachine.xml
 
[root@sukhoi/]# grep -i MACHINETYPES
                X4-2 Eighth Rack HP 1.2TB
 
From the cell nodes
 
[root@Sukhoi ~]# cellcli -e list cell attributes eighthrack

TRUE
 
 
Regards
Gurudatta N.R

Tuesday, October 16, 2018

How to delete a file which is throwing operation not permitted) from root acount.

Unable to delete file in Linux/Unix, operation not permitted) from root account.

chattr -i -a filename 
 
chmod ugo+w  filename 
rm filename
 
Regards
Gurudatta N.R 

Thursday, October 4, 2018

How to import or clear a foreign configuration from the HBA configuration utility in Aspen



When prompted during the boot process press Ctrl+R to Run LSI Configuration Utility

Use CTRL+N to navigate to the VD MGMT screen, highlight the controller, press F2, Foreign config, Import/Clear.

Note: In some case with latest HBA firmware will not allow us to clear the Cache/import the cache. in those cases we have to pull thye disk from the Storage.

Regards
Gurudatta N.R

Sunday, September 2, 2018

How to Install and Configure VNC on Centos 6

In order to access the GUI of our linux servers

1) yum install tigervnc-server xterm

# vncpasswd
# vi /etc/sysconfig/vncservers

      VNCSERVERS="2:root"
      VNCSERVERARGS[2]="-geometry 1024x768"

# service vncserver start

# chkconfig vncserver on

Regards
Gurudatta N.R

Friday, July 6, 2018

How to list the users in Linux.

awk -F":" '{print "Login:" $1 "\tName:" $5 "\tHome:" $6}' /etc/passwd
 
 
Regards
Gurudatta N.R 

Wednesday, July 4, 2018

How to install the Grub in Linux .

Boot the server using the Linux CD and Type "linux rescue" on the boot prompt.

Once you get the Shell Prompt, Now follow the steps:

# chroot /mnt/sysimage

Now issue the command "grub-install "
 
For Example:
    
# grub-install /dev/sda

Now the grub will be reinstalled in the primary hard disk.

Regards
Gurudatta N.R

How to Install Boot Block in Solaris 10 and solaris 11


After mounting the data set, install the boot block using installboot or installgrub

SPARC
# installboot -F zfs /mnt/usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t0d0s0

x86 systems with Solaris 10 or Solaris 11.0
# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0

x86 systems with Solaris 11.1 and above

Use bootadm on x86 systems with Solaris 11.1 and above.The install-bootloader subcommand installs the system bootloader. It supersedes the functionality of installgrub on x86 as well as supporting installation of GRUB2’s bootloader on x86.

# bootadm install-bootloader -P rpool

Regards
Gurudatta N.R

Wednesday, May 23, 2018

How to check the IB cables is latched properly in DB/Storage nodes in Exadata .



for ib_cable in `ls /sys/class/net | grep ^ib`; do printf "$ib_cable: "; cat /sys/class/net/$ib_cable/carrier; done

The output should look similar to:

ib0: 1
ib1: 1

If anything other than "1" is reported, double check the cable connection.

Regards
Gurudatta N.R

Command to find the ILOM Ipaddress from the operating system


1) check ipmitool is installed

rpm -qa | grep ipmitool

ipmitool-1.8.12.4-0.el6.x86_64

If the ipmi rpm is installed you can run the following command

ipmitool lan print


[root@Sukhoi ~]#  ipmitool lan print

Set in Progress         : Set Complete
Auth Type Support       : NONE MD2 MD5 PASSWORD
Auth Type Enable        : Callback : MD2 MD5 PASSWORD
                        : User     : MD2 MD5 PASSWORD
                        : Operator : MD2 MD5 PASSWORD
                        : Admin    : MD2 MD5 PASSWORD
                        : OEM      :
IP Address Source       : Static Address
IP Address              : XX.XX.XX.XX
Subnet Mask             : XXX.XXX.XXX.XX
MAC Address             : XX:XX:XX:XX:XX:XX
SNMP Community String   : public
IP Header               : TTL=0x00 Flags=0x00 Precedence=0x00 TOS=0x00
BMC ARP Control         : ARP Responses Disabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl   : 5.0 seconds
Default Gateway IP      : XX.XX.XX.XX
Default Gateway MAC     : 00:00:00:00:00:00
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 1,2,3
Cipher Suite Priv Max   : XXXXXXXXXXXXXXX
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM

How F20 Modules are connected in X4270 M2 in Exadata.



<- -="" exadata="" nbsp=""><----- ------="" linux="" software=""><-- --="" active="" pcie="" risers=""><--- -----="" aura="" card="" nbsp="">

Exadata s/w  -> linux  -> scsi -> mptsas -------> riser 1 IDT --------> IOC1 (slot 1) ------> 4 FMODS
                                            |                       |
                                            |                        ----> IOC0 (slot 4) ------> 4 FMODS
                                            |
                                              ------> riser 2 IDT --------> IOC3 (slot 2) ------> 4 FMODS
                                                                    |
                                                                      ----> IOC2 (slot 5) ------> 4 FMODS

.

Tuesday, April 10, 2018

Linux Signals


Signal NameNumberDescription  
SIGHUP1Hangup (POSIX)
SIGINT2Terminal interrupt (ANSI)
SIGQUIT3Terminal quit (POSIX)
SIGILL4Illegal instruction (ANSI)
SIGTRAP5Trace trap (POSIX)
SIGIOT6IOT Trap (4.2 BSD)
SIGBUS7BUS error (4.2 BSD)
SIGFPE8Floating point exception (ANSI)
SIGKILL9Kill(can't be caught or ignored) (POSIX)
SIGUSR110User defined signal 1 (POSIX)
SIGSEGV11Invalid memory segment access (ANSI)
SIGUSR212User defined signal 2 (POSIX)
SIGPIPE13Write on a pipe with no reader, Broken pipe (POSIX)
SIGALRM14Alarm clock (POSIX)
SIGTERM15Termination (ANSI)
SIGSTKFLT16Stack fault
SIGCHLD17Child process has stopped or exited, changed (POSIX)
SIGCONT18 Continue executing, if stopped (POSIX)
SIGSTOP19Stop executing(can't be caught or ignored) (POSIX)
SIGTSTP20Terminal stop signal (POSIX)
SIGTTIN21Background process trying to read, from TTY (POSIX)
SIGTTOU22Background process trying to write, to TTY (POSIX)
SIGURG23Urgent condition on socket (4.2 BSD)
SIGXCPU24CPU limit exceeded (4.2 BSD)
SIGXFSZ25File size limit exceeded (4.2 BSD)
SIGVTALRM26Virtual alarm clock (4.2 BSD)
SIGPROF27Profiling alarm clock (4.2 BSD)
SIGWINCH28Window size change (4.3 BSD, Sun)
SIGIO29I/O now possible (4.2 BSD)
SIGPWR30Power failure restart (System V)

Sunday, March 18, 2018

Docker Commands

command to check the full container id

1) docker ps --no-trunc

2) docker run -d --name nginx ( -d is used to run in the background)

3) docker ps -a ( command to check the all docker image command will show all the images not running )

4) docker run -ti --name b2 busybox ( ti means Terminal interactive)

5) ps aux

6) deattach the container

6.1) docker run -ti name b3 busybox

6.2) ps aux; top

CTRL + P + Q detach from the terminal will run from the background

docker attach b3 .

7.0) command to run the command inside the container

docker exec

7.1) docker run -d --name ngnx2 nginx

7.2) docker exec ngnx2 ip a s

7.3) docker exec -ti nginx2 /bin/bash

7.4) ps aux

8.0) docker run --name b4 busybox ip a s will run the container and exit it

8.1) docker ps

9) docker run --name b10 -rm busybox ip a s ( the following command will run the busy box container and removed the container ) used to remove the junk dontainer

9) docker run -rm -u 500:500 busybox ( to find the user id and group id) busybox) container need uid/gid

10) proceed running in the contaier

11) docker top nginx

12) resource usage

13) docker stats nginx

14) stopping and killing container

15 ) docker stop nginx

16) docker start nginx; docker ps, default time to stop the container 10 sec

17) docker stop -t 15 nginx  command to stop the container fter 15 sec.

18 to terminate the running container

docker kill Dockername

19) how to remove the container

19.1) docker rm < Docker name>

19.2) to check the container docker ps -a

19.3)  docker stop ; docker rm -f  docker name < >

19.4) docker rm -v docker name ( remove the docker with persistent data)   be care full

19.5) Container logs

20)

20.1) docker logs < docker name>

20.2) docker logs will be stored in /var/lob docker/container

20.3)  check for the container id

20.4)  go to the directory

20.5)  containerid-Jason.log will hold all the logs.

20.6) Config file are stored in json file.

20.7) docker logs -f


20.8)  docker run -it --name b10 busybox

20.9) Limit memory to container

22) docker run -d --name nginx3 -m 500M nginx

docker stats nginx3

22.1) docker run -d --name nginx4 nginx docker stats  with out memory limit

docker stats nginx4

22.2)  Memory reservation

22.4) docker run -d --name nginx5 -m 512M --memory-reservation 256M nginx

22.5) docker stats nginx5

To check the specific Docker image

1)    Docker search busybox
2)    Official image ( more stars)
3)    Docker search –s 50 busy box ( to search the minimum star)
4)    Docker pull nginx ( pull the latest version)
5)    To pull the specific image
6)    Docker pull nginix:1.9 it will download the 1.9 version nginx
7)    Docker images
8)    Docker pull –a busybox ( to pull all the layers)
9)    Docker images –a will list all the busybox images
10) Removing the images
11) Docker rmi busybox It will remove the latest tag
12) Docker rmi –f busybox ( to remove the container when running ) not best method
13) Create a new image using existing image
14) Docker run –d –name nginx6 nginx
15) Docker exec –ti nginix /bin/bash
16) Aptget update
17) Docker diff nginx 6 list all the changes in the container
18) Docker commit –a “name of the author” –m “A message for the note” docknginix:1


To move to container
1)    Save and export
2)    Docker export nginix6 > nginix.tar ( will have only one layer)
3)    Docker export –o nginx6b.tar nginx6
4)    tar tvf tvf nginx6.tar
5)    how to import the tar archive
6)    docker import nginix6.tar nginx-own:latest
7)    docker images
8)    docker save –o nginix-save.tar nginx:latest
9)    tar tvf nginx-ta.tar | less
10) docker rmi nginx
11) docker load –I nginx-save.tar
12) docker load –I nginix-save.tar
13) command to upload the container to registry
14)    #!/bin/bash
15)    # Delete all containers
16)    docker rm $(docker ps -a -q)
17)    # Delete all images
18)    docker rmi –f  $(docker images -q)
-->.

Tuesday, March 6, 2018

Sunday, February 18, 2018

How to get the serial number of the disk in Linux .

#!/bin/bash
#    NAME
#      getSerial.sh - Get HDD/SDD serial number

echo ""
echo "Device name and Serial Number"
filename="/tmp/devices"
lsblk |grep disk | awk '{print $1}' > $filename
sed -i -e 's/^/\/dev\//' $filename

while read -r device
do
  serial=$(smartctl -i $device |grep Serial)
  printf '%s - %s\n' "$device" "$serial"
done < $filename
# -------------------------------------------------------------------
# EndOfFile
# -------------------------------------------------------------------

.

How to set the System_identifier in Engineered Systems.

At Linux prompt:

ipmitool sunoem cli 'set /SP system_identifier="Exadata Database Machine X3-2 AKXXXXXX”’

OR

In ilom:


set /SP system_identifier="Exadata Database Machine X3-2 AKXXXXXX"

Regards
Gurudatta N.R

Saturday, February 17, 2018

How to check the critical Alert logs in Exadata Cell nodes.

for i in 1 2 3 4 5 6 7
do
ssh root@cell{$i} “cellcli –e list alerthistory |grep –I critical”
done

Thursday, February 15, 2018

Oracle Linux for SPARC

http://www.oracle.com/technetwork/server-storage/linux/downloads/oracle-linux-sparc-3665558.html

Monday, January 15, 2018

How to ping with the time stamp.


ping google.com | while read line; do echo `date` - $line; done

ping sukhoi.in.oracle.com | while read line; do echo `date` - $line; done

Wednesday, December 27, 2017

MegaCli Cheat sheet

Adapter parameter -aN
The parameter -aN (where N is a number starting with zero or the string ALL) specifies the PERC5/i adapter ID. If you have only one controller it’s safe to use ALL instead of a specific ID, but you’re encouraged to use the ID for everything that makes changes to your RAID configuration.
Physical drive parameter -PhysDrv [E:S]
For commands that operate on one or more pysical drives, the -PhysDrv [E:S] parameter is used, where E is the enclosure device ID in which the drive resides and S the slot number (starting with zero). You can get the enclosure device ID using “MegaCli -EncInfo -aALL”. The E:S syntax is also used for specifying the physical drives when creating a new RAID virtual drive.
Virtual drive parameter -Lx
The parameter -Lx is used for specifying the virtual drive (where x is a number starting with zero or the string all).
Controller information
MegaCli -AdpAllInfo -aALL
MegaCli -CfgDsply -aALL
MegaCli -AdpEventLog -GetEvents -f events.log -aALL && cat events.log
Enclosure information
MegaCli -EncInfo -aALL
Virtual drive information
MegaCli -LDInfo -Lall -aALL
Physical drive information
MegaCli -PDList -aALL
MegaCli -PDInfo -PhysDrv [E:S] -aALL
Battery backup information
MegaCli -AdpBbuCmd -aALL
Controller management
Silence active alarm
MegaCli -AdpSetProp AlarmSilence -aALL
Disable alarm
MegaCli -AdpSetProp AlarmDsbl -aALL
Enable alarm

MegaCli -AdpSetProp AlarmEnbl -aALL
Physical drive management

Set state to offline
MegaCli -PDOffline -PhysDrv [E:S] -aN
Set state to online
MegaCli -PDOnline -PhysDrv [E:S] -aN
Mark as missing

MegaCli -PDMarkMissing -PhysDrv [E:S] -aN
Prepare for removal
MegaCli -PdPrpRmv -PhysDrv [E:S] -aN
Replace missing drive

MegaCli -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN
The number N of the array parameter is the Span Reference you get using “MegaCli -CfgDsply -aALL” and the number N of the row parameter is the Physical Disk in that span or array starting with zero (it’s not the physical disk’s slot!).
Rebuild drive
MegaCli -PDRbld -Start -PhysDrv [E:S] -aN
MegaCli -PDRbld -Stop -PhysDrv [E:S] -aN
MegaCli -PDRbld -ShowProg -PhysDrv [E:S] -aN
Clear drive
MegaCli -PDClear -Start -PhysDrv [E:S] -aN
MegaCli -PDClear -Stop -PhysDrv [E:S] -aN
MegaCli -PDClear -ShowProg -PhysDrv [E:S] -aN
Bad to good (or back to good as I like to call it)
MegaCli -PDMakeGood -PhysDrv[E:S] -aN
This changes drive in state Unconfigured-Bad to Unconfigured-Good.
Walkthrough: Change/replace a drive
Set the drive offline, if it is not already offline due to an error
MegaCli -PDOffline -PhysDrv [E:S] -aN
Mark the drive as missing
MegaCli -PDMarkMissing -PhysDrv [E:S] -aN
Prepare drive for removal
MegaCli -PDPrpRmv -PhysDrv [E:S] -aN
Change/replace the drive

If you’re using hot spares then the replaced drive should become your new hot spare drive:
MegaCli -PDHSP -Set -PhysDrv [E:S] -aN
In case you’re not working with hot spares, you must re-add the new drive to your RAID virtual drive and start the rebuilding

MegaCli -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN
MegaCli -PDRbld -Start -PhysDrv [E:S] -aN

Source: Taken from the net. 

Regards
Gurudatta N.R

Saturday, December 23, 2017

Flash Types.

MLC vs. eMLC vs. SLC vs. TLC

There are four types of NAND flash, differing in number of P/E cycles per lifetime, and defined by their construction:
  • SLC -- Single Level Cell: the most expensive, longest lived (high P/E), and generally fastest. Bits are stored only as 2 voltage levels, or a "1" or "0." In SLC less data is stored per cell, so the per unit storage cost is higher.
  • MLC -- Multi-Level Cell: is consumer grade and used in phones, cameras, and USB sticks. The stored charge in MLC may be interpreted as a variety of values, 0 to 3, or 4 possible states, and may store 2 bits. With shorter lifetimes, usually 10x less than SLC, the advantage of this memory is that the cost is 2- 4x less than SLC, but with lower write speeds. MLC typically uses some form of error correction code per block.
  • eMLC -- Enterprise (grade) Multi-Level Cell: is MLC with longer life, usually because of an advanced controller operating the cell and error recovery techniques, construction density, or some combination of the two. 
  • TLC -- Triple Level Cell: championed by Samsung, TLC has higher power and error correction requirements, and higher wear levels. TLC is targeted at environments with predominant read uses, and has not been commonly used. 
Regards
Gurudatta N.R

Wednesday, November 29, 2017

System is giving Panic with ( Vfs_mount issue ) in ZFS,

System is giving Panic with (  Vfs_mount issue ) in ZFS,  Ensure disks associated with rpool holds good.

Please perform the below action plan

boot from ISO or cdrom  ( Solaris 11.2)

zpool import rpool

zpool status ( run scrub if required )

If there is faulty or offline error on any of the OS disk, please detach using "zpool detach rpool "

beadm list

beadm mount /a

bootadm update-archive -R /a -fv (update the archive )

bootadm install-bootloader -v -P rpool

beadm unmount

zpool export rpool

reboot

Also ensure in BIOS you see the right OS disk and you are booting off the same.


Regards
Gurduatta N.R

How to Recover from a System Crash in soaris.

  1. Boot the system from another bootable disk, installation DVD, or over the network.
    • SPARC: If you boot from installation media or an installation server on the network, select the text installation. If you boot from an installation server, use the following command:
      ok boot net:dhcp
    • x86: If you boot from installation media or an installation server on the network, select this text installation option from the GRUB menu:
      Oracle Solaris 11 11/11 Text Installer and command line
    • Select option 3 Shell from the following menu:
              1  Install Oracle Solaris
              2  Install Additional Drivers
              3  Shell
              4  Terminal type (currently sun-color)
              5  Reboot
      
      Please enter a number [1]: 3
      To return to the main menu, exit the shell
  2. Import your ZFS root pool.
    # zpool import -f rpool
  3. Mount the root BE.
    # mkdir /a
    # beadm mount solaris /a
  4. Restore your original fp.conf file (for FC multipathing) or mpt.conf (for SAS multipathing) as follows.
    • If you ran the stmsboot -e command or stmsboot -d command:
      • For SAS multipathing:
        # cp /a/etc/mpxio/mpt.conf /a/etc/driver/drv/mpt.conf
      • For FC multipathing:
        # cp /a/etc/mpxio/fp.conf /a/etc/driver/drv/fp.conf
    • If you ran the stmsboot -u command, and you modified either the fp.conf file or the mpt.conf undo the changes you made to this file by editing either the /a/etc/driver/drv/fp.conf or the /a/etc/driver/drv/mpt.conf files.
  5. Undo any other changes you made to the multipathing configuration prior to running the stmsboot command.For example, if you modified the scsi_vhci.conf file, undo the changes you made to this file by editing the /a/etc/driver/drv/scsi_vhci.conf file.
    If you modified the device settings of your storage arrays, restore their original settings.
  6. Restore your original /etc/vfstab file:
    # cp /a/etc/mpxio/vfstab /a/etc/vfstab
    The /a/etc/mpxio/vfstab file is a copy your original /etc/vfstab file that the stmsboot command saved prior to updating your vfstab file. A /a/etc/mpxio/vfstab file will not exist if the stmsboot command has not modified your vfstab file.
  7. If the system is running on the Oracle Solaris OS on an x86 based system, perform the following steps:
    1. Restore your original /boot/solaris/bootenv.rc file.
      # cp /a/etc/mpxio/bootenv.rc /a/boot/solaris/bootenv.rc
      The /a/etc/mpxio/bootenv.rc file is a copy your original /boot/solaris/bootenv.rc file that the stmsboot command saved prior to updating your bootenv.rc file. A /a/etc/mpxio/bootenv.rc file will not exist if the stmsboot command has not modified your bootenv.rc file.
    2. Update the boot archive.
      # bootadm update-archive -R /a
  8. Disable the mpxio-upgrade service:
    # /usr/sbin/svccfg -f /a/etc/mpxio/svccfg_recover
  9. Unmount the BE.
    # beadm umount solaris
  10. Reboot the system
  11. https://docs.oracle.com/cd/E23824_01/html/E23097/getnl.html#scrolltoc

Saturday, November 25, 2017

How to collect the ILOM snapshot from the  CLI interface.

1. Log in to the ILOM CLI interface.

Example:

# ssh  10.10.10.6
Password:



2. You will see a similar output:
Sun(TM) Integrated Lights Out Manager
Version  3.2.1.20
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

->



3. After the '->' prompt, type the command in below:
-> set /SP/diag/snapshot dataset=normal



Set 'dataset' to 'normal'

4. Type the following command:
-> set /SP/diag/snapshot dump_uri=sftp://user:@/



Examples:
-> set /SP/diag/snapshot dump_uri=sftp://root:password@10.20.30.10/temp

If the password contains special characters then put double quotes around the password
-> set /SP/diag/snapshot dump_uri=sftp://root:"pw with blanks"@10.20.30.10/temp

or use use the related Hex ASCII values
-> set /SP/diag/snapshot dump_uri=sftp://root:pw%20with%20blanks@10.20.30.10/temp



5. Next cd to the snapshot directory and view the status:
-> cd /SP/diag/snapshot
-> show



* Verify that the status shown under properties is 'Running':
Properties:

dataset = normal
dump_uri = (Cannot show property)
encrypt_output = false
** result = Running **