Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

EMDC UNIX Ops Procedural Library

<TEMPATE - Technology - Document Title>

1.1 Creating Soft Partitions


There are 3 methods to create a soft partition using the metainit command:

Crete meta devices

1.2 Mirroring Soft Partitions


Once you have created soft partitions, what can you do with them? Well, one thing to do is to
create mirrors out of them. Unfortunately, even though a soft partition is a metadevice, they
cannot serve directly as a submirror. For example:

-p = soft partition is specified.

# metainit d10 -p c1t1d0s2 16g  creating soft partition with whole disk
d10: Soft Partition is setup

# metastat d10
d10: Soft Partition
Device: c1t1d0s2
State: Okay
Size: 33554432 blocks (16 GB)
Device Start Block Dbase Reloc
c1t1d0s2 3636 No No

Extent Start Block Block count


0 3637 33554432
Device Relocation Information:
Device Reloc Device ID
c1t1d0 No -

# metastat –p
d10 -p c1t1d0s2 -o 3637 -b 33554432

Create new FS
# newfs -v /dev/md/rdsk/d10
Mount FS
Add line in /etc/vfstab
/dev/md/dsk/d10 /dev/md/rdsk/d1 /soft-examp ufs 2 yes -

# mount /soft-examp

Check the FS
# df -h /soft-examp
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d10 16G 16M 16G 1% /soft-examp

metainit d10 -p c1t1d0s2 --> soft partition

metainit d27 1 1 c1t1d0s0 --> normal partition

1
EMDC UNIX Ops Procedural Library
<TEMPATE - Technology - Document Title>

Instead, you must first take the soft partition and create a simple concat/stripe out of it. For example:

# metainit d10 -p c1t0d0s0 100m


d10: Soft Partition is setup
# metainit d20 1 1 d10 creating metadevice with d10(instead of c#t#d#)
d20: Concat/Stripe is setup
# metainit d30 -m d20  attaching mirrors
d30: Mirror is setup

# metainit d11 -p c2t0d0s0 100m


d11: Soft Partition is setup
# metainit d21 1 1 d11
d21: Concat/Stripe is setup
# metattach d30 d21
d30: submirror d21 is attached

Once done, the resulting metastat output of the mirror will look like this:

# metastat d30

d30: Mirror
Submirror 0: d20
State: Okay
Submirror 1: d21
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 204624 blocks

d20: Submirror of d30


State: Okay
Size: 204624 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d10 0 No Okay

d10: Soft Partition


Component: c1t0d0s0
State: Okay
Size: 204800 blocks
Extent Start Block Block count
0 1 204800

d21: Submirror of d30


State: Okay
Size: 204624 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d11 0 No Okay

d11: Soft Partition


Component: c2t0d0s0
State: Okay
Size: 204800 blocks
Extent Start Block Block count
0 1 204800 2
EMDC UNIX Ops Procedural Library
<TEMPATE - Technology - Document Title>

1.3 Combining Soft Partitions Together into a RAID5 Device

RAID5 devices can be made up of soft partitions directly. This example shows 4 soft partitions (from 4
separate slices) striped together to make a RAID5 device:

# metainit d1 -p c1t0d0s0 10m


d1: Soft Partition is setup
# metainit d2 -p c2t0d0s0 10m
d2: Soft Partition is setup
# metainit d3 -p c3t0d0s0 10m
d3: Soft Partition is setup
# metainit d4 -p c4t0d0s0 10m
d4: Soft Partition is setup
# metainit d10 -r d1 d2 d3 d4
d10: RAID is setup

Once done, the resulting metastat output of the RAID5 device will look like this:

# metastat d10

d10: RAID
State: Okay
Interlace: 32 blocks
Size: 59472 blocks
Original device:
Size: 60384 blocks
Device Start Block Dbase State Hot Spare
d1 330 No Okay
d2 330 No Okay
d3 330 No Okay
d4 330 No Okay

d1: Soft Partition


Component: c1t0d0s0
State: Okay
Size: 20480 blocks
Extent Start Block Block count
0 1 20480

d2: Soft Partition


Component: c2t0d0s0
State: Okay
Size: 20480 blocks
Extent Start Block Block count
0 1 20480

3
EMDC UNIX Ops Procedural Library
<TEMPATE - Technology - Document Title>

d3: Soft Partition


Component: c3t0d0s0
State: Okay
Size: 20480 blocks
Extent Start Block Block count
0 1 20480

d4: Soft Partition


Component: c4t0d0s0
State: Okay
Size: 20480 blocks
Extent Start Block Block count
0 1 20480

1.4 Using Soft Partitions for MetaTrans (UFS Logging) Devices


