SysAdmin Blog, TechTips and Reviews

An (ex) System Administrator's Blog

Archives Posts

Mounting Remote Filesystem To Local Solaris UNIX Box – NFS

March 27th, 2012 by elizar

Quick post on NFS and sharing filesystem from one server to another.

Key files and commands for this activity:

  • /etc/dfs/dfstab
  • share (command)
  • shareall

The only problem I got in following the below instruction is Permission denied on the shared directory/filesystem from the remote Solaris server.

Temporary fix chmod to 777.. check for security later :)

To be able to share a remote filesystem you have to share the remote filesystem.

To share the remote filesystem you need to modify
the /etc/dfs/dfstab file with

share -F nfs -o rw /var/tmp/oracle

also modify the /etc/dfs/sharetab with

/var/tmp/oracle nfs rw

then issue

make sure nfs daemon are running of the server
you could check by isseing

ps -ef | grep nfs

if it is not running you could start nfsd by issuing /etc/init.d/nfs.server start

svcadm enable nfs

on the client side, that is the side with no disk space
you need to mount the remote filesystem you could do this by issuing

mount (remote server):/usr/local /mount_point

/var/tmp/oracle will be the filesytem you intend to share eg / /usr/local, /var, /export/home

so if you intend to share /usr/local your /etc/dfs/dfstab will look like

share -F nfs -o rw /usr/local

and /etc/dfs/sharetab will look like

/usr/local nfs rw

Filed under Commands, Solaris 10 having No Comments »

Archives Posts

(ufsrestore) Make Bootable – Recovering the Root or /usr File System

January 17th, 2012 by elizar

This is some kind of a followup from the first post about ufsdump – how to backup solaris filesystem

1. Replace and partition the disk if it has failed.

2. Because the system cannot be booted from the boot disk, boot from the CD-ROM and re-create the failed file system by issuing the newfs command:

newfs /dev/rdsk/

is the name of the raw disk partition that contains the corrupted file system.

3. Check the new file system by using fsck:

fsck /dev/rdsk/

4. Mount the new file system on a temporary mount point:

mount /dev/dsk//mnt

5. Change to the /mnt directory:

cd /mnt

6. Write protect the tapes so that you don’t accidentally overwrite them.

7. Load the tape and issue the following command:

ufsrestore rf /dev/rmt/0

The entire content of the tape is restored to the file system. All permissions, ownerships, and dates remain as they were when the last incremental tape was created.

8. Verify that the file system is restored:


9. Remove the restoresymtable file that is created and used by ufsrestore to checkpoint the restoration:

rm restoresymtable

10. Change to the root (/) directory:

cd /

11. Unmount the newly created file system:

umount /mnt

12. Check the new file system with fsck:

fsck /dev/rdsk/

The restored file system is checked for consistency.

13. If you are recovering the root (/) file system, create the boot blocks on the root partition by using the installboot command:

installboot /usr/platform/’uname-I’/lib/fs/ufs/bootblk\

The installboot command installs the boot blocks onto the boot disk. Without the boot blocks, the disk cannot boot.

14. Insert a new tape into the tape drive and back up the new file system:

ufsdump 0uf /dev/rmt/n /dev/rdsk/

A level 0 backup is performed. You should immediately make a backup of a newly created file system because ufsrestore repositions the files and changes the inode allocation.

15. Reboot the system with a reconfiguration reboot:

# shutdown -y -g0 -i0
ok boot -r

The system is rebooted.

Extra Notes on UFSrestore

When you restore files in a directory other than the root directory of the file system, ufsrestore re-creates the file hierarchy in the current directory. For example, if you restore to /home files that were backed up from /users/bcalkins/files, the files are restored in the directory /home/users/bcalkins/files.

When you restore individual files and directories, it’s a good idea to restore them to a temporary directory such as /var/tmp. After you verify that you’ve retrieved the correct files, you can move them to their proper locations. You can restore individual files and directories to their original locations; however, if you do so, you should be sure that you do not overwrite newer files with older versions from the backup tape.

You should not forget to make regular backups of your operating system. Losing all the customization you dosuch as adding user accounts, setting up printers, and installing application softwarewould be disastrous. Whenever you make modifications that affect the root (/),/usr, /opt, or other operating system directories, you should bring down the system into single-user mode and perform a level 0 dump.

Filed under Solaris, Solaris 10 having No Comments »

Archives Posts

How to Stop syslog Messages to Write Console on Solaris

January 15th, 2011 by elizar

How to Stop syslog Messages to Write Console on Solaris

you can edit the entries in the /etc/syslog.conf to direct to another file eg /var/log/syslog instead of /dev/console. After that, issue kill -HUP to “reinitialize” the config

or if you want to stop syslog process/daemon in Solaris 10, (not /etc/init.d/syslog stop)

it should be

svcadm disable svc:/system/system-log:default

svcadm disable svc:/system/system-log:default turned syslog off you need to also run svcadm enable svc:/system/system-log:default to turn it back on, after you made the right changes to /etc/syslog.conf so it does what you want. You can probably just comment out the line as it is also logged to file in /var/adm/messages.log

Turning syslog off is not a good idea.

That’s is How to Stop syslog Messages to Write Console on Solaris.

Filed under Solaris, Solaris 10 having No Comments »

Archives Posts

Solaris Kernel Patching Recommended Patch

April 27th, 2010 by elizar

Here’s another Kernel patching of Solaris. I know there are tons of this type of post in the internet but another reference for the one who needs it, is I guess ok.

To be honest, this is the steps that really made me understood the steps and procedure and the concept behind the 10_Recommended patch for solaris kernel.

Read the rest of this entry »

Archives Posts

Metastat Needs Maintenance Metareplace

November 15th, 2009 by elizar

Guilty! Putting all those Metastat keywords on one subject, that’s me! ANyway, I don’t want to stale this blog so once in a while I’m going to be posting some bits and pieces of Unix tools/tips.. and here’s a new one about SVM… Responding to Disk Errors courtesy of BigAdmin!

Read the rest of this entry »

Filed under Solaris, Solaris 10, Tips having No Comments »

Archives Posts

Send Break on SPARC Enterprise T5120 – Send Break on ILOM

October 15th, 2009 by elizar

Send Break on SPARC Enterprise T5120 – well it for the T5000 series I guess, the newer ones. Or “Sending Break onan ILOM..

“->” = ILOM
“sc>” = ALOM

.. and since this particular server has the “->” prompt we’re using the ILOM.

From ILOM to Solaris:
-> start /SP/console

From ALOM to Solaris:
sc> console

And of course.. Enter “#.” to return to ALOM / ILOM !!

Send Break on ILOM

set /HOST send_break_action=break
and then
start /SP/console

c)ontinue, s)ync, r)eset? s

bada bing! bada boom!

Archives Posts

Optimized Open Source Software Stack (Cool Stack) 1.3.1 Final Release

September 15th, 2009 by elizar

Optimized Open Source Software Stack (Cool Stack) 1.3.1 Final Release…

Will be installing Ruby on Rails using Cool Stack… this is the first of sets of post.. Now downloading the packages from

Optimized Open Source Software Stack (Cool Stack) for the Sun Solaris Operating System(TM). Cool Stack is a collection of some of the most commonly used open source applications optimized for the Sun Solaris OS. By using these binaries you will enjoy the best levels of performance from your system, while also reducing your time-to-service.

Instructions: Select the files you want, then click the “Download Selected with Sun Download Manager” (SDM) button below to automatically install and use SDM (learn more). Alternately, click directly on file names to download with your browser. (Use of SDM is recommended but not required.)

Archives Posts

Exiting from Container Console if forgot to specify an escape character…

August 14th, 2009 by elizar

Once you have a non-global zone installed or running on a Solaris 10 installation, it is often useful to connect to the console of the zone. This provides the same control over the zone as connecting to the console of a physical server running Solaris.

To connect to the console of a Solaris 10 zone called testzone, use the following command as root or the equivalent on the global zone:

zlogin -C testzone

The -C option specifies a console login. The console login will persist when the zone is rebooted.
To exit zlogin, use the escape sequence ~. on a new line (the tilde must follow a carriage return, not any other character). If this escape character is inappropriate (because you are connected using software like tip that also uses this escape sequence), you can specify a different escape character on the command line. For example, to use the @ symbol, use:

zlogin -C -e @ testzone

In this case, to exit the zlogin console session, type @. on a new line

Just a note of reference, if you are using tip and forget to change the escape character above. you can do the following to get out


This will force it to disconnect the local zlogin instead of the tip…
However, let’s go deeper….

If you logged into a container’s console (via chs000xx —> ILOM —> then to a serial console)..

#. – will exit to ILOM (but once you logged in again.. you’re in container’s console)
~. – will exit to chs000xx (but once you logged in again.. you’re in container’s console)
~~. – WILL EXIT from the Container!!

It’s a like an hierarchy thingy..

(first part was taken from a website… later part was from me.. of course if you didn’t read all of it, you wont see this note.. 😀 )

Archives Posts

Setting Search $PATH csh

July 1st, 2009 by elizar

Another quikie copy/paste kind of thingy…

You may set your search path automatically each time you log in, by placing the appropriate “set path” command in your “.login” file.

(To learn more about the .login file, type “help dotlogin”.) Here is a sample of a command line that you might put in your .login file to set a non-standard search path:

set path = ( $path /usr/ucb /bin /usr/bin /usr/new .)

Archives Posts

How to Consolidate Servers and Applications using Solaris Containers

May 7th, 2009 by elizar

I am subscribe to the official Sun Microsystem newsletter and I got this one directly from my inbox that I want to share to every Solaris SysAdmin out there:

This How-To Guide instructs users, system administrators, and developers unfamiliar with Solaris 10 OS on consolidating applications onto a single server using Solaris Containers technology. The guide starts with a brief overview of Solaris Containers and follows with an example of using Solaris Containers to consolidate two Web server applications and an email server application onto a single server. Users are guided step-by-step through the consolidation process, with code examples and illustrations.

After using this guide, a user should be able to create Solaris Containers by:

* Creating a resource pool
* Defining Solaris Zones
* Assigning CPU usage with the Fair Share Scheduler (FSS)
* Installing and booting a zone
* Configuring access to raw devices from the zone

Read the rest of this entry »

Filed under Solaris, Solaris 10, ZFS having No Comments »

« Previous Entries

I was here...