root@solaris:/ # passwd emerson
New Password:
Re-enter new Password:
passwd: System error: no files password for emerson.
Permission denied
In this case there was a problem in the /etc/passwd file. There was a blank line between two users.
Posted by Emerson Takahashi on July 30, 2010
root@solaris:/ # passwd emerson
New Password:
Re-enter new Password:
passwd: System error: no files password for emerson.
Permission denied
In this case there was a problem in the /etc/passwd file. There was a blank line between two users.
Posted by Emerson Takahashi on July 29, 2010
root@solaris:/ # luxadm probe
No Network Array enclosures found in /dev/esFound Fibre Channel device(s):
(Removed to show only the tape devices)
Node WWN:500104f0009429c3 Device Type:Tape device
Logical Path:/dev/rmt/0n
Node WWN:500104f0009429c6 Device Type:Tape device
Logical Path:/dev/rmt/7n
Node WWN:500104f0009429c9 Device Type:Tape device
Logical Path:/dev/rmt/9n
Node WWN:500104f0009429cc Device Type:Tape device
Logical Path:/dev/rmt/11n
This drive showed the status of the tape drive
root@solaris:/ # mt -f /dev/rmt/7n status
HP Ultrium LTO 3 tape drive:
sense key(0×0)= No Additional Sense residual= 0 retries= 0
file no= 0 block no= 0
This drive shows that no tape is loaded or the drive is offline.
root@solaris:/ # mt -f /dev/rmt/9n status
/dev/rmt/9n: no tape loaded or drive offline
Posted by Emerson Takahashi on July 23, 2010
I was having some I/O errors in filesystems below /var
root@solaris:~ # df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 7.7G 4.9G 2.7G 64% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 39G 1.2M 39G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/platform/SUNW,Sun-Fire-T200/lib/libc_psr/libc_psr_hwcap1.so.1
7.7G 4.9G 2.7G 64% /platform/sun4v/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-T200/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
7.7G 4.9G 2.7G 64% /platform/sun4v/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
/dev/md/dsk/d50 15G 2.2G 13G 15% /var
swap 2.0G 2.2M 2.0G 1% /tmp
df: cannot statvfs /var/run: I/O error
/dev/md/dsk/d140 11G 8.9G 2.0G 82% /sites
/dev/md/dsk/d60 7.7G 2.7G 4.9G 37% /opt
/dev/md/dsk/d90 963M 1.0M 904M 1% /logs
/dev/md/dsk/d85 963M 3.3M 902M 1% /home
/dev/md/dsk/d110 963M 730M 175M 81% /u01
df: cannot statvfs /var/mqm: I/O error
df: cannot statvfs /var/crash: I/O error
I was able to enter the directory /var but I was not able to list anything.
root@solaris:~ # cd /var
cd: error retrieving current directory: getcwd: cannot access parent directories: I/O errorroot@solaris:/var # ls -al
.: I/O error
On the console I was seeing the error from makeutx
Jul 22 21:53:41 svc.startd[9669]: makeutx failed, retrying: I/O error
Jul 22 21:53:42 svc.startd[9669]: makeutx failed, retrying: No such file or directory
I decided to umount the filesystem and mount it again and my error disappeared
root@solaris:/root # umount /var
root@solaris:/root # df -h /var
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 7.7G 4.9G 2.7G 64% /
root@solaris:/root # mount /var
root@solaris:/root # df -h /var
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d50 15G 2.2G 13G 15% /var
Posted in Solaris | Tagged: getcwd, ioerror, makeutx, solaris, statvfs | Comments Off
Posted by Emerson Takahashi on July 10, 2010
solaris console login: root
Password:
No utmpx entry. You must exec “login” from the lowest level “shell”.
If you encounter this error, login with a regular user, become root and clear the file /var/adm/wtmpx
root@solaris:/var/adm # ls -l wtmpx
-rw-r–r– 1 adm adm 84505380 Jul 4 08:52 wtmpxroot@solaris:/var/adm # > wtmpx
Posted by Emerson Takahashi on June 28, 2010
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
027user@solaris:~ $ df -k /backup_export
df: cannot canonicalize .: Permission denieduser@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_exportuser@solaris:/ # ls -ld /backup_export
drwxr-xr-x 17 oracle oinstall 1024 Dec 12 15:33 /backup_export
Posted by Emerson Takahashi on June 28, 2010
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…doneAVAILABLE 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,0root@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
Posted in Hardware, Solaris | Tagged: boot, eeprom, obp, solaris, sparc | Comments Off
Posted by Emerson Takahashi on June 3, 2010
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
Posted by Emerson Takahashi on May 17, 2010
Tried to mount a filesystem but the OS requested to run fsck
root@solaris:/ # mount /1a
mount: the state of /dev/md/dsk/d7 is not okay
and it was attempted to be mounted read/write
mount: Please run fsck and try again
To run fsck and try to automatically fix any errors encountered, pass the flag -y
root@solaris:/ # fsck -y /dev/md/dsk/d7
** /dev/md/rdsk/d7
** Last Mounted on /1a
** Phase 1 – Check Blocks and Sizes
** Phase 2 – Check Pathnames
** Phase 3a – Check Connectivity
** Phase 3b – Verify Shadows/ACLs
** Phase 4 – Check Reference Counts
UNREF FILE I=1762708 OWNER=patrol MODE=100644
SIZE=263127 MTIME=Jan 25 15:40 2009
RECONNECT? yesLINK COUNT FILE I=1762708 OWNER=patrol MODE=100644
SIZE=263127 MTIME=Jan 25 15:40 2009 COUNT 0 SHOULD BE 1
ADJUST? yesUNREF FILE I=2376356 OWNER=patrol MODE=10700
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yesUNREF FILE I=2977939 OWNER=spectrum MODE=100600
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yesUNREF FILE I=2977940 OWNER=spectrum MODE=100600
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yesUNREF FILE I=2977941 OWNER=spectrum MODE=100600
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yes** Phase 5 – Check Cylinder Groups
CORRECT BAD CG SUMMARIES FOR CG 34? yes
CORRECTED SUPERBLOCK SUMMARIES FOR CG 34
CORRECTED SUMMARIES FOR CG 34
FILE BITMAP WRONG
FIX? yesFRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 69
CORRECTED SUMMARIES FOR CG 69
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 146
CORRECTED SUMMARIES FOR CG 146
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 147
CORRECTED SUMMARIES FOR CG 147
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 165
CORRECTED SUMMARIES FOR CG 165
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 168
CORRECTED SUMMARIES FOR CG 168
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 175
CORRECTED SUMMARIES FOR CG 175
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 202
CORRECTED SUMMARIES FOR CG 202
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 224
CORRECTED SUMMARIES FOR CG 224
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 233
CORRECTED SUMMARIES FOR CG 233
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 264
CORRECTED SUMMARIES FOR CG 264
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 269
CORRECTED SUMMARIES FOR CG 269
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 275
CORRECTED SUMMARIES FOR CG 275
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 286
CORRECTED SUMMARIES FOR CG 286
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 311
CORRECTED SUMMARIES FOR CG 311
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 316
CORRECTED SUMMARIES FOR CG 316
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 380
CORRECTED SUMMARIES FOR CG 380
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 386
CORRECTED SUMMARIES FOR CG 386
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 388
CORRECTED SUMMARIES FOR CG 388
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 395
CORRECTED SUPERBLOCK SUMMARIES FOR CG 495
CORRECTED SUPERBLOCK SUMMARIES FOR CG 516
CORRECTED SUMMARIES FOR CG 516
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 519
CORRECTED SUMMARIES FOR CG 519
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 539
CORRECTED SUMMARIES FOR CG 539
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 546
CORRECTED SUMMARIES FOR CG 546
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 576
CORRECTED SUMMARIES FOR CG 576
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 578
CORRECTED SUMMARIES FOR CG 578
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 579
CORRECTED SUMMARIES FOR CG 579
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 588
CORRECTED SUMMARIES FOR CG 588
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 631
CORRECTED SUMMARIES FOR CG 631
FRAG BITMAP WRONG (CORRECTED)
CORRECT GLOBAL SUMMARY
SALVAGE? yes90655 files, 5690552 used, 50760198 free (12494 frags, 6343463 blocks, 0.0% fragmentation)
***** FILE SYSTEM WAS MODIFIED *****
Since fsck encountered errors, we pass once again and see if more errors are encountered
root@solaris:/ # fsck -y /dev/md/dsk/d7
** /dev/md/rdsk/d7
** Last Mounted on /1a
** Phase 1 – Check Blocks and Sizes
** Phase 2 – Check Pathnames
** Phase 3a – Check Connectivity
** Phase 3b – Verify Shadows/ACLs
** Phase 4 – Check Reference Counts
** Phase 5 – Check Cylinder Groups
90655 files, 5690552 used, 50760198 free (12494 frags, 6343463 blocks, 0.0% fragmentation)
Since no more errors were encountered, we try to mount the filesystem once again
root@solaris:/ # mount /1a
root@solaris:/ # df -k /1a
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d7 56450750 5690552 50195691 11% /1a