Archive

Archive for the ‘Solaris Admin’ Category

Enable VNC Server on Solaris 10

May 21, 2014 Leave a comment

1. Add entry below intop /etc/services

vnc-server      5900/tcp                        # Xvnc

2. Create /etc/X11/gdm/custom.conf with entries below

xdmcp]
Enable=true
[security]
DisallowTCP=false
AllowRoot=true
AllowRemoteRoot=true

3. Enable the svc

# svcadm enable svc:/application/x11/xvnc-inetd:default
# svcs  xvnc-inetd
STATE          STIME    FMRI
online         14:41:27 svc:/application/x11/xvnc-inetd:default

 

Advertisements
Categories: Solaris Admin

Cannot label disk when partitions are in use as described.

October 9, 2013 Leave a comment

Today, I did the repartition on a Solaris Server internal hard disk by the command format. When I labelled the disks, it returned the following error messages. I was sure that the disk was mounted on the system.

Enter partition id tag[root]:
Enter partition permission flags[wm]:
Enter new starting cyl[413]: 0c
`0c’ is not an integer.
Enter new starting cyl[413]:
Enter partition size[8395200b, 825c, 1237e, 4099.22mb, 4.00gb]: 0c
partition> l
Cannot label disk when partitions are in use as described.

Solution: Set NOINUSE_CHECK=1 to enable Not in use on. The following was procedures.

# NOINUSE_CHECK=1
# export NOINUSE_CHECK

Enter partition id tag[root]:
Enter partition permission flags[wm]:
Enter new starting cyl[413]:
Enter partition size[8395200b, 825c, 1237e, 4099.22mb, 4.00gb]: -c
Please specify units in either b(blocks), c(cylinders), e(end cylinder),
m(megabytes) or g(gigabytes)
Enter partition size[8395200b, 825c, 1237e, 4099.22mb, 4.00gb]: 0c
partition> l
Ready to label disk, continue? y

 

 

Categories: Solaris Admin

svc.startd[7]: svc:/system/filesystem/root:default: Method “/lib/svc/method/fs-root” failed with exit status 1

August 2, 2013 Leave a comment

Today, I recovered a Solaris server from netbackup server. When restarting the server, the console showed the following messages

SunOS Release 5.10 Version Generic_142909-17 64-bit
Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved.
WARNING: Cannot find /etc/mnttab

Aug  2 17:59:07 svc.startd[7]: svc:/system/filesystem/root:default: Method “/lib/svc/method/fs-root” failed with exit status 1.
Aug  2 17:59:08 svc.startd[7]: svc:/system/filesystem/root:default: Method “/lib/svc/method/fs-root” failed with exit status 1.
Aug  2 17:59:08 svc.startd[7]: svc:/system/filesystem/root:default: Method “/lib/svc/method/fs-root” failed with exit status 1.
Aug  2 17:59:08 svc.startd[7]: system/filesystem/root:default failed: transitioned to maintenance (see ‘svcs -xv’ for details)
Hostname: yckeunisz01
Aug  2 17:59:16 svc.startd[7]: svc:/network/iscsi/initiator:default: Method “/lib/svc/method/iscsid start” failed with exit status 1.
Aug  2 17:59:17 svc.startd[7]: svc:/network/iscsi/initiator:default: Method “/lib/svc/method/iscsid start” failed with exit status 1.
Aug  2 17:59:17 svc.startd[7]: svc:/network/iscsi/initiator:default: Method “/lib/svc/method/iscsid start” failed with exit status 1.
Aug  2 17:59:17 svc.startd[7]: network/iscsi/initiator:default failed: transitioned to maintenance (see ‘svcs -xv’ for details)
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
Console login service(s) cannot run

Root password for system maintenance (control-d to bypass):  <– Enter the root password to bypass
single-user privilege assigned to /dev/console.

After the bypass, to run ‘svcs -xv’ to get more details, the following messages listed

svc:/system/filesystem/root:default (root file system mount)
 State: maintenance since Fri Aug 02 17:59:08 2013
Reason: Start method failed repeatedly, last exited with status 1.
   See: http://sun.com/msg/SMF-8000-KS
   See: /etc/svc/volatile/system-filesystem-root:default.log

Checked the file /etc/svc/volatile/system-filesystem-root:default.log, the log showed that /etc/mnttab can not be opened

[ Aug  2 17:59:07 Enabled. ]
[ Aug  2 17:59:07 Executing start method (“/lib/svc/method/fs-root”) ]
/lib/svc/method/fs-root: /etc/mnttab: cannot open
[ Aug  2 17:59:07 Method “start” exited with status 1 ]
[ Aug  2 17:59:08 Executing start method (“/lib/svc/method/fs-root”) ]
/lib/svc/method/fs-root: /etc/mnttab: cannot open
[ Aug  2 17:59:08 Method “start” exited with status 1 ]

Solution

Finally, boot the server with CDROM, mount the root partition of the disk and created the /etc/mnttab as the following.

touch /mnt/etc/mnttab
chmod 444 /mnt/etc/mnttab
Reboot, the server was up.
 
 

lofiadm: size of xxx.iso is not a multiple of 512

August 24, 2012 Leave a comment

Solution

# dd if=xxx.iso of=new.iso obs=512 conv=sync
1264889+1 records in
1264890+0 records out
# lofiadm -a /new.iso
/dev/lofi/1
# mount -F hsfs -o ro /dev/lofi/1 /mnt
# cd /mnt

Categories: Solaris Admin

VxVM vxdisksetup ERROR V-5-2-2480 Disk is too small for supplied parameters

June 17, 2011 Leave a comment

Today, I added new disks, get the error messages as following

1. Create /devices entries by OS command

# devfsadm -c disk

2. Initiate the disks, and get the following errors

wvprp06# ./vxdisksetup -ie c3t18d30
./vxdisksetup: test: argument expected
wvprp06# ./vxdisksetup -ie c3t18d30 format=sliced
./vxdisksetup: test: argument expected
wvprp06# ./vxdisksetup -ie c3t18d30 format=simple
./vxdisksetup: test: argument expected
wvprp06#  ./vxdisksetup -ie c3t18d30 format=cdsdisk
VxVM vxdisksetup ERROR V-5-2-1529 The -e flag is incompatible with the cdsdisk format.
wvprp06#  ./vxdisksetup -i  c3t18d30 format=cdsdisk
VxVM vxdisksetup ERROR V-5-2-2480 Disk is too small for supplied parameters
wvprp06# format

Solution

1. Then, I check the disk status, it showed the multi-pathing is invalid

wvprp06# hagrp -switch REP_GROUP   -to wvprp06
wvprp06# vxdisk list c3t18d30
Device:    c3t18d30s2
devicetag: c3t18d30
type:      auto
flags:     online error private autoconfig
pubpaths:  block=/dev/vx/dmp/c3t18d30s2 char=/dev/vx/rdmp/c3t18d30s2
guid:      –
udid:      FUJITSU%5FETERNUS%5FDXL%5F0210AD%5F0020
site:      –
errno:     Device path not valid <– the multi-pathing is invalid
Multipathing information:
numpaths:   1
c3t18d30s2      state=enabled

 

2. Re-enable vxdctl, the problem was fixed

wvprp06# vxdctl enable
wvprp06# vxdisk list c3t18d30
Device:    c3t18d30
devicetag: c3t18d30
type:      auto
info:      format=none
flags:     online ready private autoconfig invalid
pubpaths:  block=/dev/vx/dmp/c3t18d30 char=/dev/vx/rdmp/c3t18d30
guid:      –
udid:      FUJITSU%5FETERNUS%5FDXL%5F0210AD%5F0020
site:      –
Multipathing information:
numpaths:   2
c3t18d30        state=enabled
c2t19d30        state=enabled
wvprp06# ./vxdisksetup -ie c3t18d30
wvprp06#

 

 

Categories: Solaris Admin

Mount iso image on Solaris

April 14, 2011 Leave a comment

1. Create a loopback device file with lofiadm

# lofiadm -a /export/home/oracle/sol-10-u9-ga-sparc-dvd.iso
/dev/lofi/1 <– this loopback device will be created

2. Mount the loopback device to /mnt

# mount -F hsfs -o ro /dev/lofi/1 /mnt

3. Check the files

# cd /mnt

# ls -al
total 55
dr-xr-xr-x   2 root     sys         4096 Aug 12  2010 .
drwxr-xr-x  28 root     root         512 Dec  1 18:54 ..
-r–r–r–   1 root     root          68 Mar  2  2010 .cdtoc
drwxr-xr-x   5 root     root        2048 Aug 12  2010 .install
lrwxrwxrwx   1 root     root          33 Aug 12  2010 .install_config -> ./Solaris_10/Misc/.install_config
-r–r–r–   1 root     root         439 Mar  2  2010 .slicemapfile
-r–r–r–   1 root     root          21 Apr  9  2010 .volume.inf
-r–r–r–   1 root     root          28 Aug 12  2010 .volume.inf.1
-r–r–r–   1 root     root          28 Aug 12  2010 .volume.inf.2
-r–r–r–   1 root     root          23 Aug 12  2010 .volume.inf.3
-r–r–r–   1 root     root          23 Aug 12  2010 .volume.inf.4
-r–r–r–   1 root     root          23 Aug 12  2010 .volume.inf.5
-r–r–r–   1 root     root        7625 May 27  2010 Copyright
-r–r–r–   1 root     root        1797 Jul 22  2010 GPL_LGPL_Source_Offer.txt
drwxr-xr-x   7 root     root        2048 Aug 12  2010 Solaris_10
drwxr-xr-x   2 root     root        2048 Aug 12  2010 boot
-rwxr-xr-x   1 root     root         257 Aug 12  2010 installer
drwxr-xr-x   5 root     root        2048 Aug 12  2010 platform

Categories: Solaris Admin

How to mount/umount CDROM on Solaris

March 2, 2011 Leave a comment

You can mount cdrom by vold or manually

By vold daemon:

1. Check if the vold daemon is runing

# pgrep vold

2. If it is not runing, restart it

# pkill vold && /usr/sbin/vold &

3. Check the mount status of CDROM

# df-k

Manually:
1. Find the cdrom device on Solaris
$ ls -al /dev/sr* | awk '{print "/" $11}'
/dsk/c1t0d0s
2. Mount the CDROM
$ mount -F hsfs -r /dev/sr0 /cdrom
or
$ mount -F hsfs -o -ro /dev/c1t0d0s2
Categories: Solaris Admin