Thursday, August 9, 2012

Mirroring a zpool and installing bootblk



Mirroring a zpool and installing bootblk in the new mirror


Destroy one pool which is not in usem ie, rpool and add the disk as mirror of rpool-ABE


SolarisHost:/root# lustatus
Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
sol10-update8                   yes      no     no        yes    -
sol10-update8-new               yes      yes    yes       no     -
SolarisHost:/root#


SolarisHost:/root# zpool status | grep rpool
  pool: rpool
        rpool       ONLINE       0     0     0
  pool: rpool-ABE
        rpool-ABE   ONLINE       0     0     0
SolarisHost:/root#


SolarisHost:/root# zpool status rpool
  pool: rpool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c1t1d0s0  ONLINE       0     0     0

errors: No known data errors

SolarisHost:/root# zpool status rpool-ABE
  pool: rpool-ABE
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool-ABE   ONLINE       0     0     0
          c1t0d0s0  ONLINE       0     0     0

errors: No known data errors


Destroy the unused zpool

SolarisHost:/root#
SolarisHost:/root# zpool destroy rpool
SolarisHost:/root#

Mirror the zpool

SolarisHost:/root# zpool attach rpool-ABE c1t0d0s0 c1t1d0s0
Please be sure to invoke installboot(1M) to make 'c1t1d0s0' bootable.
SolarisHost:/root#


SolarisHost:/root# zpool status rpool-ABE
  pool: rpool-ABE
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress for 0h0m, 1.37% done, 0h28m to go

config:

        NAME          STATE     READ WRITE CKSUM
        rpool-ABE     ONLINE       0     0     0
          mirror      ONLINE       0     0     0
            c1t0d0s0  ONLINE       0     0     0
            c1t1d0s0  ONLINE       0     0     0  343M resilvered

errors: No known data errors
SolarisHost:/root#


Install bootblk on the newly added mirror (SPARC Machine):

SolarisHost:/usr/platform/SUNW,T5240/lib/fs/zfs# installboot -F zfs bootblk /dev/rdsk/c1t1d0s0


Check the mirror status:

SolarisHost:/root# zpool status rpool-ABE
  pool: rpool-ABE
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress for 0h2m, 9.24% done, 0h27m to go
config:

        NAME          STATE     READ WRITE CKSUM
        rpool-ABE     ONLINE       0     0     0
          mirror      ONLINE       0     0     0
            c1t0d0s0  ONLINE       0     0     0
            c1t1d0s0  ONLINE       0     0     0  2.28G resilvered

errors: No known data errors
SolarisHost:/root#


Mirrored:

SolarisHost:/root#
SolarisHost:/root# zpool status rpool-ABE
  pool: rpool-ABE
 state: ONLINE
 scrub: resilver completed after 1h19m with 0 errors on Fri Oct 29 10:59:51 2010
config:

        NAME          STATE     READ WRITE CKSUM
        rpool-ABE     ONLINE       0     0     0
          mirror      ONLINE       0     0     0
            c1t0d0s0  ONLINE       0     0     0
            c1t1d0s0  ONLINE       0     0     0  24.5G resilvered

errors: No known data errors
SolarisHost:/root#

Tuesday, July 31, 2012

Replacing a disk in zpool

Replacing a disk in zpool using a new disk.



(PhyHost1:/)# zpool status zone1-pool
  pool: zone1-pool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: resilver completed after 0h4m with 0 errors on Mon Apr 16 21:02:41 2012
config:

        NAME                        STATE     READ WRITE CKSUM
        zone1-pool                  ONLINE       0     0     0
          c2t60050974071C599Cd84s2  ONLINE       0     0     0  4.80G resilvered

errors: No known data errors
(PhyHost1:/)#


New disk

(PhyHost1:/)# ls -l /dev/rdsk/c2t60050974071C599Cd165s2
lrwxrwxrwx   1 root     root          76 Apr 18 16:11 /dev/rdsk/c2t60050974071C599Cd165s2 -> ../../devices/pci@fc,600000/SUNW,qlc@1/fp@0,0/ssd@w50000974081b599c,a5:c,raw
(PhyHost1:/)# /etc/vx/diag.d/vxdmpinq /dev/rdsk/c2t60050974071C599Cd165s2

