Wednesday, June 3, 2009
people will not remember "how you did it" but "how great you are"
people will not remember "how you did it" but "how great you are"
Wednesday, May 20, 2009
op - Open Ports on a System
This small shell script shows all the open ports on a system
as well as some information about the port.
##############################################################################
##############################################################################
#!/usr/bin/sh
#
# This utility is used to list all of the open ports on a Solaris UNIX
# based machine. It relies heavily on tools that are used to read through
# the /proc directory so it needs to be run as root or as a root equivalent.
#
# The pathname for all executables should reside in root's path statement
# for ldd to work correctly with this script
#
# Originally posted at: http://www.ilkda.com/op.htm
# Submitter: Alan Pae
#
# nmap is a great tool that will show you what is listening on each port
# of a given machine.
#
# nmap tries to give you some information about each port that it finds.
# It does not assume that any service is listening on any port number and
# it will tell you what is listening on the port if it is told to do so
# and it is able to do so.
#
# However, I felt that the information that was given to me via nmap still
# left a lot of research to do on each port so I threw a script together
# to tell you what process is listening on each port and to give you some
# more information about the process so you can tell at a glance what is
# happening on the system that you are responsible for.
#
# Enjoy the script.
#
#
# Sample output:
#
# -----------------------------------------------------
# Process ID #: 154
#
# Ports used:
# sockname: AF_INET 0.0.0.0 port: 68
# sockname: AF_INET6 :: port: 546
# sockname: AF_INET 127.0.0.1 port: 4999
# sockname: AF_INET 127.0.0.1 port: 4999
# sockname: AF_INET 10.0.0.64 port: 68
#
# COMMAND
# /sbin/dhcpagent
#
# Command Line #2: /sbin/dhcpagent
#
# Environment Variables: 154: /sbin/dhcpagent
# envp[0]: LANG=C
# envp[1]: LD_LIBRARY_PATH=/lib
# envp[2]: PATH=/usr/sbin:/usr/bin
# envp[3]: SMF_FMRI=svc:/network/physical:default
# envp[4]: SMF_METHOD=start
# envp[5]: SMF_RESTARTER=svc:/system/svc/restarter:default
# envp[6]: SMF_ZONENAME=global
# envp[7]: SUNW_NO_MPATHD=
# envp[8]: TZ=US/Pacific
# envp[9]: _INIT_NET_STRATEGY=none
#
# Libraries used: /sbin/dhcpagent
# libxnet.so.1 => /lib/libxnet.so.1
# libnvpair.so.1 => /lib/libnvpair.so.1
# libdhcpagent.so.1 => /lib/libdhcpagent.so.1
# libdhcputil.so.1 => /lib/libdhcputil.so.1
# libinetutil.so.1 => /lib/libinetutil.so.1
# libdevinfo.so.1 => /lib/libdevinfo.so.1
# libdlpi.so.1 => /lib/libdlpi.so.1
# libc.so.1 => /lib/libc.so.1
# libnsl.so.1 => /lib/libnsl.so.1
# libsocket.so.1 => /lib/libsocket.so.1
# libuuid.so.1 => /lib/libuuid.so.1
# libgen.so.1 => /lib/libgen.so.1
# libsec.so.1 => /lib/libsec.so.1
# libdladm.so.1 => /lib/libdladm.so.1
# libmp.so.2 => /lib/libmp.so.2
# libmd.so.1 => /lib/libmd.so.1
# libscf.so.1 => /lib/libscf.so.1
# libavl.so.1 => /lib/libavl.so.1
# librcm.so.1 => /lib/librcm.so.1
# libkstat.so.1 => /lib/libkstat.so.1
# libuutil.so.1 => /lib/libuutil.so.1
# libm.so.2 => /lib/libm.so.2
#
# Maximum number of file descriptors = unlimited file descriptors
#
# Effective Real Effective Real
# User User Group Group
#
# root root root root
#
# Current Working Directory: /
#
# elfsign: verification of /sbin/dhcpagent passed.
#
# -----------------------------------------------------
#
#
for i in `ls /proc`
do
openport=`pfiles $i 2> /dev/null |grep "port:"`
if [ ! -z "$openport" ]; then
echo "Process ID #: $i"
echo ""
echo "Ports used: \n $openport"
echo ""
commandline=`/usr/ucb/ps awwx $i | awk '{print $5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25}'`
echo "$commandline"
echo ""
commandline2=`pargs -l $i`
echo "Command Line #2: $commandline2"
echo ""
eco=`pargs -e $i`
echo "Environment Variables: $eco"
echo ""
deps=`pldd $i`
echo "Libraries used: $deps"
echo ""
filedescriptors=`pfiles $i | grep rlimit | awk '{print $3,$4,$5}'`
echo "Maximum number of file descriptors = $filedescriptors"
echo ""
eu=`ps -o user -p $i`
ru=`ps -o ruser -p $i`
eg=`ps -o group -p $i`
rg=`ps -o rgroup -p $i`
effectiveuser=`echo $eu | awk '{print $2}'`
realuser=`echo $ru | awk '{print $2}'`
effectivegroup=`echo $eg | awk '{print $2}'`
realgroup=`echo $rg | awk '{print $2}'`
echo "Effective Real Effective Real"
echo "User User Group Group"
echo ""
echo "$effectiveuser \t\t $realuser \t $effectivegroup \t\t $realgroup"
echo ""
current=`pwdx $i | awk '{print $2}'`
echo "Current Working Directory: $current"
echo ""
elves=`pldd $i | awk '{print $2}'`
elfsign verify -e $elves
echo ""
echo "-----------------------------------------------------"
fi
done
##############################################################################
### This script is submitted to BigAdmin by a user of the BigAdmin community.
### Sun Microsystems, Inc. is not responsible for the
### contents or the code enclosed.
###
###
### Copyright Sun Microsystems, Inc. ALL RIGHTS RESERVED
### Use of this software is authorized pursuant to the
### terms of the license found at
### http://www.sun.com/bigadmin/common/berkeley_license.jsp
##############################################################################
as well as some information about the port.
##############################################################################
##############################################################################
#!/usr/bin/sh
#
# This utility is used to list all of the open ports on a Solaris UNIX
# based machine. It relies heavily on tools that are used to read through
# the /proc directory so it needs to be run as root or as a root equivalent.
#
# The pathname for all executables should reside in root's path statement
# for ldd to work correctly with this script
#
# Originally posted at: http://www.ilkda.com/op.htm
# Submitter: Alan Pae
#
# nmap is a great tool that will show you what is listening on each port
# of a given machine.
#
# nmap tries to give you some information about each port that it finds.
# It does not assume that any service is listening on any port number and
# it will tell you what is listening on the port if it is told to do so
# and it is able to do so.
#
# However, I felt that the information that was given to me via nmap still
# left a lot of research to do on each port so I threw a script together
# to tell you what process is listening on each port and to give you some
# more information about the process so you can tell at a glance what is
# happening on the system that you are responsible for.
#
# Enjoy the script.
#
#
# Sample output:
#
# -----------------------------------------------------
# Process ID #: 154
#
# Ports used:
# sockname: AF_INET 0.0.0.0 port: 68
# sockname: AF_INET6 :: port: 546
# sockname: AF_INET 127.0.0.1 port: 4999
# sockname: AF_INET 127.0.0.1 port: 4999
# sockname: AF_INET 10.0.0.64 port: 68
#
# COMMAND
# /sbin/dhcpagent
#
# Command Line #2: /sbin/dhcpagent
#
# Environment Variables: 154: /sbin/dhcpagent
# envp[0]: LANG=C
# envp[1]: LD_LIBRARY_PATH=/lib
# envp[2]: PATH=/usr/sbin:/usr/bin
# envp[3]: SMF_FMRI=svc:/network/physical:default
# envp[4]: SMF_METHOD=start
# envp[5]: SMF_RESTARTER=svc:/system/svc/restarter:default
# envp[6]: SMF_ZONENAME=global
# envp[7]: SUNW_NO_MPATHD=
# envp[8]: TZ=US/Pacific
# envp[9]: _INIT_NET_STRATEGY=none
#
# Libraries used: /sbin/dhcpagent
# libxnet.so.1 => /lib/libxnet.so.1
# libnvpair.so.1 => /lib/libnvpair.so.1
# libdhcpagent.so.1 => /lib/libdhcpagent.so.1
# libdhcputil.so.1 => /lib/libdhcputil.so.1
# libinetutil.so.1 => /lib/libinetutil.so.1
# libdevinfo.so.1 => /lib/libdevinfo.so.1
# libdlpi.so.1 => /lib/libdlpi.so.1
# libc.so.1 => /lib/libc.so.1
# libnsl.so.1 => /lib/libnsl.so.1
# libsocket.so.1 => /lib/libsocket.so.1
# libuuid.so.1 => /lib/libuuid.so.1
# libgen.so.1 => /lib/libgen.so.1
# libsec.so.1 => /lib/libsec.so.1
# libdladm.so.1 => /lib/libdladm.so.1
# libmp.so.2 => /lib/libmp.so.2
# libmd.so.1 => /lib/libmd.so.1
# libscf.so.1 => /lib/libscf.so.1
# libavl.so.1 => /lib/libavl.so.1
# librcm.so.1 => /lib/librcm.so.1
# libkstat.so.1 => /lib/libkstat.so.1
# libuutil.so.1 => /lib/libuutil.so.1
# libm.so.2 => /lib/libm.so.2
#
# Maximum number of file descriptors = unlimited file descriptors
#
# Effective Real Effective Real
# User User Group Group
#
# root root root root
#
# Current Working Directory: /
#
# elfsign: verification of /sbin/dhcpagent passed.
#
# -----------------------------------------------------
#
#
for i in `ls /proc`
do
openport=`pfiles $i 2> /dev/null |grep "port:"`
if [ ! -z "$openport" ]; then
echo "Process ID #: $i"
echo ""
echo "Ports used: \n $openport"
echo ""
commandline=`/usr/ucb/ps awwx $i | awk '{print $5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25}'`
echo "$commandline"
echo ""
commandline2=`pargs -l $i`
echo "Command Line #2: $commandline2"
echo ""
eco=`pargs -e $i`
echo "Environment Variables: $eco"
echo ""
deps=`pldd $i`
echo "Libraries used: $deps"
echo ""
filedescriptors=`pfiles $i | grep rlimit | awk '{print $3,$4,$5}'`
echo "Maximum number of file descriptors = $filedescriptors"
echo ""
eu=`ps -o user -p $i`
ru=`ps -o ruser -p $i`
eg=`ps -o group -p $i`
rg=`ps -o rgroup -p $i`
effectiveuser=`echo $eu | awk '{print $2}'`
realuser=`echo $ru | awk '{print $2}'`
effectivegroup=`echo $eg | awk '{print $2}'`
realgroup=`echo $rg | awk '{print $2}'`
echo "Effective Real Effective Real"
echo "User User Group Group"
echo ""
echo "$effectiveuser \t\t $realuser \t $effectivegroup \t\t $realgroup"
echo ""
current=`pwdx $i | awk '{print $2}'`
echo "Current Working Directory: $current"
echo ""
elves=`pldd $i | awk '{print $2}'`
elfsign verify -e $elves
echo ""
echo "-----------------------------------------------------"
fi
done
##############################################################################
### This script is submitted to BigAdmin by a user of the BigAdmin community.
### Sun Microsystems, Inc. is not responsible for the
### contents or the code enclosed.
###
###
### Copyright Sun Microsystems, Inc. ALL RIGHTS RESERVED
### Use of this software is authorized pursuant to the
### terms of the license found at
### http://www.sun.com/bigadmin/common/berkeley_license.jsp
##############################################################################
runqueue.d
The minimal interval for which sar is able to collect statistics
is one second. If a system has many processes that take a couple
of milliseconds to run, sar will not know that they are in the
run queue.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/usr/sbin/dtrace -s
#
# Used for automating checks of CPU, memory, I/O, and network TCP performance.
#
# This script is described and explained in the BigAdmin Tech Tip:
# Automating a System Performance Check Using the checkperf Utility
# http://www.sun.com/bigadmin/content/submitted/perf_check.jsp
#
#pragma D option quiet
profile-1000hz
/curthread->t_cpu->cpu_disp->disp_nrunnable/
{
@runq = sum(curthread->t_cpu->cpu_disp->disp_nrunnable);
}
profile:::tick-30sec
{
normalize(@runq, 3000);
printa("%@8d", @runq);
exit(0);
}
##############################################################################
### This script is submitted to BigAdmin by a user of the BigAdmin community.
### Sun Microsystems, Inc. is not responsible for the
### contents or the code enclosed.
###
###
### Copyright Sun Microsystems, Inc. ALL RIGHTS RESERVED
### Use of this software is authorized pursuant to the
### terms of the license found at
### http://www.sun.com/bigadmin/common/berkeley_license.jsp
##############################################################################
is one second. If a system has many processes that take a couple
of milliseconds to run, sar will not know that they are in the
run queue.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/usr/sbin/dtrace -s
#
# Used for automating checks of CPU, memory, I/O, and network TCP performance.
#
# This script is described and explained in the BigAdmin Tech Tip:
# Automating a System Performance Check Using the checkperf Utility
# http://www.sun.com/bigadmin/content/submitted/perf_check.jsp
#
#pragma D option quiet
profile-1000hz
/curthread->t_cpu->cpu_disp->disp_nrunnable/
{
@runq = sum(curthread->t_cpu->cpu_disp->disp_nrunnable);
}
profile:::tick-30sec
{
normalize(@runq, 3000);
printa("%@8d", @runq);
exit(0);
}
##############################################################################
### This script is submitted to BigAdmin by a user of the BigAdmin community.
### Sun Microsystems, Inc. is not responsible for the
### contents or the code enclosed.
###
###
### Copyright Sun Microsystems, Inc. ALL RIGHTS RESERVED
### Use of this software is authorized pursuant to the
### terms of the license found at
### http://www.sun.com/bigadmin/common/berkeley_license.jsp
##############################################################################
Monday, May 11, 2009
grep
#!/bin/sh -x
# name: checkmessages_net
#
#
MAIL_RECEIVER=jbatu@p1mh01.amkor.com
today=`date|cut -c10-15`
PATH=/usr/bin; export PATH
Host=`hostname`
# Check host01.
# Check today's message above the level of warning.
GREP="grep "\($today\)" /var/adm/messages | egrep "emerg|alert|crit|err|warning" | grep -v "forceload of misc/md\" | grep -v "No proxy found""
# The messages to be ignored
FILTER="| grep -v \"forceload of misc/md\""
FILTER="$FILTER | grep -v \"No proxy found\""
GREP="$GREP$FILTER"
if eval "$GREP" > /tmp/seriousmessages.txt
then
mailx -s "$Host Serious Message" $MAIL_RECEIVER < /tmp/seriousmessages.txt
fi
# name: checkmessages_net
#
#
MAIL_RECEIVER=jbatu@p1mh01.amkor.com
today=`date|cut -c10-15`
PATH=/usr/bin; export PATH
Host=`hostname`
# Check host01.
# Check today's message above the level of warning.
GREP="grep "\($today\)" /var/adm/messages | egrep "emerg|alert|crit|err|warning" | grep -v "forceload of misc/md\" | grep -v "No proxy found""
# The messages to be ignored
FILTER="| grep -v \"forceload of misc/md\""
FILTER="$FILTER | grep -v \"No proxy found\""
GREP="$GREP$FILTER"
if eval "$GREP" > /tmp/seriousmessages.txt
then
mailx -s "$Host Serious Message" $MAIL_RECEIVER < /tmp/seriousmessages.txt
fi
Thursday, May 7, 2009
disk mirror
#!/bin/sh
BOOT_DISK=c1t0d0
MIRROR_DISK=c1t1d0
METAINIT=/usr/sbin/metainit
METAROOT=/usr/sbin/metaroot
# Slice 0 (root slice)
$METAINIT -f d10 1 1 ${BOOT_DISK}s0
$METAINIT -f d20 1 1 ${MIRROR_DISK}s0
$METAINIT d30 -m d10
$METAROOT d30
# Slice 1
$METAINIT -f d11 1 1 ${BOOT_DISK}s1
$METAINIT -f d21 1 1 ${MIRROR_DISK}s1
$METAINIT d31 -m d11
# Slice 2 will not be mirrored (represents entire disk)
# Slice 3 is initially commented out; slice containing DiskSuite
# database replicas in our environment
#$METAINIT -f d13 1 1 ${BOOT_DISK}s3
#$METAINIT -f d23 1 1 ${MIRROR_DISK}s3
#$METAINIT d33 -m d13
# Slice 4
$METAINIT -f d14 1 1 ${BOOT_DISK}s4
$METAINIT -f d24 1 1 ${MIRROR_DISK}s4
$METAINIT d34 -m d14
# Slice 5
$METAINIT -f d15 1 1 ${BOOT_DISK}s5
$METAINIT -f d25 1 1 ${MIRROR_DISK}s5
$METAINIT d35 -m d15
# Slice 6
$METAINIT -f d16 1 1 ${BOOT_DISK}s6
$METAINIT -f d26 1 1 ${MIRROR_DISK}s6
$METAINIT d36 -m d16
# Slice 7
#$METAINIT -f d17 1 1 ${BOOT_DISK}s7
#$METAINIT -f d27 1 1 ${MIRROR_DISK}s7
#$METAINIT d37 -m d17
# Make the mirror disk bootable
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/${MIRROR_DISK}s0
BOOT_DISK=c1t0d0
MIRROR_DISK=c1t1d0
METAINIT=/usr/sbin/metainit
METAROOT=/usr/sbin/metaroot
# Slice 0 (root slice)
$METAINIT -f d10 1 1 ${BOOT_DISK}s0
$METAINIT -f d20 1 1 ${MIRROR_DISK}s0
$METAINIT d30 -m d10
$METAROOT d30
# Slice 1
$METAINIT -f d11 1 1 ${BOOT_DISK}s1
$METAINIT -f d21 1 1 ${MIRROR_DISK}s1
$METAINIT d31 -m d11
# Slice 2 will not be mirrored (represents entire disk)
# Slice 3 is initially commented out; slice containing DiskSuite
# database replicas in our environment
#$METAINIT -f d13 1 1 ${BOOT_DISK}s3
#$METAINIT -f d23 1 1 ${MIRROR_DISK}s3
#$METAINIT d33 -m d13
# Slice 4
$METAINIT -f d14 1 1 ${BOOT_DISK}s4
$METAINIT -f d24 1 1 ${MIRROR_DISK}s4
$METAINIT d34 -m d14
# Slice 5
$METAINIT -f d15 1 1 ${BOOT_DISK}s5
$METAINIT -f d25 1 1 ${MIRROR_DISK}s5
$METAINIT d35 -m d15
# Slice 6
$METAINIT -f d16 1 1 ${BOOT_DISK}s6
$METAINIT -f d26 1 1 ${MIRROR_DISK}s6
$METAINIT d36 -m d16
# Slice 7
#$METAINIT -f d17 1 1 ${BOOT_DISK}s7
#$METAINIT -f d27 1 1 ${MIRROR_DISK}s7
#$METAINIT d37 -m d17
# Make the mirror disk bootable
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/${MIRROR_DISK}s0
Wednesday, May 6, 2009
create ISO on solaris
./iso.sh -l sol10_1106 -o /export/home/iso/sol10_1106.iso
#!/bin/sh
#
# =head1 NAME
#
# mkiso - construct an ISO9660 CD image for burning a data CD
#
# =head1 SYNOPSIS
#
# mkiso [-l label] [-o image.iso] directory
#
# =head1 DESCRIPTION
#
# I embodies my usual incantation
# for constructing an ISO9660 image for a CDROM.
# It is partner to mkcd(1cs), a program to burn data CDs.
# I makes plain vanilla data CDs, not bootable or audio CDs.
#
# =head1 OPTIONS
#
# =over 4
#
# =item B<-l> I
#!/bin/sh
#
# =head1 NAME
#
# mkiso - construct an ISO9660 CD image for burning a data CD
#
# =head1 SYNOPSIS
#
# mkiso [-l label] [-o image.iso] directory
#
# =head1 DESCRIPTION
#
# I
# for constructing an ISO9660 image for a CDROM.
# It is partner to mkcd(1cs), a program to burn data CDs.
# I
#
# =head1 OPTIONS
#
# =over 4
#
# =item B<-l> I
Tuesday, May 5, 2009
Symantec Storage Foundation
Symantec Storage Foundation
# /opt/VRTS/bin/vxsvcctrl status -> view VEA service status
# /opt/VRTS/bin/vxsvcctrl stop -> stop VEA service
# /opt/VRTS/bin/vxsvcctrl start -> start VEA service
# vxdg list
# vxdg list diskgroup
# vxdg free
# vxdiskadd c1t0d0
# vxdg init diskgroup [cds=on|off] diskname=devicename
# vxdg init mktdg mktdg01=c1t0d0s2
# vxdiskadd c1t1d0 -> Adding a disk to a disk group
Removing a disk from a disk group
# vxdg [-g diskgroup] rmdisk diskname
# vxdg -g mydg rmdisk mydg02
Once the disk has been removed from its disk group, you can (optionally)
remove it from VxVM control completely, as follows:
# vxdiskunsetup devicename
For example, to remove c1t0d0s2 from VxVM control, use these commands:
# vxdiskunsetup c1t0d0s2
Deporting a disk group
-> Deporting a disk group disables access to a disk group that is currently enabled (imported) by the system.
Deport a disk group if you intend to move the disks in a disk group to another system. Also, deport a disk
group if you want to use all of the disks remaining in a disk group for a new purpose
# vxvol -g diskgroup stopall
# vxdg deport diskgroup
# vxdisk -s list
-> Select menu item 8 (Enable access to (import) a disk group) from the vxdiskadm main menu.
# vxdg import diskgroup
# vxdisk listtag
Renaming a disk group
# vxdg [-t] -n newdg import diskgroup
# vxdg -t -n mytempdg import mydg
To rename a disk group during deport, use the following command:
# vxdg [-h hostname] -n newdg deport diskgroup
# vxdg -h jingo -n myexdg deport mydg
Moving disks between disk groups
# vxdg -g salesdg rmdisk salesdg04
# vxdg -g mktdg adddisk mktdg02=c0t3d0
Handling errors when importing disks
To clear locks on a specific set of devices, use the following command:
# vxdisk clearimport devicename ...
To clear the locks during import, use the following command:
# vxdg -C import diskgroup
If some of the disks in the disk group have failed, you can force the disk group to be
imported by specifying the -f option to the vxdgimport command:
# vxdg -f import diskgroup
# /opt/VRTS/bin/vxsvcctrl status -> view VEA service status
# /opt/VRTS/bin/vxsvcctrl stop -> stop VEA service
# /opt/VRTS/bin/vxsvcctrl start -> start VEA service
# vxdg list
# vxdg list diskgroup
# vxdg free
# vxdiskadd c1t0d0
# vxdg init diskgroup [cds=on|off] diskname=devicename
# vxdg init mktdg mktdg01=c1t0d0s2
# vxdiskadd c1t1d0 -> Adding a disk to a disk group
Removing a disk from a disk group
# vxdg [-g diskgroup] rmdisk diskname
# vxdg -g mydg rmdisk mydg02
Once the disk has been removed from its disk group, you can (optionally)
remove it from VxVM control completely, as follows:
# vxdiskunsetup devicename
For example, to remove c1t0d0s2 from VxVM control, use these commands:
# vxdiskunsetup c1t0d0s2
Deporting a disk group
-> Deporting a disk group disables access to a disk group that is currently enabled (imported) by the system.
Deport a disk group if you intend to move the disks in a disk group to another system. Also, deport a disk
group if you want to use all of the disks remaining in a disk group for a new purpose
# vxvol -g diskgroup stopall
# vxdg deport diskgroup
# vxdisk -s list
-> Select menu item 8 (Enable access to (import) a disk group) from the vxdiskadm main menu.
# vxdg import diskgroup
# vxdisk listtag
Renaming a disk group
# vxdg [-t] -n newdg import diskgroup
# vxdg -t -n mytempdg import mydg
To rename a disk group during deport, use the following command:
# vxdg [-h hostname] -n newdg deport diskgroup
# vxdg -h jingo -n myexdg deport mydg
Moving disks between disk groups
# vxdg -g salesdg rmdisk salesdg04
# vxdg -g mktdg adddisk mktdg02=c0t3d0
Handling errors when importing disks
To clear locks on a specific set of devices, use the following command:
# vxdisk clearimport devicename ...
To clear the locks during import, use the following command:
# vxdg -C import diskgroup
If some of the disks in the disk group have failed, you can force the disk group to be
imported by specifying the -f option to the vxdgimport command:
# vxdg -f import diskgroup
Subscribe to:
Posts (Atom)
