Veritas Volume Manager Upgrade Solaris 8

Symantec_Storage_Foundation_Basic_5_Linux
I’ve been told by some that this process is overkill, and have been told by others that this process is the cleanest way to go. Please procede at your own risk.

QuickNotes: vxlicrep -e will allow you view your veritas license along with lot of additional information.

Backup any file systems that are part of rootdg

This particular system is running Veritas 3.5 which requires a rootdg. This system has 3 file systems that are part of this dg. They are seen below. Comment any rootdg entries out of the /etc/vfstab.

/dev/vx/dsk/rootdg/home
1048576 35232 950055 4% <mountpoint>

/dev/vx/dsk/rootdg/disk
1048576 467462 544827 47% <mountpoint>

/dev/vx/dsk/rootdg/disk
1048576 55289 932147 6% <mountpoint>

These systems are located on this disk slice.

7
unassigned wm 5566 – 14086 41.35GB (8521/0/0)
86709696

First step is to back these 3 file systems up locally whereever there is room or over NFS mount.

Export & Unmount

Unmount any veritas filesystems and export and disk groups.

Break Mirrors

At this point I need to break the submirrors off that are on the second system disk. In this case c1t1d0.

Use the format below

metadetach mirror submirror

for example:

metattach d1 d21

Keep Veritas from Starting up on Reboot.

Touch /etc/vx/reconfig.d/state.d/install-db to prevent Veritas from starting up with the box.

Reboot in Single User mode, Verify that you are booting of off the primary disk. Init 0, boot -s

Remove the current Veritas packages in the order listed below. (You may encounter addition packages not listed here. If this occurs add these packages to the removal order after VRTSvcsvr and before VRTSvxfs)

    1. VRTSvmdoc
    2. VRTSfsdoc
    3. VRTSvmman
    4. VRTSvrdoc
    5. VRTSvrw
    6. VRTSweb
    7. VRTSobgui
    8. VRTSvmpro
    9. VRTSfspro
    10. VRTSob
    11. VRTSspc
    12. VRTSvcsvr
    13. VRTSordoc (Should
      be Database Edition Only)
    14. VRTSorgui (Should
      be Database Edition Only)
    15. VRTSdbed (Should
      be Database Edition Only)
    16. VRTSvxmsa
    17. VRTSvxfs
    18. VRTSvxvm
    19. VRTSvxlic

Install San Foundation kit

(Sol8), make sure that you reconfigure reboot in single user mode

Step 8: devfsadm -Cv, change to runlevel 2 before next step.

Step 9: Install new veritas and patch with maint pack 2, then reboot again.

Step 10: Upgrade disk groups and file systems.

Upgrading Disk Groups:

To determine what DG version you are running, you can use the following command

vxdg -q list <my-dg> | grep version.

Import your disk groups, and run the following command on each DG, the -T is optional.

vxdg [ -T version ] upgrade diskgroup.

Upgrading File Systems:

To determine what FS version you are running, you can use the command below.

fstyp -v /dev/vx/dsk/dev/device

Mount your filesystems and then run the following command

 vxupgrade -n 6 /mountpoint

Use the format command to create new slices (on disk0) for the 3 file systems listed in step one. Basically split the 41.35gb contained in Slice 7 across Slice 5-7.

5 unassigned wm 0
0 (0/0/0) 0

6 unassigned wm 0
0 (0/0/0) 0

7 unassigned wm 5566 – 14086
41.35GB (8521/0/0) 86709696

Mount the new slices and copy data from the original mount points to the new mounts.

Load the partition table from disk one onto disk two.

Reattach Mirrors.

Advertisements

Solaris: How to Resize a Swap Partition….on a disk without any free slices

First lets detach the swap partition (submirror) on the secondary disk. Where d1 is the metadevice and d21 is the submirror

#metadetach d1 d21
d1: submirror d21 is detached

metaclear d21
d21: Concat/Stripe is cleared

Now lets format Secondary Disk (c1t1d1 in this example)

Below is the partition table of the disk that I am working with. Slice one will be resized using unallocated disk space. Add 1 to the last cylinder of slice 7 to determine your starting cylinder. In this case my new starting cylinder is 2691.

Total disk cylinders available: 14087 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 824 4.00GB (825/0/0) 8395200
1 swap wu 825 - 1031 1.00GB (207/0/0) 2106432
2 backup wm 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wm 1032 - 1038 34.78MB (7/0/0) 71232
4 var wm 1039 - 1657 3.00GB (619/0/0) 6298944
5 home wm 1658 - 2070 2.00GB (413/0/0) 4202688
6 stand wm 2071 - 2277 1.00GB (207/0/0) 2106432
7 stand wm 2278 - 2690 2.00GB (413/0/0) 4202688

Now resize the partition
In this case I am going to use the rest of the disk, which according to the information for partition two, ends @ cylinder 14087. Subtract 2691 from 14087, to determine how many cylinders your slice is going to be.

Enter partition id tag[swap]:
Enter partition permission flags[wu]:
Enter new starting cyl[825]: 2691
Enter partition size[2106432b, 207c, 1028.53mb, 1.00gb]: 11396c

Now save this new partition scheme

Enter table name (remember quotes): my_table

Then label your disk. As you can see below, my swap partition is now huge.

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 824 4.00GB (825/0/0) 8395200
1 swap wu 2691 - 14086 55.30GB (11396/0/0) 115965696
2 backup wm 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wm 1032 - 1038 34.78MB (7/0/0) 71232
4 var wm 1039 - 1657 3.00GB (619/0/0) 6298944
5 home wm 1658 - 2070 2.00GB (413/0/0) 4202688
6 stand wm 2071 - 2277 1.00GB (207/0/0) 2106432
7 stand wm 2278 - 2690 2.00GB (413/0/0) 4202688
Now lets Swap the Swap


First, reinitialize swap submirror.
metainit d21
d21: Concat/Stripe is setup

Add swap to new submirror

\swap -a /dev/md/dsk/d21

View swap

swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d1 85,1 16 2106416 2106416
/dev/md/dsk/d21 85,21 16 115965680 115965680

Remove the metadevice from swap

swap -d /dev/md/dsk/d1

Verify that previous step worked

swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d21 85,21 16 115965680 115965680

Clear Metadevice/Mirror

metaclear d1
Mirror is cleared
Clear Metadevice/submirror
metaclear d11
d11: Concat/Stripe is cleared

Format Primary Disk (c1t1d0 in this example)

Select a predefined table

partition> select
0. original
1. my_table
Specify table (enter its number)[0]: 1
View the partition table, and make sure it looks right.
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 824 4.00GB (825/0/0) 8395200
1 swap wu 2691 - 14086 55.30GB (11396/0/0) 115965696
2 backup wm 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wm 1032 - 1038 34.78MB (7/0/0) 71232
4 var wm 1039 - 1657 3.00GB (619/0/0) 6298944
5 home wm 1658 - 2070 2.00GB (413/0/0) 4202688
6 stand wm 2071 - 2277 1.00GB (207/0/0) 2106432
7 stand wm 2278 - 2690 2.00GB (413/0/0) 4202688

Label disk
partition> label
Ready to label disk, continue? y

Put things back the way they were.

Reinitialize the swap submirror on the primary disk

metainit d11
d11: Concat/Stripe is setup

Reinitialize Metadevice Mirror

metainit d1
d1: Mirror is setup

Add the metadevice to swap
swap -a /dev/md/dsk/d1

… and verify that it took

swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d21 85,21 16 115965680 115965680
/dev/md/dsk/d1 85,1 16 115965680 115965680

Remove the submirror that you added to swap in the step above

swap -d /dev/md/dsk/d21

Reattach Submirror d21 to Mirror d1

metattach d1 d21
d1: submirror d21 is attached

Redefine dump device

dumpadm -d swap
Dump content: kernel pages
Dump device: /dev/md/dsk/d1 (swap)
Savecore directory: /var/crash/blahblah
Savecore enabled: yes

Related articles

SwapFaq’s
Repartitioning a Linux Cloud Server
HomeLab: Cisco Switch Boot Alternate IOS Image
Solaris 9 Scan for New SAN Luns & and Vertias Volume Manager Quick Start

Solaris Soft and Hard Limits

Handle_2

Hard limits are a kernel-configurable item, and users can’t exceed them. Soft limits are the user defaults, and users can change that using the ulimit program or the limit/unlimit builtins.

Basically, soft limits can be changed to anything up to the hard limit. Think of soft limits as the warning barrier. When a user reaches the soft limit they will get an warning message but are still allowed to use more space up to the hard limit.

Also, you can configure the system to set expiration times for users who have exceeded their soft limit. You can set both soft and hard limits. The system will not allow a user to exceed his or her hard limit. However, a system administrator may  set a soft limit (sometimes referred to as a quota), which the user can temporarily exceed. The soft limit must be less than the hard limit.