Inquiry for /dev/rdsk/c2t60050974071C599Cd165s2, evpd 0x0, page code 0x0
        Vendor id                        : EMC
        Product id                       : SYMMETRIX
        Revision                         : 5874
        Serial Number                    : 50999000@
(PhyHost1:/)#
(PhyHost1:/)# zpool status | grep c2t60050974071C599Cd165
(PhyHost1:/)#
(PhyHost1:/)# vxdisk -o alldgs -e list | grep c2t60050974071C599Cd165
(PhyHost1:/)# vxdisk -o alldgs -e list | grep c2t60050974071C599Cd165s2
(PhyHost1:/)# vxdisk -o alldgs -e list | grep c5t50000974081B59A0d165s2
(PhyHost1:/)#


(PhyHost1:/)# zpool replace zone1-pool c2t60050974071C599Cd84s2 c2t60050974071C599Cd165s2

(PhyHost1:/)#




(PhyHost1:/)# zpool status zone1-pool
  pool: zone1-pool
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress for 0h2m, 57.92% done, 0h1m to go
config:

        NAME                           STATE     READ WRITE CKSUM
        zone1-pool                     ONLINE       0     0     0
          replacing-0                  ONLINE       0     0     0
            c2t60050974071C599Cd84s2   ONLINE       0     0     0
            c2t60050974071C599Cd165s2  ONLINE       0     0     0  2.78G resilvered

errors: No known data errors
(PhyHost1:/)#
(PhyHost1:/)# zpool status zone1-pool
  pool: zone1-pool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: resilver completed after 0h4m with 0 errors on Wed Apr 18 16:46:19 2012
config:

        NAME                         STATE     READ WRITE CKSUM
        zone1-pool                   ONLINE       0     0     0
          c2t60050974071C599Cd165s2  ONLINE       0     0     0  4.80G resilvered

errors: No known data errors
(PhyHost1:/)#

The old disk will be automatically removed from the zpool

(PhyHost1:/)#
(PhyHost1:/)# zpool status zone1-pool
  pool: zone1-pool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: resilver completed after 0h4m with 0 errors on Wed Apr 18 16:46:19 2012
config:

        NAME                         STATE     READ WRITE CKSUM
        zone1-pool                   ONLINE       0     0     0
          c2t60050974071C599Cd165s2  ONLINE       0     0     0  4.80G resilvered

errors: No known data errors
(PhyHost1:/)#
(PhyHost1:/)#


Old disk can be released from system and recuperated.

Tuesday, July 10, 2012

To understand why netstat -a show connections in the BOUND state



Why does netstat -a show connections in the BOUND state? 
The Port in BOUND status and is not accepting connection.

(SlarisHost1:/)# netstat -a | grep 34749
SlarisHost1.46237          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.46257          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.46274          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.46282          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
      *.34749              *.*                0      0 49152      0 BOUND
SlarisHost1.35258          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.33680          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.44257          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.36826          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.33395          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
(SlarisHost1:/)#

Pfiles reveals the process using this port

Port 34749 is used by pid 44968
Port 34749 is used by pid 48671
....


After restarting the application processess, port was liberated

(SlarisHost1:/)# netstat -a | grep 34749
SlarisHost1.46237          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.46274          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.46282          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.58151          SlarisHost1.34749          49152      0 49152      0 ESTABLISHED
SlarisHost1.34749          SlarisHost1.58151          49152      0 50498      0 ESTABLISHED
SlarisHost1.58173          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.33680          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.34749                *.*                0      0 49152      0 LISTEN
SlarisHost1.36826          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.47314          SlarisHost1.34749          49152      0 49152      0 ESTABLISHED
SlarisHost1.34749          SlarisHost1.47314          49152      0 49160      0 ESTABLISHED
SlarisHost1.47326          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.33395          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
SlarisHost1.53352          SlarisHost12.34749       49640      0 49640      0 ESTABLISHED
(SlarisHost1:/)#



From Oracle Support:

Why does netstat -a show connections in the BOUND state?

