Sponsored Content
Operating Systems Solaris metadevice submirrors 0 and 1 not consistent Post 302431600 by Max Power on Tuesday 22nd of June 2010 08:38:58 AM
Old 06-22-2010
metadevice submirrors 0 and 1 not consistent

At a new job, I've inherited a handful of Solaris 10 SunFire V240 servers.

I noticed that the metadevices are not consistent, in a way that I've not seen before....

internal mirrored disks:

metadevice d60 has c1t0d0s6 as submirror 0 (d61) and c1t1d0s6 as submirror 1 (d62)

metadevice d40 has c1t1d0s4 as submirror 0 (d42) and c1t0d0s4 as submirror 1 (d41)

etc....

Is this a problem? It is certainly strange. Half the mirrors have disk c1t0d0 as submirror 0 and c1t1d0 as submirror 1. The other half of the mirrors have disk c1t1d0 as submirror 0 and disk c1t0d0 as submirror 1.

I think I know how it happened:
When the previous sysadmin installed recommended patches, the mirrors were broken (some, but not all) and then a few days later the devices were synced (metattach). By only breaking some of the mirrors to install the patches, and then rebooting, things got "reversed" in metadeviceland.

Is this a problem? What happens if disk c0t0d0 dies, and needs to be replaced?


Here is an example. 3 metadevices on this system are one way, and 3 are the other way, with respect to their submirrors:


Code:
$ metastat | more
d60: Mirror
    Submirror 0: d61
      State: Okay
    Submirror 1: d62
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 8395200 blocks (4.0 GB)

