Showing posts with label Solaris. Show all posts
Showing posts with label Solaris. Show all posts

Friday, January 20, 2017

Sun Solaris useful commands

1. to check the storage size useful

dipso

2. to check the product model

prtconf -b

3.Display system information

cat /etc/release

4.How to display a system phycial processor type

psrinfo -pv

5. to check the SUN powerpath

/etc/powermt version

or

pkginfo -l EMCpower


6. To check the sun server system configuration

#prtdiag

Thursday, January 19, 2017

Solaris failed connect to studio repo connection refused error

Generally when user trying to install the packages from Solaris studio repo, he/she is getting below error as described in the Yellow text

1. Here i am trying to install the X11 client on solaris machine.

root@solaris:~# pkg install pkg://solaris/x11/diagnostic/x11-info-clients

pkg: 1/3 catalogs successfully updated:
Unable to contact valid package repository
Encountered the following error(s):
Unable to contact any configured publishers.
This is likely a network configuration problem.
Framework error: code: 7 reason: Failed connect to studio-repo.oracle.com:1008; Connection refused
URL: 'http://studio-repo.oracle.com' (happened 6 times)


Framework error: code: 7 reason: Failed connect to solaris-repo.oracle.com:1008; Connection refused
URL: 'http://solaris-repo.oracle.com/versions/0/'
any suggestion ??

Solution:

Please check which services is not running on the server , due to which server is not ready to download the packages.

To check the status of service please run the below commnad.

root@solaris:~# svcs \*pkg\*
STATE          STIME    FMRI
disabled       Jan_29   svc:/application/pkg/dynamic-mirror:default
disabled       Jan_29   svc:/application/pkg/mirror:default
disabled       Jan_29   svc:/application/pkg/server:default
online         12:53:49 svc:/system/pkgserv:default
online         12:54:00 svc:/application/pkg/zones-proxy-client:default
online         12:54:09 svc:/application/pkg/repositories-setup:default

Now restart the all enable service then after again start to install the package.

Tuesday, January 17, 2017

How to create or increase a swap partition on Solaris

In this post, I will explain to you, how to create or increase a swap partition on Solaris operating system. Swap partition is more useful file system which is used on Solaris as a virtual memory. Once the resource memory utilization get full, then swap memory comes in the role which maintain the server performance on the Solaris operating system.

If your Solaris server is connected to SAN storage then we will create a extra swap partition with storage. Normally ZFS file system we are using in Solaris operating system. By default swap partition which we created during Solaris OS installation is use rpool. In my case we are using SAN storage space to create the new swap partition.

Step by Step method of creation of swap partition:

1. First you can check the current swap space with below command.

     sun#swap -l
     swapfile             dev    swaplo   blocks     free
     /dev/zvol/dsk/rpool/swap 228,1        16  8388592  5850576

If you see the the output, only one "swap" named file is created on the server.

Note: this is default swap partition which we created during OS installation.

2. Now I want to increase my swap partition. for this please run the below command.

    sun#zfs create –V 64G san/swap1

    sun#swap –a /dev/zvol/dsk/san/swap1

In above command, I will created the new swap file "swap1" with 64 GB.

3. Swap partition is created now, you can check the status by below command
 
    sun#swap -l

4. For permamnent entry please add this file system in /etc/vfstab

/dev/zvol/dsk/san/swap1 -       -       swap    -       no      -

Note: If after reboot or shutdown the server, swap space is not present then please check the /dev/zvol/dsk/san directory and found the swap file name after that run the below command

swap –a /dev/zvol/dsk/san/swap1

Hope, you like this post, In case of any query please comment on this post, I will try to resolve your problem asap.

Monday, January 9, 2017

Solaris local zone not booting "zoneadm: zone 'zone_name': call to zoneadmd failed"

Hello Friends,

In this post, I will explain you the one important issue which we generally facing while we boot the local Solaris zone on the Sun Solaris operating system.

When you are trying to boot the local zone from your Global zone, you encounter the below error message as mentioned below.

Error: zoneadm: zone 'sunz1': "/usr/lib/fs/zfs/mount das/sunz1/export /zones/sunz1/root/export" failed with exit code 1
zoneadm: zone 'sunz1': call to zoneadmd failed.



Solution: For such type of issue is normally related to NFS. When you boot the server, it will start NFS service before start zones. so, as NFS is started, FS /zones/sunz1/root/export  is already in use so global zone doesn't want to start a zone with a FS already in use by a process. You can check which file system is mounted on your global zone as describe below.

sun:/> cat /etc/dfs/dfstab