The BOUND state is the state a socket shows after it is created and the 'bind()' call is made, but none of the 'listen()', 'accept()', 'connect()' or 'close()' calls have been made.  The confusion is that it is not a TCP state, it is a socket state, but it appears in the field that 'netstat' usually uses for TCP state info.

BOUND is a transitory state and the application should be doing a 'listen()'
right after 'bind()' succeeds, then wait in 'accept()' for incoming data.

A listening server process - a client would typically 'connect()' - will 'bind()' automatically.

Sometimes this state is shown after closing or killing an application.  Either situation is likely to be a problem in the way application was implemented and some adjustment is required in fixing the application code (socket programming).

If the application holds this socket open, it will prevent any other application to bind to the same TCP port number.  This can cause services to hang.  Having a BOUND state for a long period of time may cause the application to appear hung or be unresponsive.

Depending how the application works, a server could make multiple attempts to contact unavailable clients and this could result in many sockets left in a BOUND state, eventually resulting in exhausting the supply of available sockets. 
Technical Instruction Document: 1005979.1 discusses increasing the number of file descriptors to avoid the above problem.

If problems rebinding to ports are reported periodically, either when killing a daemon, or if the daemon closes a bound socket, and then creates a new one, the new socket cannot be rebound.  The process reports the following error:

    bind: Address already in use

Eventually, by killing daemons, the BOUND state goes away (kill -15 , kill -11 , kill -9 ).  However, the socket would be still bound with no process running at that time.

There is no way to free the bound ports unless the processes that have bound the socket are killed and that does not always work.  A reboot is sometimes in order.

Notice that when the application opens a socket connection it has complete  control of the socket until it releases it and that socket connection shows TIME_WAIT in the 'netstat -an' output.

To try to identify the process, use the 'pfiles' command (Solaris[TM] 8 and above). Prior to Solaris{TM] 8, the 'lsof' public domain application may be used on the system.
A possible workaround while troubleshooting is to define another socket in /etc/services.  For example:

    service-name1        5010/tcp
    service-name2        5011/tcp

When appropriate, 'truss' the application while issuing the 'kill' or 'kill
-9' commands to get more info as to why it is not closing correctly.

Example of a successful attempt of identification and solution:

  % netstat -an | grep BOUND
        *.33330              *.*                0      0 24576      0 BOUND
        *.33330              *.*                0      0 24576      0 BOUND 
          
  % 
  % su    ( type root password )
  # cd /proc ; pfiles * | egrep "^[0-9]|sockname" > /var/tmp/pfiles1.txt
  # vi /var/tmp/pfiles1.txt

 

  814:    /bin/sh -c dtfile -noview
  815:    dtfile -noview
  819:    cachefsd
  856:    java_vm
          sockname: AF_UNIX
          sockname: AF_UNIX
          sockname: AF_UNIX
          sockname: AF_UNIX
          sockname: AF_UNIX
          sockname: AF_UNIX
          sockname: AF_INET6 ::  port: 33330

  # ps -ef | grep 856
      demo   856   811  0   Jan 25 pts/12   2:46 java_vm 
      root  6619  6400  0 13:58:10 pts/12   0:00 grep 856
  #
  # kill -15 856
  # 
  # ps -ef | grep 856
      root  6630  6400  0 13:59:13 pts/12   0:00 grep 856
  #
  # netstat -an | grep BOUND
  #


Tuesday, March 6, 2012

Edit mnttab to clear stale mount

If a mount goes stale and is unable to be removed using umount command and no other option is seen except a reboot. Below can be tried out

Take a backup and move the mnttab file

root@Sol10-sys1 # cp /etc/mnttab /etc/tab
root@Sol10-sys1 # mv /etc/mnttab /etc/mnttab.bk
root@Sol10-sys1 # chmod 644 /etc/tab      

Edit and remove the stale mount

root@Sol10-sys1 # vi /etc/tab

Change permission

root@Sol10-sys1 # cp /etc/tab /etc/mnttab
root@Sol10-sys1 # chmod 444 /etc/mnttab


Remount the mnttab 

root@Sol10-sys1 # mount -F mntfs mnttab /etc/mnttab

Sunday, January 29, 2012

Jailing an FTP user

