Thursday, August 10, 2017

How to Find timestamp info in ILOM hostconsole log outputs

As you know there can be a lack of date+time info reported in the ILOM hostconsole logs during Linux boot, which can make it difficult to know what info in the console log may be usefully current or irrelevantly old for the system problem you are investigating, for comparing to System Event Log time stamps, other OS logs etc.

The 'audit()' entries that are reported when linux boots contain epoch timestamps which we can convert to human-readable date+time.


EG hostconsole.log will show linux reported audit events during boot:
   ...
   type=2000 audit(1436937809.284:1): initialized
   type=1404 audit(1436937824.874:2): selinux=0
   type=1300 audit(1436937824.874:2): arch=c000003e
   ...

We can use the unix 'date' command to convert "audit(1436937809.284:1)" to a more useful format:

   # date --date="@1436937809"
   Wed Jul 15 06:23:29 BST 2015

Or you can use the Epoch converter tool at:
http://www.epochconverter.com/


Note that the audit() epoch times use the local system's timezone, so take that into account when converting eg
   # TZ="BST" date --date ...


Source : Friend


Regards
Gurudatta N.R

Friday, July 28, 2017

How to reset the ILOM root password back to the default ‘changeme’ using ipmitool


How to reset the ILOM root password back to the default ‘changeme’ using ipmitool

If the root password on the ILOM is currently unknown,  you can change the ILOM password back to the default “changeme”.


# /usr/sbin/ipmitool user set password 0x02 changeme

you can also use the raw format:

# /usr/sbin/ipmitool raw 0x06 0x47 0x02 0x02 0x63 0x68 0x61 0x6e 0x67 0x65 0x6d 0x65 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

Later you can change as per your org  standard

-> set /SP/users/root password
Enter new password: ********
Enter new password again: ********
try login with your new root password

Regards
Gurudatta N.R

Supported Operating system in Oracle X86 Systems.

https://community.oracle.com/docs/DOC-915378

How to recover the mistakenly deleted/destroyed Zpool.

How to recover the mistakenly deleted/destroyed Zpool.

root@sukhoi:/# zpool destroy fighter =========> mistakenly deleted/destroyed Zpool

To recover the destroyed pool, run the zpool import -D command  with the pool to be recovered



root@sukhoi:/# zpool import -D fighter

root@sukhoi:/# zpool status
  pool: fighter
 state: ONLINE
  scan: resilvered 1K in 1s with 0 errors on Tue Jul 25 21:47:54 2017

config:

        NAME        STATE     READ WRITE CKSUM
        fighter     ONLINE       0     0     0
          raidz2-0  ONLINE       0     0     0
            c4t0d0  ONLINE       0     0     0
            c4t1d0  ONLINE       0     0     0
            c4t2d0  ONLINE       0     0     0
            c4t3d0  ONLINE       0     0     0
            c4t4d0  ONLINE       0     0     0
            c4t5d0  ONLINE       0     0     0
            c4t6d0  ONLINE       0     0     0
          c4t7d0    ONLINE       0     0     0

errors: No known data errors

If one of the devices in the destroyed pool is faulted or unavailable, you might be able to recover the destroyed pool anyway by including the -f option. In this scenario, you would import the degraded pool and then attempt to fix the device failure

Regards
Gurudatta N.R

.

Friday, July 21, 2017

Monday, July 10, 2017

How to update the Aspen HBA firmware in Linux.

1) Download the storecli RPM from the following site http://dl.marmotte.net/rpms/redhat/el6/x86_64/storcli-1.16.06-2/
2) Download the HBA firmware from the Aspen/Vendor site.  MR_6.3.8.4_24.3.0-0084.rom
3) Ensure there is no issue with the RAID, if the disk is part of the HW raid/

Then run issue the following command .   

[root@sukhoisbin]#

storcli /c0 download file=/tmp/MR_6.3.8.4_24.3.0-0084.rom
Download Completed.
Flashing image to adapter...
Controller = 0
Status = Success
Description = F/W Flash Completed. Please reboot the system for the changes to take effect

Current package version = 24.3.0-0063
New package version = 24.3.0-0084

Regards
Gurudatta N.R

Sunday, June 18, 2017

How to fix “FAIL TO LOAD SELINUX POLICY. FREEZING.” ERROR MESSAGE WHILE BOOTING OEL 7.0

Issue reported: You’ve entered a wrong value to the /etc/selinux/config file. After booting the machine, you’re getting
111814_1303_overcomefai1.png

Your System cannot be booted 

Work around : on the boot menu, edit the boot configuration and add “selinux=0” to the boot command. In Redhat, it can be done in the following way:


111814_1303_overcomefai3.png

Go to the main command (usually starting with “linux16” or something similar) and add “selinux=0” as one of the parameters:

111814_1303_overcomefai4.png


by pressing CTRL-X on this case and your machine will boot as usual

Friday, April 14, 2017

How to verify the IB cards installed in super Cluster.