d61: Submirror of d60
    State: Okay
    Size: 8395200 blocks (4.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s6          0     No            Okay   Yes

d62: Submirror of d60
    State: Okay
    Size: 8395200 blocks (4.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t1d0s6          0     No            Okay   Yes

d40: Mirror
    Submirror 0: d42
      State: Okay
    Submirror 1: d41
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16780224 blocks (8.0 GB)

d42: Submirror of d40
    State: Okay
    Size: 16780224 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t1d0s4          0     No            Okay   Yes

d41: Submirror of d40
    State: Okay
    Size: 16780224 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s4          0     No            Okay   Yes


Last edited by Scott; 06-22-2010 at 10:11 AM.. Reason: Please use code tags
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

keep UIDs/GIDs consistent

Hi, What is the best ways to keep UIDs and GIDs consistent across unix and linux server. my company have a servers running on hpux, linux, aix and many of them have veritas cluster and hacmp running, many time user account have been created only on one of the cluster node and not the others... (4 Replies)
Discussion started by: robertngo
4 Replies

2. Shell Programming and Scripting

Trouble getting consistent PID of tomcat server from ps

Hello all, I am working on a script to automate the process of restarting some tomcat servers. The versions of tomcat are pretty old and it often happens that they don't shut down gracefully and the PID needs to be manually killed. I am having a bear of a time getting a consistent PID from ps... (1 Reply)
Discussion started by: dkaplowitz
1 Replies

3. Shell Programming and Scripting

Negate alerting for particular metadevice.

Hi All... I have a script that checks for any problems(particularly looks for 'Needs Maintenance') with metadevices and alerts accordingly. This was not configured to alert for a particular metadevice. Now i want to negate alerting for a particular metadevice(say d40). Is this possible? I am... (6 Replies)
Discussion started by: reddybs
6 Replies

4. Solaris

Unable to mount Metadevice

Hi, I am running Solaris 8 on a V880 which has recently crashed. It has got a fibre connection to a StorageTrek array containing my database info. Since the crash I have been unable to mount the 2 metadevices which correspond to /spool & /apps - these FS's contain my db info and theredore I... (20 Replies)
Discussion started by: Duffs
20 Replies

5. Solaris

metadevice problem

hi all i am very new to solaris...i am trying configure raid 0 in my ultrascsi box which is having 6 sun36GB hard disks. I have created 4 state database replicas in the following slices /dev/dsk/c1t1d0s7 /dev/dsk/c1t2d0s7 /dev/dsk/c1t3d0s7 and /dev/dsk/c1t4d0s7. i could not use any other... (7 Replies)
Discussion started by: kingston
7 Replies

6. Shell Programming and Scripting

How to echo columns with consistent spacing?

for (.....) echo -e "$Name | $Age | $Sex\t|$Grade\t\t" done output: John |12 |Male |6th Jack |15 |Male |8th Zachary |15 |Male |9th I want the lines to line up...but it's out of line when the name is long (2 Replies)
Discussion started by: etranman1
2 Replies

7. Solaris

Submirrors swapped after metattach

We had few mirror disks e.g d0 had two submirrors Submirror 0: d2 Submirror 1: d1 I opened mirrors for some activity. by command metadetach d0 d2 After activity I reattach mirrors with command metattach d0 d2 But after that strangely sumirror position is swaped ... (3 Replies)
Discussion started by: kashif_islam
3 Replies

8. Solaris

Metadevice Too Small To Attach

Hi All, I am having trouble with my metadevices and I hope someone can help. when i try to attach my submirror i get the following error: root@xxxx>metattach d31 d21 metattach: tbair1: d21: submirror too small to attach root@xxxx> However, There is a submirror on the other disk which is... (3 Replies)
Discussion started by: A-Train
3 Replies

9. UNIX for Beginners Questions & Answers

Scripts dont give a consistent output..

I have at moment created a setup script that is capable of setting up a workspace for an kaldi enviroment. The script can be found here setup_base_file I guess you wouldn't not be able to run it, without having Kaldi installed, but since this question more relates to scripting, than the... (9 Replies)
Discussion started by: kidi
9 Replies
metastat(1M)						  System Administration Commands					      metastat(1M)

NAME
metastat - display status for metadevice or hot spare pool SYNOPSIS
/usr/sbin/metastat -h /usr/sbin/metastat [-a] [-B] [-D] [-c] [-i] [-p] [-q] [-s setname] [-t] [metadevice...] [hot_spare_pool...] /usr/sbin/metastat [-a] [-B] [-D] [-c] [-i] [-p] [-q] [-s setname] component... DESCRIPTION
The metastat command displays the current status for each metadevice (including stripes, concatenations, concatenations of stripes, mir- rors, RAID5, soft partitions, and trans devices) or hot spare pool, or of specified metadevices, components, or hot spare pools. It is helpful to run the metastat command after using the metattach command to view the status of the metadevice. metastat displays the state of each Solaris Volume Manager RAID-1 volume on the system. The possible states include: Okay The device reports no errors. Needs maintenance A problem has been detected. This requires that the system administrator replace the failed physical device. Volumes displaying Needs maintenance have incurred no data loss, although additional failures could risk data loss. Take action as quickly as possible. Last erred A problem has been detected. Data loss is a possibility. This might occur if a component of a submirror fails and is not replaced by a hot spare, therefore going into Needs maintenance state. If the corresponding component also fails, it would go into Last erred state and, as there is no remaining valid data source, data loss could be a possibility. Unavailable A device cannot be accessed, but has not incurred errors. This might occur if a physical device has been removed with Solaris Dynamic Reconfiguration (DR) features, thus leaving the Solaris Volume Manager volume unavailable. It could also occur if an array or disk is powered off at system initialization, or if a >1TB volume is present when the system is booted in 32-bit mode. After the storage has been made available, run the metastat command with the -i option to update the status of the metadevices. This clears the unavailable state for accessible devices. See the for instructions on replacing disks and handling volumes in Needs maintenance or Last erred states. OPTIONS
The following options are supported: -a Display all disk sets. Only metadevices in disk sets that are owned by the current host are displayed. -B Display the current status of all of the 64-bit metadevices and hot spares. -c Display concise output. There is one line of output for each metadevice. The output shows the basic structure and the error status, if any, for each metadevice. The -c output format is distinct from the -p output format. The -p option does not display metadevice status and is not intended as human-readable output. -D Display the current status of all of the descriptive name metadevices and hotspares. -h Display usage message. -i Check the status of RAID-1 (mirror) volumes, RAID-5 volumes, and hot spares. The inquiry checks each metadevice for accessi- bility, starting at the top level metadevice. When problems are discovered, the metadevice state databases are updated as if an error had occurred. -p Display the list of active metadevices and hot spare pools in the same format as md.tab. See md.tab(4). The -p output is designed for snapshotting the configuration for later recovery or setup. -q Display the status for metadevices without the device relocation information. -s setname Specify the name of the disk set on which metastat works. Using the -s option causes the command to perform its administra- tive function within the specified disk set. Without this option, the command performs its function on metadevices and hot spare pools in the local disk set. -t Display the current status and timestamp for the specified metadevices and hot spare pools. The timestamp provides the date and time of the last state change. OPERANDS
The following operands are supported: component Display the status of the component hosting a soft partition, including extents, starting blocks, and block count. hot_spare_pool Display the status of the specified hot spare pool(s). metadevice Display the status of the specified metadevice(s). If a trans metadevice is specified, the status of the master and log devices is also displayed. Trans metadevices have been replaced by UFS logging. See NOTES. EXAMPLES
Example 1 Output Showing Mirror with Two Submirrors The following example shows the partial output of the metastat command after creating a mirror, opt_mirror, consisting of two submirrors, opt_sub1 and opt_sub2. # metastat opt_mirror opt_mirror: Mirror Submirror 0: opt_sub1 State: Okay Submirror 1: opt_sub2 State: Resyncing Resync in progress: 15 % done Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size: 2006130 blocks . . . Example 2 Soft Partition on Mirror with Submirror The following example shows the partial output of the metastat command after creating a soft partition, d3, on concat d2, which is built on a soft partition. # metastat d2: Concat/Stripe Size: 204800 blocks Stripe 0: Device Start Block Dbase State Hot Spare d0 0 No Okay d0: Soft Partition Component: c0t3d0s0 Status: Okay Size: 204800 blocks Extent Start Block Block count 0 129 204800 d3: Soft Partition Component: d2 Status: Okay Size: 202752 blocks Extent Start Block Block count 0 129 202752 Example 3 Trans Metadevice The following example shows the output of the metastat command after creating a trans metadevice. # metastat d2: Concat/Stripe Size: 204800 blocks Stripe 0: Device Start Block Dbase State Hot Spare d0 0 No Okay d0: Soft Partition Component: c0t3d0s0 Status: Okay Size: 204800 blocks Extent Start Block Block count 0 129 204800 d3: Soft Partition Component: d2 Status: Okay Size: 202752 blocks Extent Start Block Block count 0 129 202752 Example 4 Multi-owner disk set The following example shows the output of the metastat command with a multi-owner disk set and application-based mirror resynchronization option. Application-based resynchronization is set automatically if needed. # metastat -s oban oban/d100: Mirror Submirror 0: oban/d10 State: Okay Submirror 1: oban/d11 State: Okay Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Resync option: application based Owner: None Size: 1027216 blocks (501 MB) oban/d10: Submirror of oban/d100 State: Okay Size: 1027216 blocks (501 MB) Stripe 0: Device Start Block Dbase State Reloc Hot Spare c1t3d0s0 0 No Okay oban/d11: Submirror of oban/d100 State: Okay Size: 1027216 blocks (501 MB) Stripe 0: Device Start Block Dbase State Reloc Hot Spare c1t4d0s0 0 No Okay WARNINGS
metastat displays states as of the time the command is entered. It is unwise to use the output of the metastat -p command to create a md.tab(4) file for a number of reasons: o The output of metastat -p might show hot spares being used. o It might show mirrors with multiple submirrors. See metainit(1M) for instructions for creating multi-way mirrors using metainit and metattach. o A slice may go into an error state after metastat -p is issued. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWmdr | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
mdmonitord(1M), metaclear(1M), metadb(1M), metadetach(1M), metahs(1M), metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metarecover(1M), metarename(1M), metareplace(1M), metaroot(1M), metaset(1M), metassist(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4), mddb.cf(4), md.tab(4), attributes(5), md(7D) NOTES
Trans metadevices have been replaced by UFS logging. Existing trans devices are not logging--they pass data directly through to the under- lying device. See mount_ufs(1M) for more information about UFS logging. SunOS 5.11 26 Mar 2006 metastat(1M)
All times are GMT -4. The time now is 06:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy