Toturial kali digunakan untuk mirror disk pada solaris 10, yang fungsinya sama seperti RAID 1 (mirror). Berikut step by stepnya.

1. Multipath /detec HBA ( Otomatis nama dari c0t0d0 akan berubah)
stmsboot -e

2. Melihat disk
df -h            # Lihat partisi ufs yang ada
cd /dev/rdsk/    # liat disk

(EXAMPLE)
c3t5000C5000BB69B3Fd0    = disk 0
c3t5000C5000BB6B263d0    = disk 1

3. Copy partition Table dari HDD 0 ke HDD1
prtvtoc /dev/rdsk/c3t5000C5000BB69B3Fd0s2 | fmthard -s – /dev/rdsk/c3t5000C5000BB6B263d0s2
            ( HDD 0 )                                                                            ( HDD 1    )

4. Create database metadb di Slide 7
metadb -a -c4 -f c3t5000C5000BB69B3Fd0s7 c3t5000C5000BB6B263d0s7

5. Create metadevice partisi root
metainit -f d11 1 1 c3t5000C5000BB69B3Fd0s0
            ( HDD 0 )
d11: Concat/Stripe is setup                    #hasil

6. Cek status
metastat -p
d11 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s0    #hasil

7. Create Mirror
[email protected] # metainit -f d10 -m d11
d10: Mirror is setup

[email protected] # metastat -p
d10 -m d11 1
d11 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s0

8. Karena ada partisi root di d10 maka harus menjalankan metaroot
metaroot d10     ## Khusus buat partisi root

################# Info Partition #####################
[email protected] # df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c3t5000C5000BB69B3Fd0s0
                        20G    12G   8.0G    60%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   109G   1.7M   109G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
fd                       0K     0K     0K     0%    /dev/fd
/dev/dsk/c3t5000C5000BB69B3Fd0s3
                        20G   1.9G    18G    10%    /var
swap                   109G    32K   109G     1%    /tmp
swap                   109G    80K   109G     1%    /var/run
/dev/dsk/c3t5000C5000BB69B3Fd0s5
                       485M   1.0M   435M     1%    /globaldevices
                      
#########################################################                       

9. Selanjutnya sama seperti diatas membuat mirror
[email protected] # metainit -f d21 1 1 c3t5000C5000BB69B3Fd0s1 (s1=swap)
d21: Concat/Stripe is setup

[email protected] # metainit -f d20 -m d21
d20: Mirror is setup

[email protected] # metastat -p
d20 -m d21 1
d21 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s1
d10 -m d11 1
d11 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s0

[email protected] # metainit -f d31 1 1 c3t5000C5000BB69B3Fd0s3
d31: Concat/Stripe is setup

[email protected] # metainit -f d30 -m d31
d30: Mirror is setup

[email protected] # metainit -f d51 1 1 c3t5000C5000BB69B3Fd0s5
d51: Concat/Stripe is setup

[email protected] # metainit -f d50 -m d51
d50: Mirror is setup

[email protected] # metastat -p
d50 -m d51 1
d51 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s5
d30 -m d31 1
d31 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s3
d20 -m d21 1
d21 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s1
d10 -m d11 1
d11 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s0

10. Kemudia liat di /etc/vfstab
[email protected] # cat /etc/vfstab
#device                             device                              mount               FS      fsck    mount   mount
#to mount                           to fsck                             point               type    pass    at boot options
#
fd                                  –                                   /dev/fd             fd      –       no      –
/proc                               –                                   /proc               proc    –       no      –
/dev/dsk/c3t5000C5000BB69B3Fd0s1    –                                   –                   swap    –       no      –
/dev/md/dsk/d10                     /dev/md/rdsk/d10                    /                   ufs     1       no      –
/dev/dsk/c3t5000C5000BB69B3Fd0s3    /dev/rdsk/c3t5000C5000BB69B3Fd0s3   /var                ufs     1       no      –
/dev/dsk/c3t5000C5000BB69B3Fd0s5    /dev/rdsk/c3t5000C5000BB69B3Fd0s5   /globaldevices      ufs     2       yes     –
/devices                            –                                   /devices            devfs   –       no      –
sharefs                             –                                   /etc/dfs/sharetab   sharefs –       no      –
ctfs                                –                                   /system/contract    ctfs    –       no      –
objfs                               –                                   /system/object      objfs   –       no      –
swap                                –                                   /tmp                tmpfs   –       yes     –

Edit /etc/vfstab , mengikuti /dev/md/dsk/d10 /dev/md/rdsk/d10
[email protected] # vi /etc/vfstab
“/etc/vfstab” 14 lines, 593 characters
#device         device              mount               FS      fsck    mount   mount
#to mount       to fsck                point               type    pass    at boot options
#
fd              –                   /dev/fd fd              –       no      –
/proc              –                   /proc               proc    –       no      –
/dev/md/dsk/d20 –                   –                   swap    –       no      –
/dev/md/dsk/d10 /dev/md/rdsk/d10    /                   ufs     1       no      –
/dev/md/dsk/d30 /dev/md/rdsk/d30    /var                ufs     1       no      –
/dev/md/dsk/d50 /dev/md/rdsk/d50    /globaldevices      ufs     2       yes     –
/devices        –                   /devices            devfs   –       no      –
sharefs         –                   /etc/dfs/sharetab    sharefs –       no      –
ctfs            –                   /system/contract      ctfs    –       no      –
objfs           –                   /system/object      objfs   –       no      –
swap            –                   /tmp                tmpfs   –       yes     –

11. Mengunci Mirror
lockfs -fa

12. Setelah diedit kemudian reboot

13. Setup stripe untuk HDD1 sama untuk semua slice yang ada di HDD0
[email protected] # metainit -f d12 1 1  c3t5000C5000BB6B263d0s0
d12: Concat/Stripe is setup

[email protected] # metattach d10 d12
d10: submirror d12 is attached

 [email protected] # metastat -p
d50 -m d51 1
d51 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s5
d30 -m d31 1
d31 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s3
d20 -m d21 1
d21 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s1
d10 -m d11 d12 1
d11 1 1 /dev/dsk/c3t5000C5000BB69B3Fd0s0
d12 1 1 /dev/dsk/c3t5000C5000BB6B263d0s0

[email protected] # metainit -f d22 1 1  c3t5000C5000BB6B263d0s1
d22: Concat/Stripe is setup

[email protected] # metattach d20 d22
d20: submirror d22 is attached

[email protected] # metainit -f d32 1 1  c3t5000C5000BB6B263d0s3
d32: Concat/Stripe is setup

[email protected] # metattach d30 d32
d30: submirror d32 is attached

[email protected] # metainit -f d52 1 1  c3t5000C5000BB6B263d0s5
d52: Concat/Stripe is setup

[email protected] # metattach d50 d52
d50: submirror d52 is attached

14. Untuk melihat status
[email protected] # metastat -i


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

twelve − one =