Sei sulla pagina 1di 3

10/23/2020 Document 1433503.

1
Copyright (c) 2020, Oracle. All rights reserved. Oracle Confidential.

Solaris Volume Manager (SVM): How to Mirror an Existing Soft Partition (Doc ID 1433503.1)

APPLIES TO:

Sun Solaris Volume Manager (SVM) - Version 11.9.0 to 11.10.0 [Release 11.0]
Solaris Operating System - Version 10 10/08 U6 to 10 10/08 U6 [Release 10.0]
Information in this document applies to any platform.

GOAL

Solaris Volume Manager (SVM) soft partitions can be created from RAID-1 (mirror) metadevices. This is the preferred
method as it simplifies management considerably. However, a soft partition can be created directly from a disk or LUN
slice. This article describes the method for mirroring an existing soft partition that has been created directly from a disk or
LUN slice.

SOLUTION

The practice of associating soft partitions as components of mirrors is called layering. You can layer soft partitions as part
of SVM mirror metadevices in two ways:

The first method starts with the creation of a traditional mirror metadevice based on slices. Soft partitions are then
created from the mirror. This is the recommended method. For further details, refer to Document 1417827.1 Solaris
Volume Manager (SVM): Best Practices for Creation and Implementation of Soft Partitions .

The second method is to use the soft partitions as submirrors. This approach is cumbersome, requires additional
metadevice definitions, and can complicate disk replacements. Nevertheless, the metainit command allows this
method. If you choose to mirror soft partitions this way, use the following example as a guide.

We start off with the d40 soft partition, which we want to mirror to d50.

# metainit d40 -p c0t8d0s1 4gb


d40: Soft Partition is setup
# metainit d50 -p c0t9d0s1 4gb
d50: Soft Partition is setup

Soft partitions cannot be used directly as submirrors. If you try to configure one as a submirror, the command will tell you
that the soft partition is invalid.

# metainit d10 -m d40


metainit: myhost: d40: invalid unit

Instead, you first need to make a single metadevice out of the soft partition, followed by creation of the mirror.

Note: This approach will preserve all data on soft partition d40.

# metainit d10 1 1 d40


d10: Concat/Stripe is setup
# metainit d11 1 1 d50
d11: Concat/Stripe is setup
# metainit d1 -m d10
d1: Mirror is setup

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82skjboz1_315&id=1433503.1 1/3
10/23/2020 Document 1433503.1
# metattach d1 d11
d1: submirror d11 is attached

Allow the mirror to synchronize. Check with metastat.

#metastat
d1: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 8388608 blocks (4.0 GB)

d10: Submirror of d1
State: Okay
Size: 8388608 blocks (4.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
d40 0 No Okay No

d40: Soft Partition


Device: c0t8d0s1
State: Okay
Size: 8388608 blocks (4.0 GB)
Device Start Block Dbase Reloc
c0t8d0s1 0 No Yes

Extent Start Block Block count


0 1 8388608

d11: Submirror of d1
State: Okay
Size: 8388608 blocks (4.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
d50 0 No Okay No

d50: Soft Partition


Device: c0t9d0s1
State: Okay
Size: 8388608 blocks (4.0 GB)
Device Start Block Dbase Reloc
c0t9d0s1 0 No Yes

Extent Start Block Block count


0 1 8388608

Before soft partitioning was introduced, metadevices were solely created from disk slices. Since disk slices need to start
and end on cylinder boundaries, a metadevice would always start and end on a cylinder boundary. Soft partitions removed
this requirement. They are defined with the smallest unit of measure on a disk, a 512-byte block. In our example above,
the start and end blocks of our soft partitions just happened to coincide with the start and end locations of the cylinder
boundaries. When this is not true, you will get an error during creation of the metadevice. For example:

# metainit d41 -p c0t3d0s1 3000mb


d41: Soft Partition is setup
# metainit d20 1 1 d41
metainit: myhost: 16384: d20: The necessary rounding would result in data loss. You can
avoid this by concatenating additional devices totaling at least 16384 blocks, or by increasing
the size of the specified component by exactly 16384 blocks.

There are several ways to resolve this. If data on the disk is of no concern, recreate the soft partition with a size divisible
by 512 (1 block = 512 bytes). From our above example, we should use either 3Gb or 3072Mb and proceed with the

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82skjboz1_315&id=1433503.1 2/3
10/23/2020 Document 1433503.1

mirroring strategy.

# metainit d41 -p c0t3d0s1 3072mb


d41: Soft Partition is setup
# metainit d20 1 1 d41
d20: Concat/Stripe is setup

If data needs to be preserved, use the metattach command to add the specified number of blocks. This space is added
to the end of the soft partition. It is not necessarily contiguous with the rest of the soft partition if other soft partitions
have been defined. This is okay. (You can use growfs if desired, to expand a filesystem to take advantage of the added
space.)

# metainit d41 -p c0t3d0s1 3000mb


d41: Soft Partition is setup
# metainit d20 1 1 d41
metainit: myhost: 16384: d20: The necessary rounding would result in data loss. You can
avoid this by concatenating additional devices totaling at least 16384 blocks, or by increasing
the size of the specified component by exactly 16384 blocks.

# metattach d41 16384b


d41: Soft Partition has been grown
# metainit d20 1 1 d41
d20: Concat/Stripe is setup

You can now proceed with mirroring d20 to another similarly constructed metadevice.

Didn't find what you are looking for?

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82skjboz1_315&id=1433503.1 3/3

Potrebbero piacerti anche