Use ulimit -a to check soft limits, and ulimit -Ha to check hard limits. These values will display as open files.

You can set these values by placing the following entries in /etc/system.

This will require a reboot

[code language=”css”]
set
rlim_fd_max=8192
set rlim_fd_cur=256
[/code]

Note that rlim_fd_max is the hard limit, and rlim_fd_cur is the current limit (or soft limit)

Solaris Network Connection Performance Part I

Monitoring Solaris Ethernet Performance

Netstat -i

This option is used to diagnose the network problems when  the connectivity is there but  it is slow in response .

Values to look at:

    * Collisions (Collis)
    * Output packets (Opkts)
    * Input errors (Ierrs)
    * Input packets (Ipkts)

Network collision rate = Output collision counts / Output packets

Network-wide collision rate greater than 10 percent  will indicate

    *  Overloaded network,
    *  Poorly configured network,
    *  Hardware problems. 

Input Packet Error Rate = Ierrs / Ipkts.

If the input error rate is high (over 0.25 percent), the host is dropping packets. Hub/switch cables etc needs to be checked for potential problems. 

Name  Mtu  Net/Dest   Address    Ipkts     Ierrs Opkts     Oerrs Collis Queue
lo0   8232 loopback   localhost  43523390  0     43523390  0     0      0
hme0  1500 <hostname> <hostname> 561847305 886   483621617 0     0      0
qfe0  1500 <hostname> <hostname> 13480886  1     1521743   0     0      0

You can also use the following to determine the the ethernet interface link status,and speed on your interface. In the example below I am running these on hme0

ndd -set /dev/hme instance 0
ndd -get /dev/hme link_status
ndd -get /dev/hme link_mode
ndd -get /dev/hme link_speed

If you have only one ethernet interface, you can leave out the instance
command. Otherwise, you can specify the hme instance number there. The
results of the next three commands are either 1 or 0. In each case, the
value means:

link_status:  0=down 1=up

link_mode:   0=half duplex  1=full duplex

link_speed:  0=10Mbps  1=100Mbps

You can also use the following netstat command. Replace ce0 with your ethernet adapter

>netstat -k ce0 | egrep ‘link_speed|link_status|link_duplex’
lp_cap_asmpause 1 lp_cap_pause 0 link_T4 0 link_speed 1000
link_duplex 2 link_asmpause 0 link_pause 0 link_up 1 mac_mtu 1522

How to read this junk:
link_up – 0 down, 1 up


link_speed – speed in Mbit/s



link_duplex – 1 half duplex, 2 full duplex, 0 down

Alom, Ilom, & Elom Part II

Managementilomelomimpiloginscreen
Part II of this Post is composed of a list of Alom commands and their Ilom counterparts. This information was taken from a document that was found on Sunsolve. I felt that this section was the most helpfull. Note that the original document has additional commands listed, however I chose to omit those that I felt were less useful.

&amp;amp;lt;!–
@page { size: 5in 11in; margin: 0.79in }
P { margin-bottom: 0.08in }
–&amp;amp;gt;

ALOM

Summary

ILOM

password Changes the
login password of the current user.
set
/SP/users/username password
 
restartssh  Restarts the
SSH server so that new host keys generated by the
ssh-keygen
command are reloaded.
set
/SP/services/ssh restart_sshd_action=true
 
setdate
[[mmdd]HHMM |mmddHHMM[cc]yy][.SS]
Sets ALOM
CMT date and time.
set
/SP/clock datetime=
value 
setdefaults
[
-a]
Resets all
ALOM CMT configuration parameters to their default values. The

-a
option resets the user
information to the factory default (one
admin
account only).
set
/SP reset_to_defaults=all
 
setkeyswitch
[normal|stby|diag|

locked] 
Set the
status of the virtual keyswitch. Setting the virtual keyswitch to
standby (
stby)
powers off the server. Before powering off the host server, ALOM
CMT asks for a confirmation.
set
/SYS keyswitch_state=
value 
setsc
[param] [value]
Sets the
specified ALOM CMT parameter to the assigned value.


set
target property=value 

setupsc Runs the
interactive configuration script. This script configures the ALOM
CMT configuration variables.

No equivalent in ILOM
showplatform [-v]
Displays
information about the host system’s hardware configuration, and
whether the hardware is providing service. The
-v
option displays verbose information about the displayed
components.

show
/HOST
 