# prtdiag | egrep "/PCI-EM.+673c" | awk '{print $1, $2, $4}'
/SYS/PCI-EM1 PCIE
/SYS/PCI-EM9 PCIE

Should show an IB card at locations EM1, EM7, EM9, and EM12.

# cfgadm -v | grep -i ib

unavailable  IB-HCA       n        /devices/ib:21280001EF2DFA
unavailable  IB-HCA       n        /devices/ib:21280001EF2EE2
ib                             connected    configured   ok         InfiniBand Fabric
unavailable  IB-Fabric    n        /devices/ib:fabric


Regards
Gurudatta N.R

Monday, February 27, 2017

Saturday, February 11, 2017

Diffrence between ext3 and ext4


Features
Ext3
Ext4
Filesystem limit
16TB
1EB (1 EB = 1024 PB, 1 PB = 1024 TB)
File limit
2TB
16TB
Default inode size
128 bytes
256 bytes
Block Mapping
Indirect
Extent
Time Stamp
Second
Nanosecond
Sub Directory Limit
32,768
Unlimited
Preallocation
In-core reservation
For extent file
Defragmentation
No
Yes
Directory Indexing
Disabled
Enabled
Delayed Allocation 
No
Yes
Multiple Block Allocation
Basic
Advanced


Source: Net

Regards
Gurudatta N.R

Thursday, January 12, 2017

UFS to ZFS conversion

bash-3.2# uname -a
SunOS Sukhoi 5.10 Generic_147440-01 sun4u sparc SUNW,Sun-Fire-480R

bash-3.2# zpool create rpool c1t1d0s0
invalid vdev specification
use '-f' to override the following errors:
/dev/dsk/c1t1d0s0 is part of exported or potentially active ZFS pool rpool. Please see zpool(1M).

bash-3.2# zpool create -f rpool c1t1d0s0
bash-3.2# zfs list
NAME    USED  AVAIL  REFER  MOUNTPOINT
rpool  77.5K  32.7G    31K  /rpool

bash-3.2# lustatus
ERROR: No boot environments are configured on this system
ERROR: cannot determine list of all boot environment names

bash-3.2# lucreate -c sol_stage1 -n sol_stage2 -p rpool
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named .
Creating initial configuration for primary boot environment .
INFORMATION: No BEs are configured on this system.
The device

is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name PBE Boot Device .
Updating boot environment description database on all BEs.
Updating system configuration files.
The device is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment .
Source boot environment is .
Creating file systems on boot environment .
Creating file system for </> in zone on .
Populating file systems on boot environment .
Analyzing zones.
Mounting ABE .
Generating file list.
Copying data from PBE to ABE .
 22% of filenames transferred

100% of filenames transferred
Finalizing ABE.
Fixing zonepaths in ABE.
Unmounting ABE .
Fixing properties on ZFS datasets in ABE.
Reverting state of zones in PBE .
Making boot environment bootable.
Creating boot_archive for /.alt.tmp.b-Vqf.mnt
updating /.alt.tmp.b-Vqf.mnt/platform/sun4u/boot_archive
Population of boot environment successful.
Creation of boot environment successful.

bash-3.2# lustatus

Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
sol_stage1                 yes      yes    yes       no     -
sol_stage2                 yes      no     no        yes    -

bash-3.2# luactivate sol_stage2

**********************************************************************

The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.

**********************************************************************

In case of a failure while booting to the target BE, the following process
needs to be followed to fallback to the currently working boot environment:

1. Enter the PROM monitor (ok prompt).

2. Change the boot device back to the original boot environment by typing:

     setenv boot-device
/pci@9,600000/SUNW,qlc@2/fp@0,0/disk@w21000004cffb7f68,0:a

3. Boot to the original boot environment by typing:

     boot

**********************************************************************

Modifying boot archive service
Activation of boot environment successful.

Reboot the server with  init 6 to boot from new boot environment.

bash-3.2# lustatus
 
Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
sol_stage1                 yes      no     no        yes    -
sol_stage2                 yes      yes    yes       no     -


bash-3.2# zfs list
NAME                    USED  AVAIL  REFER  MOUNTPOINT
rpool                  6.90G  25.8G  33.5K  /rpool
rpool/ROOT             4.38G  25.8G    31K  legacy
rpool/ROOT/sol_stage2  4.38G  25.8G  4.38G  /
rpool/dump             2.00G  25.8G  2.00G  -
rpool/swap              529M  26.4G    16K  -


bash-3.2# ludelete -f sol_stage1
Updating boot environment configuration database.
Updating boot environment description database on all BEs.
Updating all boot environment configuration databases.

deleted old boot environment disk for rpool mirroring


bash-3.2# lustatus
Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
sol_stage2                 yes      yes    yes       no     -


bash-3.2# zpool status
  pool: rpool
 state: ONLINE
 scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c1t1d0s0  ONLINE       0     0     0

errors: No known data errors


