Linux menu

Saturday, September 20, 2014

Solaris 11 How to manage the soft partition in SVM


In earlier days SVM (Solaris Volume Manager) called as Solstice Disk suite (SDS) which is available on Solaris 8, 9, and 10. But Soft partition utility was not added on the first release of SDS on Solaris 8, Later they developed and introduced in Solaris 9 with soft partition functionality. Let we can find the necessity of soft partition. Soft partition come to the consideration where we need to subdivided disks or logical Volumes into more than 8 Partitions. It can be created on disk or on top of metadevices as mirror, stripe, or RAID-5 volume. Let we can start........
  • Create a Soft Partition. 
  • Checking the status of Soft Partition.
  • Extend or Expand the Soft Partition. 
  • Remove the Soft Partition.
Creating the Soft Partition on device
Syntax : metainit [-s diskset] soft-partition -p [-e] component size
root@unixrock #
root@unixrock # metainit d300 -p c1t2d0s2 100m
d300: Soft Partition is setup
root@unixrock #
root@unixrock # metastat -c d300
d300             p  100MB c1t2d0s2
root@unixrock #
Creating the Soft Partition on Mirror Device.
root@unixrock # metastat -c d6
d6               m  2.0GB d30 d31
    d30          s  2.0GB c1t2d0s2
    d31          s  2.0GB c1t3d0s2
root@unixrock #
root@unixrock # metainit d300 -p d6 100m
d300: Soft Partition is setup
root@unixrock #
root@unixrock # metastat -c d300
d300             p  100MB d6
    d6           m  2.0GB d30 d31
        d30      s  2.0GB c1t2d0s2
        d31      s  2.0GB c1t3d0s2
root@unixrock #
Creating the Filesystem and mounting the d300
root@unixrock # newfs /dev/md/rdsk/d300
newfs: construct a new file system /dev/md/rdsk/d300: (y/n)? y
/dev/md/rdsk/d300: 204800 sectors in 50 cylinders of 128 tracks, 32 sectors
        100.0MB in 4 cyl groups (16 c/g, 32.00MB/g, 15360 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 65600, 131168, 196736,
root@unixrock #
root@unixrock # mount /dev/md/dsk/d300 /mnt
root@unixrock #
root@unixrock # df -h /mnt
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d300        92M   1.0M    82M     2%    /mnt
root@unixrock #
Extending the Soft partition
root@unixrock #
root@unixrock # metattach d300 100m
d300: Soft Partition has been grown
root@unixrock #
root@unixrock # growfs -M /mnt /dev/md/rdsk/d300
/dev/md/rdsk/d300: 409600 sectors in 100 cylinders of 128 tracks, 32 sectors
        200.0MB in 7 cyl groups (16 c/g, 32.00MB/g, 15360 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 65600, 131168, 196736, 262304, 327872, 393440,

root@unixrock # df -h /mnt
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d300       187M   1.0M   176M     1%    /mnt
root@unixrock #
Removing the Soft partition
root@unixrock # metastat -c d300
d300             p  200MB d6
    d6           m  2.0GB d30 d31
        d30      s  2.0GB c1t2d0s2
        d31      s  2.0GB c1t3d0s2
root@unixrock #
root@unixrock # metaclear d300
d300: Soft Partition is cleared
root@unixrock #
Deleting the all the soft partitions
root@unixrock # metastat -c d300 d301
d300             p  100MB d6
    d6           m  2.0GB d30 d31
        d30      s  2.0GB c1t2d0s2
        d31      s  2.0GB c1t3d0s2
d301             p  100MB d6
    d6           m  2.0GB d30 d31
        d30      s  2.0GB c1t2d0s2
        d31      s  2.0GB c1t3d0s2
root@unixrock #
root@unixrock #
root@unixrock # metaclear -p d6
d300: Soft Partition is cleared
d301: Soft Partition is cleared
root@unixrock #
root@unixrock # metastat -c d300 d301
metastat: unixrock: d301: No such file or directory
root@unixrock #
root@unixrock # metastat -c d6
d6               m  2.0GB d30 d31
    d30          s  2.0GB c1t2d0s2
    d31          s  2.0GB c1t3d0s2
root@unixrock #

No comments: