Skip to main content

How to Solaris SVM Metaset

Creating the metaset is a simple process. First of all we define our metaset and add our host to it.
bash-3.00# metaset -s test -a -h avalon
Syntax is pretty straightforward:
  • -s is used to specify which metaset we’re using
  • -a is the add flag. Guess what -d does?
  • -h specifies the hostname which owns this metaset
All metasets are owned by at least one host (it’s how they track who can access them). If you’re in a cluster environment, multiple hosts will own the metaset, allowing the cluster software to move the metadevices between nodes.
For a single hosted metaset, however, we just need to add one host, and we need to make sure that it will automatically take ownership and import the metaset on boot.
All we have to do to make this happen is enable the autotake flag on the metaset:
bash-3.00# metaset -s test -A enable
And that completes the setup of the metaset. We then just select which LUNs we’re interested in, and add them in to the metaset:
bash-3.00# metaset -s test -a c7t60060E80141189000001118900001A10d0 \
c7t60060E80141189000001118900001A17d0 \
c7t60060E80141189000001118900001A17d0 \
c7t60060E80141189000001118900001A19d0

Note that when we add devices to a metaset (disks or LUNs) we need to only specify the device name - not slices, and not s2 (the Solaris way to reference an entire disk by a single reserved slice).
Normally, when you create a metadevice, you are encapsulation a slice that already exists on disk. This means the data stays intact. This is not the case when importing a disk into a metaset.
The act of importing a disk re-partitions it. All existing partitions are deleted, with a tiny slice on s7 being created to store the metadb replica, and the rest given over to s0. Note that s2 - the usual way of addressing a disk in Solaris - is also removed.
Here’s what the partitions look like on our root disk:

bash-3.00# prtvtoc /dev/dsk/c1t0d0s2
* /dev/dsk/c1t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*     107 sectors/track
*      27 tracks/cylinder
*    2889 sectors/cylinder
*   24622 cylinders
*   24620 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00    8389656  23071554  31461209
       1      3    01          0   8389656   8389655
       2      5    00          0  71127180  71127179
       5      7    00   31461210  20974140  52435349
       6      0    00   52435350  18625383  71060732
       7      0    00   71060733     66447  71127179
And here’s what they look like on a LUN that’s part of the metaset:
bash-3.00# prtvtoc /dev/dsk/c7t60060E80141189000001118900001A10d0s0
* /dev/dsk/c7t60060E80141189000001118900001A10d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*     512 sectors/track
*      15 tracks/cylinder
*    7680 sectors/cylinder
*   13653 cylinders
*   13651 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      4    00      15360 104824320 104839679
       7      4    01          0     15360     15359
We can query the metaset and have a look at it’s contents, to check everything is OK:

bash-3.00# metaset -s test

Set name = test, Set number = 5
Host Owner
avalon Yes (auto)
Drive Dbase
/dev/dsk/c7t60060E80141189000001118900001A10d0 Yes
/dev/dsk/c7t60060E80141189000001118900001A17d0 Yes
/dev/dsk/c7t60060E80141189000001118900001A18d0 Yes
/dev/dsk/c7t60060E80141189000001118900001A19d0 Yes
Once we’ve populated our metaset, we create metadevices as normal. The only extras we need when using the metainit command is that we need to specify which metaset we’re using, and that we’ll always be using s0.
Let’s create a single metadevice striped across all 4 LUNs in our metaset:
bash-3.00# metainit -s test d100 1 4 /dev/dsk/c7t60060E80141189000001118900001A10d0s0 \
/dev/dsk/c7t60060E80141189000001118900001A17d0s0 \
/dev/dsk/c7t60060E80141189000001118900001A18d0s0 \
/dev/dsk/c7t60060E80141189000001118900001A19d0s0

metainit works in the same way it’s always done - we need to specify the full path to the slice we’re using - but with the additional -s flag to tell metainit which metaset we want to add the metadevice to.
We can use the summary flag to metastat (sorry, Solaris 10 only) to show us the summary of what we’ve just configured:

bash-3.00# metastat -c -s test
dbt/d100     s  199GB /dev/dsk/c7t60060E80141189000001118900001A10d0s0 \
/dev/dsk/c7t60060E80141189000001118900001A17d0s0 \
/dev/dsk/c7t60060E80141189000001118900001A18d0s0 \
/dev/dsk/c7t60060E80141189000001118900001A19d0s0

