Month: June 2010

Solaris – ls or df error: cannot canonicalize .: Permission denied

On systems that the umask is set to 027, the directory that is created to be used as a mount point appears to have the correct permissions but you can’t get the disk space utilization or list (ls -la) the permissions of the current directory (.) or the level above (..)

user@solaris:~ $ umask
027

user@solaris:~ $ df -k /backup_export
df: cannot canonicalize .: Permission denied

user@solaris:/ # ls -ld /backup_export
drwxr-xr-x 17 oracle oinstall 1024 Dec 12 15:33 /backup_export

You see that with the root user there is no problem to execute the same command you used as a regular user

root@solaris:~ # df -k /backup_export
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dadosdg/vol_bkp
92409856 22803105 65256478 26% /backup_export

To solve this problem, umount the filesystem

root@solaris:/ # umount /backup_export

root@solaris:/ # ls -ld /backup_export
drwxr-x— 2 root root 512 Aug 13 2007 /backup_export

Now you apply the permission to make the directory browsable to regular users. I set the permissions to 777 and mounted the filesystem

root@solaris:/ # chmod 777 /backup_export

root@solaris:/ # mount /backup_export

root@solaris:/ # df -k /backup_export
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dadosdg/vol_bkp
92409856 22803105 65256478 26% /backup_export

The permissions are back to what used to be and now the error message doesn’t appear anymore

user@solaris:~ $ df -k /backup_export
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dadosdg/vol_bkp
92409856 22803105 65256478 26% /backup_export

user@solaris:/ # ls -ld /backup_export
drwxr-xr-x 17 oracle oinstall 1024 Dec 12 15:33 /backup_export

Discovering which drives the server will use to boot in a SPARC machine

Here is how to put more than one device on the variable devalias

root@solaris:/ # eeprom “nvramrc=devalias vx-rootdisk /pci@1c,600000/scsi@2/disk@0,0:a (press <Enter>)
> devalias vx-rootmirr /pci@1c,600000/scsi@2/disk@3,0:a” (press <Enter>)

Put more than one device to boot the system

root@solaris:/# eeprom “boot-device=vx-rootdisk vx-rootmirr”

List all the OpenBoot parameters

root@solaris:/# eeprom
asr-policy=normal
test-args: data not available.
diag-passes=1
local-mac-address?=true
fcode-debug?=false
scsi-initiator-id=7
oem-logo: data not available.
oem-logo?=false
oem-banner: data not available.
oem-banner?=false
ansi-terminal?=true
screen-#columns=80
screen-#rows=34
ttyb-rts-dtr-off=false
ttyb-ignore-cd=true
ttya-rts-dtr-off=false
ttya-ignore-cd=true
ttyb-mode=9600,8,n,1,-
ttya-mode=9600,8,n,1,-
output-device=ttya
input-device=ttya
auto-boot-on-error?=true
error-reset-recovery=sync
load-base=16384
auto-boot?=true
network-boot-arguments: data not available.
boot-command=boot
diag-file: data not available.
diag-device=disk0:a
boot-file: data not available.
boot-device=vx-rootdisk vx-rootmirr
use-nvramrc?=false
nvramrc=devalias vx-rootdisk /pci@1c,600000/scsi@2/disk@0,0:a
devalias vx-rootmirr /pci@1c,600000/scsi@2/disk@3,0:a
security-mode=none
security-password: data not available.
security-#badlogins=0
verbosity=normal
diag-trigger=error-reset power-on-reset
service-mode?=false
diag-script=normal
diag-level=max
diag-switch?=false

Discovering which disk is used when booting

In the case of this server, it is using vx-rootdisk and if it fails, it will use the next one, the vx-rootmirr

root@solaris:/:> eeprom | grep boot-device
boot-device=vx-rootdisk vx-rootmirr

I need to find the hardware address of these two alias

root@solaris:/:> eeprom | grep vx-root
boot-device=vx-rootdisk vx-rootmirr
nvramrc=devalias vx-rootdisk /pci@1c,600000/scsi@2/disk@0,0:a
devlias vx-rootmirr /pci@1c,600000/scsi@2/disk@3,0:a

Now with the hardware address, I invoke the format command and see that this particular system is using disks 2 and 5 to boot.

