1.1 Creating Soft Partitions: EMDC UNIX Ops Procedural Library
1.1 Creating Soft Partitions: EMDC UNIX Ops Procedural Library
1.1 Creating Soft Partitions: EMDC UNIX Ops Procedural Library
# 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
# 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
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:
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
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:
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
3
EMDC UNIX Ops Procedural Library
<TEMPATE - Technology - Document Title>
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
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 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 d1 -p d0 100m
d1: Soft Partition is setup
# metainit d2 -p d0 100m 5
EMDC UNIX Ops Procedural Library
<TEMPATE - Technology - Document Title>
Soft partitions are not allowed to be parented by other soft partitions directly. For example:
Soft partitions also cannot be built on top of trans (UFS logging) devices. For example:
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 \
1 /dev/dsk/emcpower16a \
1 /dev/dsk/emcpower17a \
1 /dev/dsk/emcpower19a \
1 /dev/dsk/emcpower20a \
metastat -p d500
After you increase the soft partition, you need to increase the filesystem with growfs
------------------------------------------------------------------------------------------
growfs -M /archive /dev/md/rdsk/d501
usclscps001:root> df -h /archive
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d501 19G 1.9G 17G 10% /archive
usclscps001:root>