metasets are an easy way to group together storage and filesystems in Solaris, especially where the storage is external to your host, and you’d like the flexibility of importing it to another host in the future - for example, as part of some DR work if the host fails.

 

Comments

Last Week Topics

How to Force The Database Open With `_ALLOW_RESETLOGS_CORRUPTION

This is an internal note from Oracle. Forcing The Database Open With `_ALLOW_RESETLOGS_CORRUPTION` with Automatic Undo Management ( Doc ID 283945.1 ) Warning The following instructions should only be used under the explicit direction of Oracle Support. These steps should only be used when all other conventional means of recovering the database have failed. Please note that there is no guarantee that this method will succeed. IF THE STEPS BELOW DO ALLOW YOU TO OPEN YOUR DATABASE THEN IT IS ESSENTIAL THAT THE DATABASE BE REBUILT AS IT IS NO LONGER SUPPORTED. FAILURE TO DO SO MAY LEAD TO DATA DICTIONARY INCONSISTENCIES, INTERNAL ERRORS AND CORRUPTIONS. ** Note: The steps here apply to Oracle 9i or higher and only and when Automatic Undo Management is being used. ** Steps to attempt to force the database open: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1) Backup the database while the database is closed. THE INSTRUCTIONS HERE ARE DESTRUCTIVE. YOU ARE STRONGLY A

How to reorganize tables with brspace commands.

Brspace use internally Oracle DBMS_REDEFINITION. If you have SAP with Oracle, this is a very fast way to reorganize object in Oracle Database. In this example we will organize simultaneously S562,MLPPF and MLCRP tables. Important : If you want to reorganize various tables and indexes, these must reside in same tablespace. 1- Tables reorganization. brspace -p /oracle/PRD/102_64/dbs/initPRD.sap -c force -s 20 -l E -f tbreorg -a reorg -s PSAPSR3 -o SAPSR3 -t "S562,MLPPF,MLCRP" -n PSAPSR3 -e 16 -p 16 -m online *  /oracle/PRD/102_64/dbs/initPRD.sap : SAP Parameter file * PSAPSR3 : Source tablespace * SAPSR3  : Table owner * PSAPSR3 :  Destiny tablespace. * -e 16 -p 16 -m :  It indicates how many parallel processes that will perform the operation,in this case are 16. * online : It indicates that the reorganization of the tables will be made ONLINE 2- After tables reorganization you will need to rebuild the S562,MLPPF and MLCRP indexes tables . brspac

How to break a bonded network interface red hat

1.- Bonding device called bond0 which aggregated by eth0 and eth1 # ifconfig bond0     Link encap:Ethernet  HWaddr 44:a8:42:5d:6d:5d           inet addr:192.168.1.51  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::5054:ff:fe4d:9004/64 Scope:Link           UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1 eth0      Link encap:Ethernet  HWaddr 44:a8:42:5d:6d:5d           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1 eth2      Link encap:Ethernet  HWaddr 44:a8:42:5d:76:29           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1           RX packets:6 errors:0 dropped:0 overruns:0 frame:0 # cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: fault-tolerance (active-backup) Primary Slave: em1 (primary_reselect always) Currently Active Slave: em1 MII Status: up MII Polling Interval (ms): 50 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Speed: 10000

OSWatcher analysis Solaris/Oracle Linux for DataBases

ORACLE DATABASE 10 or greater ORACLE SOLARIS SPARC 1.  As "root" use create  OSWatcher startup/stop script (startOSWbb.sh) # uname -a SunOS solaristest  5.10 Generic_150-400 # pwd /etc/init.d # cat OSW_init.sh  OSW_SRC_DIR= <<<<----- Modify this to reflect your OS Watcher source directory echo $OSW_SRC_DIR echo "******************************************************" >> $OSW_SRC_DIR/init_osw.log case $1 in 'start') echo "...Starting OSWBB from init at `date` " >> $OSWBB_SRC_DIR/init_osw.log cd $OSWBB_SRC_DIR; ./startOSWbb.sh ;; 'stop') echo "...Stopping OSWBB from init at `date` " >> $OSWBB_SRC_DIR/init_osw.log cd $OSW_SRC_DIR; ./stopOSWbb.sh ;; *) echo "Usage: $0 start|stop" >&2 exit 1 ;; esac exit 0   2.  Add "execute" permissions on this script: #chmod +x OSW_init.sh 3.  Create a soft link to this script fr

HOW TO ENABLE A VIRTUAL INTERFACE (VNIC) SOLARIS 10

HOW TO ENABLE A VIRTUAL INTERFACE (VNIC) SOLARIS 10 1.-Verify the interfaces on the server that you need to add the ip in this example 10.1.1.8 # dladm show-phys LINK CLASS MTU STATE OVER bge0 phys 1500 unknown -- bge1 phys 1500 up --    2.-Now you need to create a virtual network interface or VNIC on the server #ifconfig bge1:1 plumb #ifconfig -a 3.-Finally you can add the new ip address and add on the server in /etc/hostname.bge1:1 the IP or the name that you defined on the hosts file with that ip #vi /etc/hostname.bge1:1 10.1.1.8 #ifconfig bge1:1 10.1.1.8 netmask 255.255.255.0 broadcast 10.1.1.254 up Regards Roger    

HOW TO CHANGE HOSTNAME RED HAT LINUX

HOW TO CHANGE HOSTNAME RED HAT LINUX 1.-Validate Hostname and host file that you need to change #hostname rhel #cat /etc/hosts 127.0.0.1  localhost 192.168.1.13  rhel 2.-Edit the following file in order to change HOSTNAME #vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=TEST GATEWAY=192.168.1.1 3.-When you are ready and you save the information you will need to edit the hosts file #vi /etc/hosts 127.0.0.1  localhost 192.168.1.13  test 4.- Finally you will need to restart de network services #service network restart #hostname test

FAN Fully Automated Nagios monitoring tool

If you need install an application to monitor, with a simple installation and no many configuration or compilation, you can use FAN versiĆ³n 2.1 We have a tool that is integrated with Nagios, Centreon, Nagvis and DocuWiki OS Centos 5.9 Centreon 2.4.1 Nagvis 1.7 Nagios and DocuWiki You can download the ISO and Documentation from the following link, it is a very easy software to install in order to monitor the servers. http://www.fullyautomatednagios.org/

HOW TO INSTALL RSYNC SOLARIS 10 FOR SPARC PLATFORMS

HOW TO INSTALL RSYNC 3.1.1 SOLARIS 10 1.-Download the following packages   libintl-3.4.0-sol10-sparc-local.gz rsync.3.1.1.SPARC.32bit.Solaris.10.pkg libiconv.1.14.SPARC.32bit.Solaris.10.pkg   2.-Once you have the packages on the server you can do the following steps   libintl-3.4.0-sol10-sparc-local.gz rsync.3.1.1.SPARC.32bit.Solaris.10.pkg libiconv.1.14.SPARC.32bit.Solaris.10.pkg    3.-  Unzip the packages that are compressed and install them with pkgadd. #gunzip libintl-3.4.0-sol10-sparc-local.gz #pkgadd –d libintl-3.4.0-sol10-sparc-local   #pkgadd –d  rsync.3.1.1.SPARC.32bit.Solaris.10.pkg #pkgadd –d libiconv.1.14.SPARC.32bit.Solaris.10.pkg And now you can use the rsync Regards Roger   

How to install Oracle Directory Server 11 Solaris 10

Createl DSCC Registry that is   Directory Server Manager for LDAP server administration root@ldapserv1:/opt/ODSEE_ZIP_Distribution/dsee7/bin# ./dsccsetup ads-create Choose password for Directory Service Manager: Confirm password for Directory Service Manager: Creating DSCC registry... DSCC Registry has been created successfully Deploy the directory server root@ldapserv1:/opt/ODSEE_ZIP_Distribution/dsee7/bin# ./dsccsetup war-file-create Created /opt/ODSEE_ZIP_Distribution/dsee7/var/dscc7.war 1636 /opt/dsInst Choose the Directory Manager password: <Password Directory Manager> Confirm the Directory Manager password: <Password Directory Manager> Starting the instance created with dsadm Use command 'dsadm start '/opt/dsInst'' to start the instance oot@ldapserv1:/opt/ODSEE_ZIP_Distribution/dsee7/bin# ./dsadm start '/opt/dsInst' Directory Server instance '/opt/dsInst' started: pid=19325 Create the suffix   and port that will be used,