root@solaris:/:> echo | format
Searching for disks…done

AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN-StorEdge3310-413B cyl 65533 alt 2 hd 64 sec 340>
/pci@1e,600000/scsi@3/sd@0,0
1. c1t1d0 <SUN-StorEdge3310-413B cyl 65533 alt 2 hd 64 sec 340>
/pci@1e,600000/scsi@3/sd@1,0
2. c2t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1c,600000/scsi@2/sd@0,0
3. c2t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1c,600000/scsi@2/sd@1,0
4. c2t2d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@1c,600000/scsi@2/sd@2,0
5. c2t3d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@1c,600000/scsi@2/sd@3,0
Specify disk (enter its number): Specify disk (enter its number):

To create the alias as stated in the beginning of this post, it will be necessary to get the hardware address and replace “sd” for “disk”.
Also Specify which disk slice that holds the root (/) filesystem. The slice 0 is the letter a, the slice 1 is b and so on.

5. c2t3d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@1c,600000/scsi@2/sd@3,0

root@solaris:/:> ls -l /dev/dsk/c2t3d0s0
lrwxrwxrwx   1 root     root          43 Feb 22  2006 /dev/dsk/c2t3d0s0 -> ../../devices/pci@1c,600000/scsi@2/sd@3,0:a

To validate this hardware address use boot and specify it on the OpenBoot prompt

ok> boot /pci@1c,600000/scsi@2/disk@3,0:a

Starting an Oracle database instance

Here is a reference if I need to start an Oracle database instance. It may not be the best way but this is how I done.

I became the user oracle

root@solaris:/ # su – oracle

Exported the variable that sets the instance that I’ll deal with

oracle@solaris:~ $ export ORACLE_SID=testing

Started sqlplus

oracle@solaris:~ $ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 – Production on Fri Jun 18 10:57:30 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected as user sysdba

SQL> connect /as sysdba
Connected to an idle instance.

And finally started the instance

SQL> startup
ORACLE instance started.

Total System Global Area 209747872
bytes

Fixed Size 728992
bytes

Variable Size 167772160
bytes

Database Buffers 40960000
bytes

Redo Buffers 286720

bytes

Database mounted.
Database opened.

Pressed CTRL+D to exit sqlplus

SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 – 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 – Production

You’ll also need to start the Oracle Database Listener

Reattach plex to the volume in Veritas Volume Manager

Some systems have the boot disk encapsulated in Veritas and it is mirrored

root@solaris:/ # vxprint -htg rootdg -v rootvol
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE

v rootvol – ENABLED ACTIVE 14338107 ROUND – root
pl rootvol-01 rootvol ENABLED ACTIVE 14338107 CONCAT – RW
sd rootdisk-B0 rootvol-01 rootdisk 71124290 1 0 c0t0d0 ENA
sd rootdisk-02 rootvol-01 rootdisk 0 14338106 1 c0t0d0 ENA

This volume should have at least two plexes, so there are plexes currently disabled on this disk group.

root@solaris:/ # vxprint -htg rootdg | grep DISABLED
pl local-02 – DISABLED – 6292242 CONCAT – RW
sd rootmirr-09 local-02 rootmirr 51897995 6292242 0 c0t1d0 ENA

pl rootvol-02 – DISABLED – 14338107 CONCAT – RW
sd rootmirr-01 rootvol-02 rootmirr 2888 14338107 0 c0t1d0 ENA

To attach this plex to the volume type the command below

root@solaris:/ # vxplex -g rootdg att rootvol rootvol-02

Veritas will not release the shell until it completes the task. Open another terminal and type vxtask list to check the status

root@solaris:/ # vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
180 ATCOPY/R 60.16% 0/14338107/8626432 PLXATT rootvol 0.0

After it is finished, check the volume again. It should have two plexes like in the example below

root@solaris:/ # vxprint -htg rootdg -v rootvol
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE

v rootvol – ENABLED ACTIVE 14338107 ROUND – root
pl rootvol-01 rootvol ENABLED ACTIVE 14338107 CONCAT – RW
sd rootdisk-B0 rootvol-01 rootdisk 71124290 1 0 c0t0d0 ENA
sd rootdisk-02 rootvol-01 rootdisk 0 14338106 1 c0t0d0 ENA
pl rootvol-02 rootvol ENABLED ACTIVE 14338107 CONCAT – RW
sd rootmirr-01 rootvol-02 rootmirr 2888 14338107 0 c0t1d0 ENA