Jailing an FTP user

Solaris:


1. Login to the host and check the /etc/ftpd/ftpaccess file.

2. Add the below entry 

restricted-uid

3. This will restrict the ftp user to his home directory and deny navigation through other filesystems.


HP-UX


1. Files related to ftp server configuration

root@MyHPHost:/etc/ftpd# find / -name ftpaccess -print
/etc/ftpd/ftpaccess //this file is not available by default
/usr/newconfig/etc/ftpd/examples/ftpaccess

2. Create the ftpaccess file

cp -p /usr/newconfig/etc/ftpd/examples/ftpaccess /etc/ftpd/ftpaccess

3. Add the guest user entry to restrict user in their home directory

root@MyHPHost:/etc/ftpd# vi ftpaccess

// add this entry in the file to restrict user.

#KEYWORD LABEL USER HOSTS
class real,anonymous,guest *

# Any members of the ftp group will be chroot'd
#guestgroup ftpgrp
guestuser ftpuser1 ftpuser2

Friday, January 27, 2012

Messages logged when Veritas Cluster starts up

Messages logged when Veritas cluster starts up (Solaris)


Execute 'hastart' on MyHost.

Apr  9 10:05:24 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-10619 'HAD' starting on: MyHost
Apr  9 10:05:24 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-10620 Waiting for local cluster configuration status
Apr  9 10:05:24 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-10625 Local cluster configuration valid
Apr  9 10:05:24 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-11034 Registering for cluster membership
Apr  9 10:05:24 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-11035 Waiting for cluster membership
Apr  9 10:05:29 MyHost genunix: [ID 316943 kern.notice] GAB INFO V-15-1-20036 Port h gen  21e4a4b membership 01
Apr  9 10:05:29 MyHost genunix: [ID 674723 kern.notice] GAB INFO V-15-1-20038 Port h gen  21e4a4b k_jeopardy ; 23
Apr  9 10:05:29 MyHost genunix: [ID 513393 kern.notice] GAB INFO V-15-1-20040 Port h gen  21e4a4b    visible ; 23
Apr  9 10:05:29 MyHost Had[24478]: [ID 702911 daemon.notice] VCS INFO V-16-1-10077 Received new cluster membership
Apr  9 10:05:29 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-10086 System  (Node '0') is in Regular Membership - Membership: 0x3
Apr  9 10:05:29 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-10086 System MyHost (Node '1') is in Regular Membership - Membership: 0x3
Apr  9 10:05:29 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-10075 Building from remote system
Apr  9 10:05:31 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-10066 Entering RUNNING state
Apr  9 10:05:31 MyHost Had[24478]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-50311 VCS Engine: running with security OFF


Relative message on the member node:

Apr  9 10:09:31 MyThirdHost genunix: [ID 316943 kern.notice] GAB INFO V-15-1-20036 Port h gen  21e4a4d membership 0123
Apr  9 10:09:31 MyThirdHost Had[9294]: [ID 702911 daemon.notice] VCS INFO V-16-1-10077 Received new cluster membership
Apr  9 10:09:31 MyThirdHost Had[9294]: [ID 702911 daemon.notice] VCS NOTICE V-16-1-10086 System MyOtherHost (Node '3') is in Regular Membership - Membership: 0xf

VCS Version 5.1SF8

Thursday, September 15, 2011

Recovering VxVM Volumes - Disk is LOST or Plex Status is RECOVER


Recovering VxVM Volumes - Disk is LOST or Plex Status is RECOVER 


Step 1. identify the lost disks

   SolarisHost1# vxdisk list
   ...
   - - c4t2d4 SolarisHost1-Application5 failed was:EMC_CLARiiON0_4
   - - DG-application03 DG-application failed was:EMC_CLARiiON0_5

Step 2. for each lost disk, find the device

   SolarisHost1# vxdisk -o alldgs list | grep DG-application
   ...
   EMC_CLARiiON1_5 auto:sliced     -           (DG-application) online
   ...
Note: the disk should appear as online with a seemingly deported diskgroup, for example ””(DG-application)””.