showfru Displays
information about the field-replaceable units (FRUs) in a host
server.

No equivalent in ILOM
showusers
[-g lines]
Displays a
list of users currently logged in to ALOM CMT. The display for
this command has a similar format to that of the UNIX command
who.
The
-g
option pauses the display after the number of lines you specify
for
lines.

show
/SP/sessions
 
showhost
[
version] 
Displays
version information for host-side components

show
/HOST
 
showkeyswitch  Display
status of virtual keyswitch.

show
/SYS keyswitch_state
 
showsc
[param]
Displays the
current non-volatile read-only memory (NVRAM) configuration
parameters.


show
target property 

showdate Displays the
ALOM CMT date. ALOM CMT time is expressed in Coordinated
Universal Time (UTC) rather than local time. The Solaris OS and
ALOM CMT time are not synchronized.


show
/SP/clock datetime
 


ssh-keygen -l


ssh-keygen -r 


ssh-keygen
-t
{rsa|dsa} 

Generates
Secure Shell (SSH) host keys and displays the host key
fingerprint on the SC.


show
/SP/services/ssh/keys rsa|dsa
 


set
/SP/services/ssh generate_new_key_action=true
 


set
/SP/services/ssh generate_new_key_type=[rsa|dsa]
 

usershow
[username]
Displays a
list of all user accounts, permission levels, and whether
passwords are assigned.


show
/SP/users
 

useradd
username
Adds a user
account to ALOM CMT.


create
/SP/users/
username 

userdel username


userdel -y username 

Deletes a
user account from ALOM CMT. The
-y
option enables you to skip the confirmation question.


delete
/SP/users/
username 


delete
-script /SP/users/
username 

userpassword
[username]
Sets or
changes a user password.


set
/SP/users/
username
password
 

userperm
[
username] [c]
[
u]
[
a]
[
r]
Sets the
permission level for a user account.


set
/SP/users/
username
role=
permissions 


(where permissions
are
Administrator
or
Operator) 

Status
and Control Commands
 
showenvironment
Displays the
environmental status of the host server. This information
includes system temperatures, power supply status, front panel
LED status, hard disk drive status, fan status, voltage, and
current sensor status.

show
-o table -level all /SYS
 
shownetwork
[
-v]
Displays the
current network configuration information. The
-v
option shows additional
information about your network, including information about your
DHCP server.

show
/SP/network
 
console [-f]
Connects to
the host system console. The
-f
option forces the console write lock from one user to another.

start
/SP/console
 


break [-c]


break [-D]

Drops the
host server from running the Solaris OS software into OpenBoot
PROM or
kmdb
depending upon the mode in which the Solaris software was booted.


set
/HOST send_break_action=break
 


set /HOST send_break_action=dumpcore

bootmode
[
normal]
[
reset_nvram]
[config=
configname]
[bootscript=string]
Controls the
host server OpenBoot PROM firmware method of booting.


set
/HOST/bootmode
property=value 


[where
property is state, config,
or
script] 

flashupdate
-s IPaddr -f pathname [-v]
Downloads
and updates system firmware (both host firmware and ALOM CMT
firmware). For ILOM, ipaddr must be a TFTP server. If DHCP
is used, ipaddr can be replace by the name of the TFTP
host.


load
-source tftp://
ipaddr/pathname 


reset [-c]


reset [-y]
[
-c]

Generates a
hardware reset on the host server. The
-y
option enables you to skip the confirmation question.


reset
/SYS
 


reset
-script /SYS
 


powercycle
[-y][-f] 


powercycle
-y


powercycle -f

poweroff
followed by
poweron.
The
-f
option forces an immediate
poweroff,
otherwise the command attempts a graceful shutdown.


stop
/SYS
 


start
/SYS
 


stop
-script /SYS
 


start
-script /SYS
 


stop
-force /SYS
 


start
-force /SYS
 


poweroff


poweroff -y 


poweroff -f 

Removes the
main power from the host server. The
-y
option enables you to skip the confirmation question. ALOM CMT
attempts to shut the server down gracefully. The
-f
option forces an immediate shutdown.


stop
/SYS
 


stop
-script /SYS
 


stop
-force /SYS
 

Poweron Applies the
main power to the host server or FRU.
start
/SYS
 
setlocator
[
on/off]
Turns the
Locator LED on the server on or off.


set
/SYS/LOCATE value=
value 

showfaults
[-v] 
Displays
current valid system faults.


show
/SP/faultmgmt
 

