10.29.09

Solaris: obtaining kernel patch date

Posted in Solaris at 10:04 am by alessiodini

Obtaining kernel patch release date without sunsolve is possible!
On running system i can run these commands:

grep Date /var/sadm/patch/`uname -v | cut -f2 -d’_’ `/README.*|awk ‘{print $2}’

Example:

# grep Date /var/sadm/patch/`uname -v | cut -f2 -d’_’ `/README.*|awk ‘{print $2}’
Jun/08/2005

Today i upgrade this system :)

09.23.09

[ID 185465 local7.error] No action on DBMS Error DBMS_ERROR : 28000

Posted in Sun Cluster at 1:34 pm by alessiodini

I worked today on Oracle resource ( Sun Cluster 3.2 ) with a monitor problem.
From messages i obtained the follow error:

SC[SUNWscor.oracle_server.monitor]:oracle-rg:ora-res: [ID 185465 local7.error] No action on DBMS Error DBMS_ERROR : 28000

I looked on internet but i didn’t found anything.

The resource was SUNW.oracle_server:6
After increased “Debug_level” property i have seen under /var/opt/SUNWscor/oracle_server the file message_log.ora-res with this error:

[...]
Sep 23 15:08:36 CHILD: Connecting to ORACLE as user: orareg/orareg
Sep 23 15:08:36 CHILD: connect: SQL error: -28000: ORA-28000: the account is locked
[...]

the monitor’s account was locked!

09.15.09

Live Upgrade: Template entry -:/dev/dsk/c0t2d0s1:swap skipped.

Posted in Solaris at 9:46 am by alessiodini

I encountered this error during a live upgrade activity.
After running lucreate command i had this error:

Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
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 .
The device is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name PBE Boot Device .
Comparing source boot environment file systems with the file
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices

Template entry -:/dev/dsk/c0t2d0s1:swap skipped.

luconfig: ERROR: Template filesystem definition failed for -, all devices are not applicable..
ERROR: Configuration of boot environment failed.

During my analsyis i found that c0t2d0s1 doesn’t have tag “swap” but “unassigned”.
I changed in swap , obtaining from format:

[...]
1 swap wu 5141 – 6683 3.00GB (1543/0/0) 6295440
[...]

I tried to run lucreate and all was fine!!!

09.14.09

Solaris 10: creation of flash archive

Posted in Solaris at 4:36 pm by alessiodini

On this system i must create a flash archive for backup.
Creating a flar is simple , in this case i use flarcreate command as follow:

flarcreate -n soapbo01fs_archive -c -x /mnt1 -S /mnt1/flar_soapbo01fs

where:
-n soapbo01fs_archive = the name of Flash archive
-c = the archive is compressed
-x /mnt1 = excludes /mnt1 ( in this case i use this directory as location of archive )
-S = do not include size information ( without this the creation of archive is quickly )
/mnt1/flar_soapbo01fs = the location where the archive is created

So:

# flarcreate -n soapbo01fs_archive -c -x /mnt1 -S /mnt1/flar_soapbo01fs
Full Flash
Checking integrity…
Integrity OK.
Running precreation scripts…
Precreation scripts done.
Creating the archive…
12023253 blocks
Archive creation complete.
Running postcreation scripts…
Postcreation scripts done.

Running pre-exit scripts…
Pre-exit scripts done.

09.07.09

zoneadm: could not get brand name: Wrong document type

Posted in Solaris at 3:20 pm by alessiodini

Today on a Solaris 10 system ( global zone ) i discovered this error:

#zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
[...]
zoneadm: local13: could not get brand name: Wrong document type
[...]

What’s happend here!?!
It can be a problem related to the syntax of /etc/zones/local13.xml file or /etc/zones/index
In this case /etc/zones/local13.xml was missing… i don’t know why

08.25.09

Ordering files size in du -sh output

Posted in Solaris at 8:40 am by alessiodini

When i run du -sh command i can see every file size , but if i want obtain a ordered list?
With these commands i can accomplish this:

[root@server]#pwd
/var

[root@server]# \du -sh * | tee /tmp/prova.txt | grep G | sort -rn ; cat /tmp/prova.txt | grep M | sort -rn ; cat /tmp/prova.txt | grep K | sort -rn ; rm /tmp/prova.txt
1.2G spool
1.1G sadm
239M apache2
139M opt
45M smop
38M tmp
[...]
983K cron
937K lib
552K lp
162K cache
153K ldap
131K snmp
128K run
74K preserve
[...]

GOOD!!!

07.02.09

java installation error: The download file appears to be corrupted

Posted in Solaris at 11:28 am by alessiodini

I’m updating java on a solaris system and when i run the .sh script i obtain the following error:

The download file appears to be corrupted. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.

This error is caused because i upload the file in ascii mode , not binary!!

06.18.09

How see free and used inode on Solaris 10

Posted in Solaris at 3:43 pm by alessiodini

Today a developer asks to me and Emanuel where is possible obtain the allocation of inodes on mounted filesystem under Solaris 10.

We found that for this purpose the df command can be used , as follow:

root@sb13 # df -F ufs -o i /
Filesystem iused ifree %iused Mounted on
/dev/dsk/c16t6d0s0
199587 1664093 11% /

06.16.09

How see if Solaris 10 system is local zone or global zone

Posted in Solaris at 3:19 pm by alessiodini

I’m connected to a system and i want see if this system is a global or local zone.
What can i do?

For this purpose i can use the zonename command as follow:

root@ssb30 # zonename
global
root@ssb30 #

in this case ssb30 is a global zone

root@ssc10 # zonename
ssc10
root@ssc10 #

in this case ssc10 is a local zone
very simple!

05.25.09

mount: not a UFS magic number (0×0)

Posted in Solaris at 2:31 pm by alessiodini

I obtained this errore because i tried to mount a ufs filesystem when the volume was vxfs!

root@gri2 # mount /dev/vx/dsk/zonepath_gri2_DG/zonepath_gri2_vol01 /zone/gri2
May 25 16:23:10 gri2 ufs: NOTICE: mount: not a UFS magic number (0×0)
mount: /dev/vx/dsk/zonepath_gri2_DG/zonepath_gri2_vol01 is not this fstype

I didn’t know that the volume was vxfs , i verified with:

root@gri2 # fstyp /dev/vx/dsk/zonepath_gri2_DG/zonepath_gri2_vol01
vxfs

So , i mounted the filesystem with vxfs option:

mount -F vxfs /dev/vx/dsk/zonepath_gri2_DG/zonepath_gri2_vol01 /zone/gri2
root@gri2 #

Next page