#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command 'svcadm enable network/nfs/server' to
#       run the NFS daemon processes and the share commands, after adding
#       the very first entry to this file.
#
#       share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home
share -F nfs -o rw=sun.vibhor.com:sunz1.vibhor.com /zones/sunz2/root/export

In above output you can see one folder is NFS mounted on the two local zone.

2. Now for resolving the issue , please stop the NFS service, boot the zone and restart the service.

sun:/> svcs status nfs/server
STATE          STIME    FMRI
online          5:13:30 svc:/network/nfs/status:default
online          5:13:36 svc:/network/nfs/server:default

Currently NFS server service is online on the Global zone, so using below command we will disable the service.

sun:/> svcadm disable nfs/server

sun:/> svcs status nfs/server
STATE          STIME    FMRI
disabled        5:21:57 svc:/network/nfs/server:default
online          5:13:30 svc:/network/nfs/status:default

3. Now we will boot the local zone again and see the existing error occur or not.

sun:/> zoneadm -z sunz1 boot

Note: Now your local zone is boot without any error. So normally this problem occur when NFS is mounted on the server.

4. Once the issue has been resolved you may enable the NFS server services.

sun:/> svcadm enable nfs/server

sun:/> svcadm restart nfs/server











If you see the my screen output images the whole method is describe step by step. If you facing still issue please comment on this post.

Thursday, January 5, 2017

How to Set a Solaris 11 Machine's NIS Domain Name

Hello Friends,

Hope you are doing well at your end. In this post, I will explain to you, how to set a Solaris machine NIS domain name on Solaris 11 operatings system. 

If domainname command not showing any output then you need to check either defaultdomain or NIS domain is configured or not.

Steps which we need to follow to set the NIS domain name as describe below.

1. Please run  "cat /etc/defaultdomain" command and check the output that domain is set or not.

    #domainname

The above command shows you the current domain name on the server, if no output is display you need to set the domain by below command.

   #domainname UNIX

Run the below command to check the output again.

   #domainname
   UNIX

You can see the output. All the above command is used for checking and setting the domain name on the Solaris operating server.

2. If you want to set the domain using NIS, then first please check the NIS/DOMAIN service is running or not

root@sun:~# svcs status nis/domain
STATE          STIME    FMRI
disabled       18:20:04 svc:/network/nis/domain:default

In my Solaris machine, currently NIS domain services is stop, we will start it later once we will configured the NIS domain name on the Solaris server.

3. Now you need to configure the NIS domain for your machine ( in my case - UNIX is my domain name)

root@sun:~# svccfg -s svc:/network/nis/domain setprop config/domainname = UNIX

If you see the above command, "svccfg" command is used to configure the domain and set the proper properties.

4. In the final step once the configuration has been completed you need to refresh & enable the NIS domain service again.

root@sun:~# svccfg -s nis/domain:default refresh
root@sun:~# svcadm enable nis/domain

You can check the NIS domain service status as describe in step 2. 

5. Now you can verify the domain name using below command so we can ensure that the NIS domain name has been set successfully. 

root@sun:~# domainname
UNIX
The above command output show "UNIX" domain name which we set during the configuration, so using these above method we can easily set the NIS domain name on the Solaris operating server.

I would request to you please comment on the post if you are facing any issue during setting the NIS domain name on Solaris platform. 

Wednesday, December 28, 2016

Step by step method to configure static IP address in Solaris10


Please find the step by step method to provide the static ip address on Solaris 10 operating system.

Step 1: Please run the below command to delete the old ip address. In my machine the "net1" Ethernet card is configured already.

sun> ipadm delete-ip net1

Step 2: To check the current status of all Ethernet card attached with machine as per below command.

sun> ipadm show-if -o all
IFNAME     CLASS    STATE    ACTIVE CURRENT       PERSISTENT OVER
lo0        loopback ok       yes    -m46-v------  46--       --
net0       ip       ok       yes    bm46--------  46--       --
sppp0      ip       ok       yes    -m4-p-------  ----       --

Step 3: Please create your new Ethernet card as per below command.

sun> ipadm create-ip net1

sun> ipadm show-if -o all
IFNAME     CLASS    STATE    ACTIVE CURRENT       PERSISTENT OVER
lo0        loopback ok       yes    -m46-v------  46--       --
net0       ip       ok       yes    bm46--------  46--       --
net1       ip       down     no     bm46--------  46--       --
sppp0      ip       ok       yes    -m4-p-------  ----       --

Step 4: To provide the static IP address please run the below command. Please change your IP address with highlighted address.

sun> ipadm create-addr -T static -a 172.26.7.29/16 net1/v4

In case of any issue please comment on the blog.