clearfault
UUID
Manually
repairs system faults.


set
/SYS/
component
clear_fault_action=true
 

showlocator Displays the
current state of the Locator LED as either on or off.


show
/SYS/LOCATE
 

FRU
Commands
 
setfru
-c
 data 
The -c
option enables you to store information (such as inventory codes)
on all FRUs in a system.


set
/SYS customer_frudata=
data 

Other
Commands
 
help
[command]
Displays a
list of all ALOM CMT commands with their syntax and a brief
description of how each command works. Specifying a command name
as an option enables you to view the help for that command.
help 


resetsc


resetsc -y 

Reboots ALOM
CMT. The

-y
option enables you to skip
the confirmation question.


reset
/SP
 


reset
-script /SP
 

logout Logs out
from an ALOM CMT shell session.
exit 

Sun RSC Configuration for the v480 & v490

Sun_fire_v490_server
Introduction

This page describes how to setup and manage a Sun RSC (Remote Serial Console) on the v480 and v490, as well as the e250 and e450. I omitted the latter two as those systems are ancient.

Before You Begin

Assign an IP address, netmask and gateway to the server. You must
download the RSC utilities version 2.2.3 or later to the server and run
the utilities before you can configure the server’s RSC.

Steps

  • Log in as root to the V490 or V890 manageable server.
  • Download the RSC version 1.2.3 utilities zip file.Go to http://www.sun.com/servers/rsc.html. Download the zip file appropriate for the Solaris operating system installed on the server:

Solaris 9 or later: rsc2.2.3_packages_s9.zip
Solaris 8: rsc2.2.3_packages_s8.zip
When the download has completed, unzip the file to a temporary directory, and then change directory to the temporary directory.

  • Install the RSC version 2.2.3 packages on the manageable server.

Install the following packages on the server using the pkgadd command:
SUNWrsc – the RSC base package for installation on the host machine
SUNWrscd – the RSC documentation package
SUNWrscj – the RSC GUI package to display the RSC GUI

If you are asked whether to install conflicting files, type Y to override the existing version.

Redirecting the Console to the RSC

After RSC software is installed and configured, the system
console is still available as on any normal Sun machine. To enable RSC
as the system console device instead, you must access the server
console, shut down the system, and type the following commands at the
ok prompt:

ok diag-console rsc

ok setenv input-device rsc-console

ok setenv output-device rsc-console

RSC Commands

The RSC commands are located in the following path:
/usr/platform/SUNW,Sun-Fire-V490/rsc

rsc-config
/usr/platform/SUNW,Sun-Fire-V490/rsc/rsc-config

The command above can be used to configure the RSC.

The rscadm command has many options see below.

rscadm - COMMAND DETAILS
  rscadm help => this message
  rscadm date [-s] | [[mmdd]HHMM | mmddHHMM[cc]yy][.SS] => print or set date
  rscadm set <variable> <value> => set variable to value
  rscadm show [variable] => show variable(s)
  rscadm resetrsc [-s] => reset RSC (-s soft reset)
  rscadm download [boot] <file> => program firmware or [boot] monitor
  rscadm send_event [-c] "message" => send message as event (-c CRITICAL)
  rscadm useradd <username> => add RSC user account
  rscadm userdel <username> => delete RSC user account
  rscadm usershow [username] => show user details
  rscadm userpassword <username> => set user password
  rscadm userperm <username> [cuar] => set user permissions
  rscadm shownetwork => show network configuration
  rscadm loghistory => show RSC event log
  rscadm version => show RSC version

Below is the SHOW option

mail_enabled="false"
ip_mode="config"
ppp_enabled="false"
tpe_link_test="true"
serial_baud="9600"
serial_parity="none"
serial_stop="1"
serial_data="8"
customerinfo=""
ip_addr="xxx.xx.xxx.xxx"
ip_netmask="255.255.xxx.x"
ip_gateway="0.0.0.0"
mailhost=""
mailuser=""
ppp_local_ip_addr="0.0.0.0"
ppp_remote_ip_addr="0.0.0.0"
hostname="xxxxxx"
escape_char="~"

 

 

Handy Crontab Header

# minute (0-59),
# |      hour (0-23),
# |      |       day of the month (1-31),
# |      |       |       month of the year (1-12),
# |      |       |       |       day of the week (0-6 with 0=Sunday).
# |      |       |       |       |       commands
3       2       *       *       0,6     /some/command/to/run
3       2       *       *       1-5     /another/command/to/run