CA BrightStor ARCserve Backup – User not validated in the authentication server

To check the backup jobs on CA ARCserve Backup you type ca_dbmgr -show jobs

root@aix_lab:/ # /opt/CA/BrightStorARCserve/bin/ca_dbmgr -show jobs

NO. JOB ID JOB NO. JOB TYPE JOB STATUS JOB OWNER START TIME END TIME SET NAME DURATION(hh:mm:ss)COMMENTS

——————————————————————————————————————————————————————————–

——————————————————————-
1 277 99 Backup Cancelled caroot 05/25/10 07:00 05/25/10 19:00 12:00:48 aix_lab

2 278 99 Backup Incomplete caroot 05/26/10 07:00 05/26/10 08:57 01:57:24 aix_lab

3 279 99 Backup Incomplete caroot 05/27/10 07:00 05/27/10 09:08 02:08:42 aix_lab

4 280 99 Backup Incomplete caroot 05/28/10 07:00 05/28/10 09:41 02:41:11 aix_lab

5 281 99 Backup Active caroot 05/29/10 07:00 N/A 125:56:21 aix_lab

6 282 99 Backup Incomplete caroot 06/01/10 07:00 06/01/10 19:10 12:10:34 aix_lab

7 283 99 Backup Cancelled caroot 06/02/10 14:05 06/02/10 17:44 03:38:16 aix_lab

8 285 99 Backup Incomplete caroot 06/02/10 17:49 06/02/10 19:49 02:00:22 aix_lab

9 286 99 Backup Incomplete caroot 06/03/10 07:00 06/03/10 09:34 02:34:13 aix_lab

Check the status using cstatus

root@aix_lab:/ # /opt/CA/BrightStorARCserve/sbin/cstatus

caservd 966798
cadiscovd
cauthd 1233114
caloggerd 1462454
cadbd
camediad 1015990
caqd
staging 618564
cprocess

cacommd 1138824
httpd 741386 893058 897114

dbclean
MergeCat

To stop ARCserve use cstop

root@aix_lab:/ # /opt/CA/BrightStorARCserve/sbin/cstop

Stopping BrightStor ARCserve Backup…

Waiting for BrightStor ARCserve Backup to exit(0)…

BrightStor ARCserve Backup unloaded successfully

BrightStor ARCserve Backup GUI daemons stopped

After you stop, there is no daemon to authenticate your user.

root@aix_lab:/ # /opt/CA/BrightStorARCserve/bin/ca_dbmgr -show jobs
User not validated in the authentication server

root@root@aix_lab:/ # /opt/CA/BrightStorARCserve/sbin/cstatus
caservd
cadiscovd
cauthd
caloggerd
cadbd
camediad
caqd
staging
cprocess

cacommd
httpd

dbclean
MergeCat

Start ARCserve to make it work again

root@aix_lab:/ # /opt/CA/BrightStorARCserve/sbin/cstart

Starting BrightStor ARCserve Backup …

Please wait for all services to start. This may take a few minutes…

BrightStor ARCserve Backup GUI daemons started

Two examples of using dumpadm on Solaris

I run dumpadm and saw that two things needed to be changed. The savecore directory and the dump device.

root@solaris:/ # dumpadm
Dump content: kernel pages
Dump device: /dev/dsk/c0t0d0s1 (dedicated)
Savecore directory: /var/crash/old_hostname
Savecore enabled: yes

To change the savecore directory, use the flag -s and specify the directory that you wish to use when Solaris need to save the crash dump file

root@solaris:/ # dumpadm -s /var/crash/solaris
Dump content: kernel pages
Dump device: /dev/dsk/c0t0d0s1 (dedicated)
Savecore directory: /var/crash/solaris
Savecore enabled: yes

Now, to change the dump device you pass the flag -d and the device to save the crash dump file

root@solaris:/ # dumpadm -d /dev/md/dsk/d1
Dump content: kernel pages
Dump device: /dev/md/dsk/d1 (swap)
Savecore directory: /var/crash/solaris
Savecore enabled: yes