Step 3. reinsert the disk in the Veritas config

   SolarisHost1# vxdg -g DG-application -k adddisk =

   SolarisHost1# vxdg -g DG-application -k adddisk DG-application03=EMC_CLARiiON1_5

Note: ”“DG-application03”” is the Veritas disk name and ”“EMC_CLARiiON1_5”” is the associated device.


Step 4. find the broken Veritas plexes in the diskgroup

   SolarisHost1# vxprint -g DG-application -th | grep DISABLED | grep RECOVER

Step 5. for each broken plex, clear the error flags

   SolarisHost1# vxmend -g DG-application -o force off Application-01
   SolarisHost1# vxmend -g DG-application on Application-01
   SolarisHost1# vxmend -g DG-application fix clean Application-01

Step 6. Start all volumes in the diskgroup

   SolarisHost1# vxvol -g DG-application startall

Step 7. Mount the filesystems

Optionally: do a fsck first! 


Also applied when PLEX hang in RECOVER state :



v  MyDG1   fsgen        DISABLED 1048576  -        ACTIVE   -       -
pl MyDG1-01 MyDG1  DISABLED 1048576  -        RECOVER  -       -
sd MyDG1-04 MyDG1-01 ENABLED 1048576 0        -        -       -

Tuesday, August 30, 2011

Force a Panic and collect a core dump - M Series SPARC

Force a Panic and collect a core dump



Scenario: System not reachable and no response through console.
Action Taken: Initate Forced Panic and forced savecore

Send break signal from chassis to the domain. (2 ways)

Before that check the domainmode. Should be on
setdomainmode -d 00 -m secure=on/off

Ways to send break.
reset -d 0 panic 
sendbreak -d 0 -y 



####Send break to domain 0

XSCF> sendbreak -d 0
Send break signal to DomainID 0?[y|n] :y
XSCF>

#### Open a new session and connect to console again

XSCF> console -f -d 0
Connect to DomainID 0?[y|n] :y 


### System reaches OK prompt. Give sync to force coredump

{a7} ok sync
panic[cpu167]/thread=2a174821ca0: sync initiated
sched: software trap 0x7f
pid=0, pc=0xf005d18c, sp=0x2a174820cb1, tstate=0x4400001407, context=0x0
g1-g7: 10511c4, 18de000, 60, 0, 0, 0, 2a174821ca0
00000000fdb79cd0 unix ync_handler+144 (182e400, f7, 3, 1, 1, 109f400)
%l0-3: 0000000001893e80 00000000018dddd0 00000000018ddc00 000000000000017f
%l4-7: 00000000018c1000 0000000000000000 00000000018bac00 0000000000000037
00000000fdb79da0 unix:vx_handler+80 (fdb02078, 183e038, 7fffffffffffffff, 1, 183e140, f006d515)
%l0-3: 000000000183e140 0000000000000000 0000000000000001 0000000000000001
%l4-7: 000000000182ec00 00000000f0000000 0000000001000000 0000000001019734
00000000fdb79e50 unix:callback_handler+20 (fdb02078, fdfea400, 0, 0, 0, 0)
%l0-3: 0000000000000016 00000000fdb79701 0000000000000000 0000000000000000
%l4-7: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
syncing file systems... 570 568 568 568 568 568 568 568 568 568 568 568 568 568 568 568 568 568 568 568 568 568 done (not 

all i/o completed)
dumping to /dev/md/dsk/d11, offset 21476081664, content: kernel
100% done: 2916208 pages dumped, compression ratio 2.90, dump succeeded

### System reboots to init level 3
rebooting...
Resetting...
.POST Sequence 01 CPU Check
LSB#02 (XSB#01-0): POST 2.11.0 (2009/06/18 09:30)
LSB#06 (XSB#03-1): POST 2.11.0 (2009/06/18 09:30)
LSB#07 (XSB#03-2): POST 2.11.0 (2009/06/18 09:30)
LSB#03 (XSB#02-0): POST 2.11.0 (2009/06/18 09:30)
LSB#01 (XSB#00-1): POST 2.11.0 (2009/06/18 09:30)
LSB#04 (XSB#02-1): POST 2.11.0 (2009/06/18 09:30)
POST Sequence 02 Banner



Wednesday, August 24, 2011

