Archive

Posts Tagged ‘solaris’

How to recover a zfs pool after a root system crash

September 22nd, 2008

If your sun solaris server is crashed due to a failed root disk, you will need to recover the solaris OS on your own (simply re-install, of course after you have replaced your failed disk). But if you were so wise to create a zfs pool (in this case the pool is called dozer) on a different set of disks, you are able to recover everything with the following commands:

# zpool import
pool: dozer
id: 2704475622193776801
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

dozer ONLINE
c1t9d0 ONLINE
#

As you can see the pool is online and available for import.

# zpool import dozer
cannot import ‘dozer’: pool may be in use on another system
use ‘-f’ to import anyway
#

If you get this error message, it means that the pool was not cleanly exported (logical if you had an OS crash :) ) and you will need to force the import of the pool.

# zpool import -f dozer
#

Source : Importing ZFS Storage Pools

SysAdmin , ,

How to configure your network on SUN Solaris 10

September 22nd, 2008

On SUN solaris, see that the following is present to have an operational network :

bash-3.00# more /etc/hostname.bge0
192.168.1.10
bash-3.00#

where .bge0 is the interface name

bash-3.00# more /etc/defaultrouter
192.168.1.1
bash-3.00#

your default gateway

bash-3.00# more /etc/resolv.conf
nameserver 192.168.1.1
bash-3.00#

list your nameservers

bash-3.00# more /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
192.168.1.10 springfield
bash-3.00#

add your hostname and ip to the hosts file

bash-3.00# more /etc/nsswitch.conf | grep hosts
# "hosts:" and "services:" in this file are used only if the
hosts: files dns
bash-3.00#

update your nsswitch.conf file to first look in its local host file and if not found, resolve via dns

you should now have an operational network.

SysAdmin ,