Creating Soft Partition On Solaris 10
Creating Soft Partition On Solaris 10
When defining a stripe create equal slices on both hard disks. Under Solaris SPARC you can have a
maximum to 7 slices per disk. The slice 0 holds the root, slice 1 represent the swap and slice 7 holds
the /export/home used under this system. The system has two IDE channels (t0, t1), but there is only
one IDE controller (c1).
Allocated = 2215
Free = 11 872
The above table shows the default partition table which is created during installation of Solaris 10.
1. Login as root
a. # df –h
b. # format disk0
c. #format > partition
d. # partition> print
e. # partition > 3
i. New cylinder : 906
ii. Partition size : 40 GB
f. # partition > 4
i. New cylinder : 5028
ii. Partition size: 40 GB
2. You should label the other disk.
a. # format
b. # format> partition
c. # Partition >modify? yes
1
d. # partition > name
i. tst
e. # partition > exit
f. # format > save
g. # format > quit
On this system, we have two disks to mirror. The first disk will be the primary disk and the second will be
the mirror. The disks are:
Disk 1: c1t0d0
Disk 2: c1t1d0
The partitions on the disks are presented below. Please note that each disk should be partitioned exactly
the same, otherwise the mirror would produce an error.
Disk 1:
c1t0d0s0: /
c1t0d0s1: swap
c1t0d0s2: Backup
c1t0d0s3: unassigned
c1t0d0s4: unassigned
c1t0d0s5: unassigned
Free- Space
c1t0d0s6: unassigned
c1t0d0s7: /export/home
# metadb - a – f /dev/dsk/c1t0d0s3
# metadb - a /dev/dsk/c1t0d0s4
# metadb -a -f /dev/dsk/c1t1d0s3
# metadb - a /dev/dsk/c1t1d0s4
2
C1t0d0s0 RAID1 d1 RAID1 C1t1d0s0
d1 d12
C1t1dos0
C1t0d0s0
C1t0d0s1 C1t1dos1
d21 d22
Swap (8.79 GB) Swap (8.79 GB)
Soft
C1t0d0s2 /wlogic (5 GB) d43 d44 /D01 (5 GB)
Partitions
C1t1dos2
Backup (136.71 GB)
Backup (136.71 GB)
d4
C1t0d0s3 RAID1 RAID1
C1t1dos3
Unassigned (40 GB) d41 d42 Unassigned (40 GB)
3
Create for the / (root) file system.
After mirroring the root partition, we need to run the metaroot command. This command will update
the root entry in the /etc/vfstab with the new metadevice as well as add the appropriate configuration
information into the /etc/system. If you missed out to run the metaroot command before reboot, you
will not be able to boot the system.
# metainit d2 –m d21
Create SubMirrors
# metainit d4 –m d41
# metainit d5 –m d51
# metainit d3 –m d31
4
Create soft partition form d4 and d5
# metainit d43 –p d4 5g
# metainit d44 –p d4 5g
# metainit d53 –p d5 7g
# newfs /dev/md/dsk/d43
Create mount point for the four soft partition just created.
# newfs /dev/md/dsk/d44
Create mount point for the four soft partition just created.
# newfs /dev/md/dsk/d53
Create mount point for the four soft partition just created.
# newfs /dev/md/dsk/d54
Create mount point for the four soft partition just created.
Login as root
# mkdir /oracle
# mkdir /Data
# mkdir /wlogic
5
# mkdir /D01
Updating /etc/vfstab
The /etc/vfstab file must be updated at this point to reflect the changes made to the system. The /
partition will have already been updated through the metaroot command run earlier, but the system
needs to know about new devices for /oracle, /wlogic, /data and /D01.
The system can now be rebooted. When it comes back up it will be running off the new metadevices.
Use the df command to verify this. In the following section, we will attach the second half of the mirrors
and allow the two disks to synchronize.
The progress of the synchronization can be monitored using the metastat command.
# metattach d1 d12
6
# metattach d2 d22
# metattach d3 d32
# metattach d4 d42
# metattach d5 d52