Play with soft partitions on Solaris part 2

2. Create solaris partition on the disks
# fdisk -W /tmp/partition /dev/rdsk//c1t0d0p0
# fdisk -F /tmp/partition /dev/rdsk//c1t1d0p0
# fdisk -F /tmp/partition /dev/rdsk//c1t2d0p0
# fdisk -F /tmp/partition /dev/rdsk//c1t3d0p0
# fdisk -F /tmp/partition /dev/rdsk//c1t4d0p0



3. We will populate this disk map over the rest of the disks in automatic way to avoid human errors

# prtvtoc /dev/rdsk/c1t0d0s2 > /tmp/c1t0d0s2.toc
# fmthard -s /tmp/c1t0d0s2.toc /dev/rdsk/c1t1d0s2
fmthard:  New volume table of contents now in place
# fmthard -s /tmp/c1t0d0s2.toc /dev/rdsk/c1t2d0s2
fmthard:  New volume table of contents now in place
# fmthard -s /tmp/c1t0d0s2.toc /dev/rdsk/c1t3d0s2
fmthard:  New volume table of contents now in place
# fmthard -s /tmp/c1t0d0s2.toc /dev/rdsk/c1t4d0s2
fmthard:  New volume table of contents now in place


4. And create 2 copies of metadb on each of the 4 disks

# metadb -a -f -c 2 c1t0d0s7 c1t1d0s7 c1t2d0s7 c1t3d0s7 c1t4d0s7


5. Create RAID 5 array

# metainit d5 -r c1t0d0s0 c1t1d0s0 c1t2d0s0 c1t3d0s0 c1t4d0s0
d5: RAID is setup
6. And check the status of array
# metastat d5
d5: RAID
    State: Okay
    Interlace: 32 blocks
    Size: 33091584 blocks (15 GB)
Original device:
    Size: 33094272 blocks (15 GB)
        Device     Start Block  Dbase        State Reloc  Hot Spare
        c1t0d0s0        330        No         Okay   Yes
        c1t1d0s0        330        No         Okay   Yes
        c1t2d0s0        330        No         Okay   Yes
        c1t3d0s0        330        No         Okay   Yes
        c1t4d0s0        330        No         Okay   Yes

Device Relocation Information:
Device   Reloc  Device ID
c1t0d0   Yes    id1,sd@SATA_____VBOX_HARDDISK____VB302359a4-9d8f686a
c1t1d0   Yes    id1,sd@SATA_____VBOX_HARDDISK____VB5a844d32-bae9afe7
c1t2d0   Yes    id1,sd@SATA_____VBOX_HARDDISK____VBb0b0a9e8-72b6d075
c1t3d0   Yes    id1,sd@SATA_____VBOX_HARDDISK____VBc7fe9534-5a7df964
c1t4d0   Yes    id1,sd@SATA_____VBOX_HARDDISK____VB09918bf7-59adb880

No comments:

Post a Comment

Compressed tar archive

There are some cases when you want to create compressed tar archive but you do not have enough disk space to keep original files and tar arc...