Professional Documents
Culture Documents
Best Practices For Creation and Implementaion of Soft Partitions
Best Practices For Creation and Implementaion of Soft Partitions
1
Copyright (c) 2020, Oracle. All rights reserved. Oracle Confidential.
Solaris Volume Manager (SVM): Best Practices for Creation and Implementation of Soft
Partitions (Doc ID 1417827.1)
In this Document
Goal
Solution
Creating Soft Partitions from a Single Disk or LUN
Creating Soft Partitions from a Mirror (How to Mirror Soft Partitions).
Creating Soft Partitions from a RAID-5 Metadevice
Growing Soft Partitions
Introduction to the metarecover Command
References
APPLIES TO:
GOAL
Solaris Volume Manager (SVM) was originally implemented to allow creation of software RAID devices from disk drives or
LUNs. These RAID devices (or metadevices) were created from physical partitions on the disk. You could combine physical
disk partitions into stripes or concatentions, mirrors and RAID-5 metadevices.
A limitation existed in that a disk can only have 8 partitions, thus limiting the number of metadevices to 8 per disk. This
may have originally been an acceptable limitation, but as disk sizes increased, the restriction became unmanageable.
This is where soft partitions come into play. Soft partitioning allows a disk to be subdivided into many partitions which are
controlled and maintained by SVM, thereby removing the 8-metadevice limitation per disk.
A soft partition is made up of one or more "extents." Each extent is preceded by an extent header, which is a consistency
record that contains such information as the metadevice (soft partition) name, its status, size, and a checksum. Each
extent header is 1 block (512 bytes) in size.
Extent headers are also referred to as watermarks and are used in administration and recovery.
Soft partitioning was introduced in Solaris 8 with SVM product patch 108693-06.
Note: Do not use Soft Partitions on Operating System file systems. Use only Raid-1 metadevices for root, /usr, /var,
and /opt.
There are new options to the metainit command. The -p option means that the command refers to soft partitions.
Do not use soft partitions unless you plan on making more than 8 metadevices from a disk drive. They serve no purpose
and introduce a new layer of complexity.
SOLUTION
The following examples show how to incorporate best practices when implementing soft partitions.
This approach can be used for individual disks and is also especially useful when a hardware RAID array presents a very
large LUN to the host.
The -e option requires that the name of the disk supplied be in the form c#t#d#.
The last parameter (2gb) specifies the initial size of the soft partition.
The sizes can be specified in blocks, kilobytes, megabytes, gigabytes, and terabytes.
The -e option causes the disk to be repartitioned. One partition (other than 0) will contain enough space to hold a
replica (although no replica is actually created) and slice 0 will be the remainder of the drive. The soft partition that
is being created is put into slice 0.
Further soft partitions can be created on slice 0. See the next example.
This soft partition starts where the previous soft partition ended. No overlap will occur.
Soft partitions may be continually created, providing space is available on the drive.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82skjboz1_119&id=1417827.1 2/7
10/23/2020 Document 1417827.1
NOTE: You can create soft partitions by specifying offsets and block lengths (-o and -b). However, this creates the
possibility of unused space and/or potential overlap. Offsets and lengths should only be specified during recovery
techniques not covered in this article.
A subsequent metastat (-p) will show the soft partitions, and their respective locations on the disk.
# metastat -p
d200 -p c0t10d0s0 -o 4194306 -b 6291456
d100 -p c0t10d0s0 -o 1 -b 4194304
# metastat
d200: Soft Partition
Device: c0t10d0s0
State: Okay
Size: 6291456 blocks (3.0 GB)
Device Start Block Dbase Reloc
c0t10d0s0 0 No Yes
Extent Start Block Block count
0 4194306 6291456
d100: Soft Partition
Device: c0t10d0s0
State: Okay
Size: 4194304 blocks (2.0 GB)
Device Start Block Dbase Reloc
c0t10d0s0 0 No Yes
Extent Start Block Block count
0 1 4194304
The proper method to mirror soft partitions begins with creating a large mirror metadevice from slices, which you then
divide into multiple soft partitions.
NOTE: The metainit command allows you to make mirror metadevices whose components are soft partitions. This
method is not recommended. Do not mirror soft partitions; instead, create them from larger slice-based mirror
metadevices.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82skjboz1_119&id=1417827.1 3/7
10/23/2020 Document 1417827.1
# metastat -p
d1 -m d10 d11 1
d10 1 1 c0t8d0s1
d11 1 1 c0t9d0s1
d100 -p d1 -o 32 -b 2097152
d101 -p d1 -o 2097216 -b 4194304
# metastat
d1: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 17465344 blocks (8.3 GB)
d10: Submirror of d1
State: Okay
Size: 17465344 blocks (8.3 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t8d0s1 0 No Okay Yes
d11: Submirror of d1
State: Okay
Size: 17465344 blocks (8.3 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t9d0s1 0 No Okay Yes
The proper method to configure soft partitions for use in a RAID-5 metadevice begins with creating a large RAID-5
metadevice from slices, which you then divide into multiple soft partitions.
NOTE: The metainit command allows you to make RAID-5 metadevices whose components are soft partitions. This
method is not recommended. Do not configure RAID-5 metadevices using soft partitions; instead, create them from
larger slice-based RAID-5 metadevices.
# metastat -p
d5 -r c0t8d0s1 c0t9d0s1 c0t10d0s1 -k -i 32b
d200 -p d5 -o 32 -b 2097152
d201 -p d5 -o 2097216 -b 6291456
# metastat
d5: RAID
State: Okay
Interlace: 32 blocks
Size: 34930688 blocks (16 GB)
Original device:
Size: 34935360 blocks (16 GB)
Device Start Block Dbase State Reloc Hot Spare
c0t8d0s1 330 No Okay Yes
c0t9d0s1 330 No Okay Yes
c0t10d0s1 330 No Okay Yes
When additional space is added to an existing soft partition, the additional space is taken from any available space
on the same device. It might not be contiguous to the existing soft partition.
Growing soft partitions must be done with free space on the same device as the current soft partition.
In the following example, d100 cannot be contiguously grown, as the extents for d101 are "in the way." Therefore, a
second extent is created in the same slice.
# metastat
d101: Soft Partition
Device: c0t8d0s1
State: Okay
Size: 4194304 blocks (2.0 GB)
Device Start Block Dbase Reloc
c0t8d0s1 0 No Yes
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82skjboz1_119&id=1417827.1 5/7
10/23/2020 Document 1417827.1
Device: c0t8d0s1
State: Okay
Size: 4194304 blocks (2.0 GB)
Device Start Block Dbase Reloc
c0t8d0s1 0 No Yes
# metastat
d101: Soft Partition
Device: c0t8d0s1
State: Okay
Size: 4194304 blocks (2.0 GB)
Device Start Block Dbase Reloc
c0t8d0s1 0 No Yes
metarecover, with the -n and -v options, will list out the soft partitions in a given slice.
The command actually scans the disk slice for extent headers and prints the information that it finds about those
headers.
It will also identify free space and gaps within the slice.
Lastly, metarecover will make sure that the information on the extent matches the information in the replica. When
they do not match, metarecover may be used to effect repairs.
The metarecover command may be run on a "layered" metadevice, such as a mirror, which has soft partitions created
from it. For example:
# metarecover -v -n d1 -p
The following example shows the output of the previous soft partitions (d100 and d101) created from a single slice:
# metarecover -v -n c0t8d0s1 -p
Verifying on-disk structures on c0t8d0s1.
The following extent headers were found on c0t8d0s1.
Name Seq# Type Offset Length
d100 0 ALLOC 0 4194305
d100 1 ALLOC 8388610 8388609
d101 0 ALLOC 4194305 4194305
NONE 0 END 17468014 1
NONE 0 FREE 16777219 690795
Found 2 soft partition(s) on c0t8d0s1.
Checking sequence numbers.
c0t8d0s1: Validating soft partition metadb entries.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82skjboz1_119&id=1417827.1 6/7
10/23/2020 Document 1417827.1
Metadb extent:
Name Seq# Type Offset Length
d101 0 ALLOC 4194305 4194305
Extent header extent:
Name Seq# Type Offset Length
d101 0 ALLOC 4194305 4194305
Metadb extent:
Name Seq# Type Offset Length
d100 1 ALLOC 8388610 8388609
Extent header extent:
Name Seq# Type Offset Length
d100 1 ALLOC 8388610 8388609
How to Troubleshoot and Repair SVM Soft Partitions (Softpartitions) Resolution Path (Doc ID 1494494.1)
REFERENCES
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82skjboz1_119&id=1417827.1 7/7