SysAdmin Blog, TechTips and Reviews

An (ex) System Administrator's Blog



Archives Posts

How To Restore Root (and /usr/) rfile system Solaris- restoresymtable –

January 28th, 2011 by elizar

Sun Solaris – Restoring root file system (/) – Solaris 9, Solaris 10 provides steps we need to follow to restore the root file system (/ system) in SPARC and x86 (intel) machines.
1) Log in as root user. It is a security practice to login as normal user and perform an su to take root user (super user) role.
2) Appearance of # prompt is an indication that the user is root
3) Use who -a command to get information about current user
4) When / (root filesystem) is lost because of disk failure. In this case we boot from CD or from the network.
5) Add a new system disk to the system on which we want to restore the root (/) file system
6) Create a file system using the command :
newfs /dev/rdsk/partitionname
7) Check the new file system with teh fsck command :
fsck /dev/rdsk/partitionname
8) Mount the filesystem on a temporary mount point :
mount /dev/dsk/devicename /mnt
9) Change to the mount directory :
cd /mnt
10) Write protect the tape so that we can’t accidentally overwrite it. This is an optional but important step
11) Restore the root file system (/) by loading the first volume of the appropriate dump level tape into the tape drive. The appropriate dump level is the lowest dump level of all the tapes that need to be restored. Use the following command :
ufsrestore -rf /dev/rmt/n
12) Remove the tape and repeat the step 11 if there is more than one tape for the same level
13) Repeat teh step 11 and 12 with next ddump levels. Always begin with the lowest dump level and use highest ump level tape
14) Verify that file system has been restored :
la
15) Delete the restoresymtable file which is created and used by the ufsrestore utility :
rm restoresymtable
16) Change to the root directory (/) and unmount the newly restored file system
cd /
umount /mnt
17) Check the newly restored file system for consistency :
fsck /dev/rdsk/devicename
18) Create the boot blocks to restore the root file system :
installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/devicename — SPARC system
installboot /usr/platform/`uname -i`/lib/fs/ufs/pboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/devicename — x86 system
19) Remove teh last backup tape, and insert a new tape onto which we can write. Make a dump level 0 backup of the newly restored system by issuing the following command :
ufsdump 0ucf /dev/rmt/n /dev/rdsk/deviceName
This step is needed because ufsrestore repositions the files and changes the inode allocations – the old backup will not truly represent the newly restored file system
20) Reboot the system :
#reboot (or)
# init 6
System gets rebooted and newly restored file systems are ready to be used.

Filed under Uncategorized 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

How To Run or Execute Explorer in Solaris

January 12th, 2011 by elizar

Here’s the common way to run explorer..

first time run this:

# /opt/SUNWexplo/bin/explorer -g

from then on, run this;

# /opt/SUNWexplo/bin/explorer

there are many options to explorer for certain things, but just by itself should get you most of what you need.

just want to repeat that for retention:

You can run /opt/SUNWexplo/bin/explorer. The first time you need to input some info (or just press enter). You’ll find the ouput in /opt/SUNWexplo/output.

Explorer download and installation:

http://docs.sun.com/app/docs/doc/819-6614/6n8k8pjc5?l=en&a=view

Filed under Solaris having No Comments »

I was here...