bash-3.2# ! format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0
          /pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cffb7f68,0
       1. c1t1d0
          /pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cffb7da9,0
Specify disk (enter its number):


bash-3.2# prtvtoc /dev/rdsk/c1t1d0s2 |fmthard -s - /dev/rdsk/c1t0d0s2
fmthard:  New volume table of contents now in place.

bash-3.2# zpool attach rpool c1t1d0s0 c1t0d0s0
invalid vdev specification
use '-f' to override the following errors:
/dev/dsk/c1t0d0s0 contains a ufs filesystem.
bash-3.2# zpool attach -f rpool c1t1d0s0 c1t0d0s0

Make sure to wait until resilver is done before rebooting.


bash-3.2# zpool status
  pool: rpool
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scan: resilver in progress since Thu Jan 12 05:20:44 2017
    1.31G scanned out of 6.38G at 36.4M/s, 0h2m to go
    1.31G scanned out of 6.38G at 36.4M/s, 0h2m to go
    1.31G resilvered, 20.59% done
config:

        NAME          STATE     READ WRITE CKSUM
        rpool         ONLINE       0     0     0
          mirror-0    ONLINE       0     0     0
            c1t1d0s0  ONLINE       0     0     0
            c1t0d0s0  ONLINE       0     0     0  (resilvering)

errors: No known data errors

bash-3.2# zpool status
  pool: rpool
 state: ONLINE
 scan: resilvered 6.38G in 0h5m with 0 errors on Thu Jan 12 05:25:59 2017
config:

        NAME          STATE     READ WRITE CKSUM
        rpool         ONLINE       0     0     0
          mirror-0    ONLINE       0     0     0
            c1t1d0s0  ONLINE       0     0     0
            c1t0d0s0  ONLINE       0     0     0

errors: No known data errors


Regards
Gurudatta N.R


How to Label Multiple Disks by Using the prtvtoc and fmthard Commands.

Labeling Multiple Disks by Using the prtvtoc and fmthard Commands

Use the prtvtoc and fmthard commands to label multiple disks with the same disk geometry.

Use the following for loop in a script to copy a disk label from one disk and replicate it on multiple disks.

# for i in x y z
> do
> prtvtoc /dev/rdsk/cwtxdysz | fmthard -s - /dev/rdsk/cwt${i}d0s2
> done

Example 11–9 Labeling Multiple Disks

In this example, the disk label from c2t0d0s0 is copied to four other disks.

# for i in 1 2 3 5
> do
> prtvtoc /dev/rdsk/c2t0d0s0 | fmthard -s - /dev/rdsk/c2t${i}d0s2
> done
fmthard:  New volume table of contents now in place.
fmthard:  New volume table of contents now in place.
fmthard:  New volume table of contents now in place.
fmthard:  New volume table of contents now in place.

Regards
Gurudatta N.R

Wednesday, December 28, 2016

Friday, October 14, 2016

Linux Signals

SignalNameDescription
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)
SIGCONTv 18 Continue executing, if stopped (POSIX)
SIGSTOP19 Stop executing(can't be caught or ignored) (POSIX)
SIGTSTP20Terminal stop signal (POSIX)
SIGTTIN21Background process trying to read, from TTY (POSIX)
SIGTTOU22 Background process trying to write, to TTY (POSIX)
SIGURG23 Urgent 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)

What is dig ?


We use the dig (domain information groper) command to query Domain Name System (DNS) name servers.
When we pass a domain name to the dig command, by default, it displays the A record (the ip-address of the site that is queried) as shown below:
Gurudattas-MBP:~ gnadig$ dig google.com

; <<>> DiG 9.8.3-P1 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- 13916="" id:="" noerror="" opcode:="" query="" span="" status:="">
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com. IN A

;; ANSWER SECTION:
google.com. 54 IN A 74.125.200.138
google.com. 54 IN A 74.125.200.100
google.com. 54 IN A 74.125.200.101
google.com. 54 IN A 74.125.200.139
google.com. 54 IN A 74.125.200.102
google.com. 54 IN A 74.125.200.113

;; Query time: 5 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Fri Oct 14 15:51:42 2016
;; MSG SIZE  rcvd: 124


Regards
Gurudatta N.R

Thursday, October 13, 2016

Identifying a Hard Disk Using hdparm in linux

# hdparm -I /dev/sd?|grep -E "Number|/dev"
/dev/sda:
        Model Number:       HDS722516VLSA80                         
        Serial Number:      VN6D3ECDD7RG1D
/dev/sdb:
        Model Number:       WDC WD740GD-00FLA1                      
        Serial Number:      WD-WMAKE1690676
/dev/sdc:
        Model Number:       HDS722525VLSA80                         
        Serial Number:      VN6J3ECFEALJRD
/dev/sdd:
        Model Number:       HDS722525VLSA80                         
        Serial Number:      VN6J3ECFEBSR1D
 
Source Net 
 
Regards
Gurudatta N.R