Howto soft partition on Solaris

If we wanna create soft partition on one physical partition, eg: partition 7.
Show capacity partition 7 with command
# format
then choose your disk, eg: disk 0, now press "0"
then enter partition menu with press "p"
then print partition layout, press "p"
we have example for partiton 7 like this :
-------------
7 unassigned wm 207 - 1608 6.80GB (1402/0/0) 14266752

We want to create 3 soft partition with allocation like below :
/opt/data : 3 GB
/opt/data1 : 1 GB
/opt/data2 : 2 GB

Create the soft partitions:
# metainit d701 -p d70 3072M
# metainit d702 -p d70 1024M
# metainit d703 -p d70 2048M

Create a UFS file system on each of the soft partitions:
# newfs /dev/md/dsk/d701
# newfs /dev/md/dsk/d702
# newfs /dev/md/dsk/d703

Add the following entries to the file /etc/vfstab:
/dev/md/dsk/d701 /dev/md/rdsk/d701 /opt/data ufs 2 yes -
/dev/md/dsk/d702 /dev/md/rdsk/d702 /opt/data1 ufs 2 yes -
/dev/md/dsk/d703 /dev/md/rdsk/d703 /opt/data2 ufs 2 yes -

Create the mount points:
# mkdir -p /opt/data
# mkdir -p /opt/data1
# mkdir -p /opt/data2

Mount the file systems:
# mount /opt/data
# mount /opt/data1
# mount /opt/data2

Popular posts from this blog

Howto configure boot device order on ILOM

SAN Switch Config Command

Howto cstm on HP-UX