MetaTrans devices (UFS logging) can be built on top of soft partitions. Soft partitions can be
used for the master device, the logging device, or both. In the following example, soft partitions
are used for both the master and the logging device:
# metainit d1 -p c1t0d0s0 500m
d1: Soft Partition is setup
# metainit d2 -p c2t0d0s0 50m
d2: Soft Partition is setup
# metainit d10 -t d1 d2
d1: Trans is setup

Once done, the resulting metastat output of the metatrans device will look like this:

# metastat d10
d10: Trans
State: Okay
Size: 1024000 blocks
Master Device: d1
Logging Device: d2

d1: Soft Partition


Component: c1t1d3s0
State: Okay
Size: 1024000 blocks
Extent Start Block Block count
0 1 1024000

d2: Logging device for d10


State: Okay
Size: 102142 blocks

d2: Soft Partition


Component: c1t1d1s0
State: Okay
Size: 102400 blocks 4
EMDC UNIX Ops Procedural Library
<TEMPATE - Technology - Document Title>

Extent Start Block Block count


0 1 102400

1.5 Layering

Most of the time, soft partitions are made on a disk slice. However, there are certain situations where it
can be beneficial to make a soft partition on top of an existing metadevice. This is referred to as layering.

For example, say you have a 90GB RAID5 device made up of 6 18GB disks. You can then take that
90GB device and "split it up" into many soft partitions. These many soft partitions then can be accessed
as separate simple metadevices, although the data in them is protected by the RAID5 parity in the
underlying device.

Soft partitions can be layered only on top of concat/stripes, mirrors, and RAID5 devices. Soft partitions
cannot be layered on top of a metatrans device or directly on top of another soft partition.

Here is an example of layering soft partitions on top of an existing RAID5 metadevice. First, we create
the RAID5 device, then soft partition that device into 3 100MB partitions (obviously, we could create
more than just 3 soft partitions).

# metainit d0 -r c1t0d2s0 c1t0d4s0 c1t1d1s0 c1t1d3s0


d0: RAID is setup

# metainit d1 -p d0 100m
d1: Soft Partition is setup
# metainit d2 -p d0 100m
d2: Soft Partition is setup
# metainit d3 -p d0 100m
d3: Soft Partition is setup

Each of the resulting soft partitions (d1, d2, and d3) can be accessed individually (i.e., newfs and mount).

Soft partitions can be built on top of an existing mirror device as well, just like we did above on the
RAID5 device. In the following example, the mirror device (d0) is "carved up" into 3 smaller soft
partitions.

# metainit d10 1 1 c1t0d2s0


d10: Concat/Stripe is setup
# metainit d20 1 1 c2t0d0s0
d20: Concat/Stripe is setup
# metainit d0 -m d10 d20
d0: Mirror is setup

# metainit d1 -p d0 100m
d1: Soft Partition is setup
# metainit d2 -p d0 100m 5
EMDC UNIX Ops Procedural Library
<TEMPATE - Technology - Document Title>

d2: Soft Partition is setup


# metainit d3 -p d0 100m
d3: Soft Partition is setup

Soft partitions are not allowed to be parented by other soft partitions directly. For example:

# metainit d1 -p c1t0d0s0 100m


d1: Soft Partition is setup
# metainit d2 -p d1 10m
metainit: hostname: d1: invalid unit

Soft partitions also cannot be built on top of trans (UFS logging) devices. For example:

# metainit d1 -t d10 d20


d1: Trans is setup
# metainit d2 -p d1 100m
metainit: hostname: d1: invalid unit

1.6

1.7

1.8

1.9
1.10 Growing Soft Partitions
usclscps001:root> metastat -p d500
d500 5 1 /dev/dsk/emcpower15a \
1 /dev/dsk/emcpower16a \
1 /dev/dsk/emcpower17a \
1 /dev/dsk/emcpower19a \

Here I attach a LUN to metadevice d500


-------------------------------------------
metattach d500 /dev/rdsk/emcpower20a

Now d500 have an internal disk and a LUN from storage

usclscps001:root> metastat -p d500


d500 5 1 /dev/dsk/emcpower15a \
6
EMDC UNIX Ops Procedural Library
<TEMPATE - Technology - Document Title>

1 /dev/dsk/emcpower16a \
1 /dev/dsk/emcpower17a \
1 /dev/dsk/emcpower19a \
1 /dev/dsk/emcpower20a \

metastat -p d500

Here is the command to increase the soft partition /dev/md/dsk/d501


--------------------------------------------------------------------
metattach d501 18g

After you increase the soft partition, you need to increase the filesystem with growfs
------------------------------------------------------------------------------------------
growfs -M /archive /dev/md/rdsk/d501

/archive --> mount point

usclscps001:root> df -h /archive
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d501 19G 1.9G 17G 10% /archive
usclscps001:root>

You might also like