Archive for category solaris

Fix disabled dmp path

root # /etc/vx/bin/vxdisksetup -i EMC0_146
VxVM vxdisksetup ERROR V-5-2-3628 The dmpnode EMC0_146 is disabled.Can not
proceed with vxdisksetup.

root # vxdisk list EMC0_146
Device: EMC0_146
devicetag: EMC0_146
type: auto
flags: online error private autoconfig
errno: Device path not valid
Multipathing information:
numpaths: 2
c5t5006048449AE7F48d149s2 state=disabled
c6t5006048C49AE7F77d149s2 state=disabled

Read the rest of this entry »

,

No Comments

solaris: how to recover solaris 11 root password

boot net -s
boot cdrom -s, if it ask username: root/solaris or root/password.

on x86, you need edit grub and append -s on kernel line.

after login. mount /dev/dsk/cxtxdxsx /a

if you use zfs for /, then zfs import
zfs list
zfs set mountpoint=/a rpool/ROOT/solaris
zfs mount -f rpool/ROOT/solaris
then edit /etc/shadow
remove the password section, let it looks likes.
root::15356::::::

don’t forget to reset the mountpoint back
zfs set mountpoint=/ rpool/ROOT/solaris

reboot.

No Comments

how to fix ‘who -r’ shows nothing

OS: Solaris 9.
Issue: who -r won’t give you the running level. so the pkgadd won’t work.
myhost1:~ root # who -r # shows no output

Solution:
check the /var/adm/utmpx, maybe the file has been corrupted
myhost1:~ root # cd /var/adm
myhost1:adm root # vi u1.log
# paste the following content.
system boot 0 2 0000 0000 1315335814 0 0 0 Tue Sep 6 20:03:34 2011
run-level 3 0 1 0063 0123 1315335839 0 0 0 Tue Sep 6 20:03:59 2011
rc2 s2 1262 8 0000 0000 1315335885 0 0 0 Tue Sep 6 20:04:45 2011
rc3 s3 3938 8 0000 0000 1315335915 0 0 0 Tue Sep 6 20:05:15 2011
Read the rest of this entry »

,

No Comments

Install Lftp on Solaris 9 manually

Yeah, there is pkg-get way.
If you don’t have pkg-get, you can follow the steps.

wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/9/lftp-4.0.10-sol9-sparc-local.gz
wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/9/readline-5.2-sol9-sparc-local.gz
wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/9/libgcrypt-1.4.6-sol9-sparc-local.gz
Read the rest of this entry »

No Comments

/var/adm/wtmpx too big

How to safely clean the /var/adm/wtmpx

Solution 1 (clean everything):
# cd /var/adm
# gzip -c wtmpx > wtmpx.backup.gz
# > wtmpx

Solution 2(keep last 1000 logs):
# cd /var/adm
# /usr/lib/acct/fwtmp < wtmpx | tail -1000 > wtmpx.ascii
# /usr/lib/acct/fwtmp -ic < wtmpx.ascii > wtmpx
# rm wtmpx.ascii
The commands makes convert info from binary to ascii from wtmpx, save last 1000 lines into wtmpx.ascii file, convert the info in wtmpx.ascii to binary again, and save it into wtmpx. Finally no-needed wtmpx.ascii is removed.

No Comments

Solaris: Boot archive error or corrupt

Boot archive error or corrupt

A few weeks ago, I got a little problem with my solaris box, namely solaris won’t boot because the boot archive was corrupt, *sigh*. Anyway the boot archive in solaris 10 was contain kernel module and configuration file was needed for solaris to startup the system.

Error:

module /platform/i86pc/boot_archive error 3 bad or corrupt data while decompressing file

Workaround:

Boot up your solaris in “solaris failsafe mode”, next solaris image will mount with writeable mode on “/a” mount point

rm -f /a/platform/i86pc/boot_archive
bootadm update-archive -R /a
reboot

,

No Comments

Solaris: get global zone name from non-global zone

run the netstat -p from non-global zone, get the ip information.
check the ip. one of the ip should be global zone’s ip.

there is any commands to check ? No.
so we’d better keep a good record, like motd. or cmdb.

,

No Comments

Solaris Patching

Busy with Solaris patching these days. some servers didn’t reboot/patch for more than 3 years.

Some tips:
1. “ERROR: LSI1030: timeout waiting for interrupt status.
ERROR: LSI1030 MPT Firmware, receive-message: issue-port-enable failed.”

Possible Answers:
1st:
{3} ok setenv auto-boot? false
{3} ok reset-all
{3} ok probe-scsi-all
sc>reset -y
Read the rest of this entry »

1 Comment

contain holes – can’t swap on it.

root@home# mkfile 512m /var/swapfile
root@home# swap -a /var/swapfile
“/var/swapfile” may contain holes – can’t swap on it.

the above is ok for UFS, but not work in ZFS.

Solution:
root@home# zfs create -V 1gb rpool/swapfile
root@home# swap -a /dev/zvol/dsk/rpool/swapfile

Good articles on Swap

http://blogs.sun.com/jimlaurent/entry/solaris_faq_myths_and_facts

,

No Comments

mount: /mnt/nfs: Not owner

nfs mount: mount: /mnt/nfs: Not owner

When you get this error from a Solaris Host, because you are trying to mount an nfsV3 share with an nfsV4 client.

This occurs when you want to share an nfs from a linux host to a solaris host.

Just use the option vers=3 to avoid this problem or configure nfsV4 on the linux host.

mount -o vers=3 linux_nfs_01:/htdocs /htdocs

,

No Comments