IPMP failover

IPMP failover



(From the man page)
NAME
     if_mpadm - change operational status of interfaces within  a
     multipathing group

SYNOPSIS
     /usr/sbin/if_mpadm -d interface_name

     /usr/sbin/if_mpadm -r interface_name



If the interface is operational, you can use if_mpadm -d to  detach or  off-line  the  interface. If the interface is off-lined, use if_mpadm -r to revert it to its original state. When a network interface is off-lined,  all  network  access fails  over  to a different interface in the IP multipathing group. Any addresses that do not failover are brought  down. Addresses marked  with IFF_NOFAILOVER do not failover. They are marked down. After an interface is off-lined, the system  will  not use  the  interface for any outbound or inbound traffic, and the interface can be safely removed from the system  without any loss of network access.

The if_mpadm utility can be applied only to interfaces  that are part of an IP multipathing group.

Here the backup ip 174.48.22.36 is in IPMP group backup-lan


(SolarisHost1:/root)# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb2: flags=69000842 mtu 0 index 2
        inet 0.0.0.0 netmask 0
        groupname backup-lan
        ether 3d:4a:97:76:8d:00
igb722000: flags=269000842 mtu 0 index 3
        inet 0.0.0.0 netmask 0
        groupname main-lan
        ether 3d:4a:97:76:8d:01
igb1: flags=1000843 mtu 1500 index 4
        inet 174.48.22.36 netmask fffffe00 broadcast 10.48.233.255
        groupname backup-lan
        ether 3d:4a:97:76:8d:0e
igb1:1: flags=1000843 mtu 1496 index 4
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
igb722000: flags=201000843 mtu 1500 index 5
        inet 174.10.11.201 netmask ffffff00 broadcast 10.120.10.255
        groupname main-lan
        ether 3d:4a:97:76:8d:0f
igb722000:1: flags=201000843 mtu 1496 index 5
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
(SolarisHost1:/root)#


We use if_mpadm to do a manual failover between an IPMP group.



The failover is performed now

(SolarisHost1:/root)# if_mpadm -d igb

Here the ip is now failed over to the other interface igb2.

(SolarisHost1:/root)# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb2: flags=21000843 mtu 1496 index 2
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname backup-lan
        ether 3d:4a:97:76:8d:00
igb2:1: flags=21000843 mtu 1496 index 2
        inet 174.48.22.36 netmask fffffe00 broadcast 10.48.233.255
igb722000: flags=269000842 mtu 0 index 3
        inet 0.0.0.0 netmask 0
        groupname main-lan
        ether 3d:4a:97:76:8d:01
igb1: flags=89000842 mtu 0 index 4
        inet 0.0.0.0 netmask 0
        groupname backup-lan
        ether 3d:4a:97:76:8d:0e
igb722000: flags=201000843 mtu 1500 index 5
        inet 174.10.11.201 netmask ffffff00 broadcast 10.120.10.255
        groupname main-lan
        ether 3d:4a:97:76:8d:0f
igb722000:1: flags=201000843 mtu 1496 index 5
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
(SolarisHost1:/root)#



Reattaching the ip back to its original interface

(SolarisHost1:/root)# if_mpadm -r igb


(SolarisHost1:/root)# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb2: flags=69000842 mtu 0 index 2
        inet 0.0.0.0 netmask 0
        groupname backup-lan
        ether 3d:4a:97:76:8d:00
igb722000: flags=269000842 mtu 0 index 3
        inet 0.0.0.0 netmask 0
        groupname main-lan
        ether 3d:4a:97:76:8d:01
igb1: flags=1000843 mtu 1500 index 4
        inet 174.48.22.36 netmask fffffe00 broadcast 10.48.233.255
        groupname backup-lan
        ether 3d:4a:97:76:8d:0e
igb1:1: flags=1000843 mtu 1496 index 4
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
igb722000: flags=201000843 mtu 1500 index 5
        inet 174.10.11.201 netmask ffffff00 broadcast 10.120.10.255
        groupname main-lan
        ether 3d:4a:97:76:8d:0f
igb722000:1: flags=201000843 mtu 1496 index 5
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
(SolarisHost1:/root)#