60.Unix2008. 12. 11. 11:48
반응형

Solaris Volume Manager

설치하기
root@tech # cd /cdrom
root@tech # ls
cdrom0            devpro_v9n1_sparc  sol_8_204_sparc_2
root@tech # cd cdrom0
root@tech # ls
Copyright  Solaris_8  installer

root@tech # cd Solaris_*
root@tech # ls
EA      Product  Tools
root@tech # cd EA
root@tech # ls
installer  products
root@tech # cd prod*
root@tech # ls
DiskSuite_4.2.1    SunScreen_3.1_Lite
root@tech # cd Di*
root@tech # ls
README    installer  sparc
root@tech # cd sp*
root@tech # ls
Docs      Packages  Tools
root@tech # cd Pa*

--경로 : CD 2번째 CD

# cd /cdrom/sol_8_401_sparc_2/Solaris_8/EA/products/Disksuite_4.2.1/sparc/Packages 
root@tech # ls
SUNWlvma  SUNWlvmr  SUNWmdja  SUNWmdnu  SUNWmdu
SUNWlvmg  SUNWmdg  SUNWmdnr  SUNWmdr  SUNWmdx
root@tech # pkgadd -d . 

다음과 같은 패키지를 사용할 수 있습니다.
  1  SUNWlvma    Solaris Volume Management API's
                  (sparc) 1.0,REV=2001.11.02.03.17
  2  SUNWlvmg    Solaris Volume Management Application
                  (sparc) 1.0,REV=2001.11.14.03.19
  3  SUNWlvmr    Solaris Volume Management (root)
                  (sparc) 1.0,REV=2001.11.14.03.19
  4  SUNWmdg      Solstice DiskSuite Tool
                  (sparc) 4.2.1,REV=1999.11.04.18.29
  5  SUNWmdja    Solstice DiskSuite Japanese localization ß x
                  (sparc) 4.2.1,REV=1999.12.09.15.37
  6  SUNWmdnr    Solstice DiskSuite Log Daemon Configuration Files ß
                  (sparc) 4.2.1,REV=1999.11.04.18.29
  7  SUNWmdnu    Solstice DiskSuite Log Daemon
                  (sparc) 4.2.1,REV=1999.11.04.18.29
  8  SUNWmdr      Solstice DiskSuite Drivers
                  (sparc) 4.2.1,REV=1999.12.03.10.00
  9  SUNWmdu      Solstice DiskSuite Commands
                  (sparc) 4.2.1,REV=1999.11.04.18.29
 10  SUNWmdx      Solstice DiskSuite Drivers(64-bit)  ß 서버 버전 확인 후 설치

               (sparc) 4.2.1,REV=1999.11.04.18.29

처리할 패키지(들)를 선택하십시오.(또는 모든 패키지를
처리하려면'all'을 입력하십시오.) (default: all) [?,??,q]:

패키지예<SUNWlvma>(을)를 </cdrom/sol_8_204_sparc_2/Solaris_8/EA/products/DiskSuite_4.2.1/sparc/Packages>에서 처리 중

Solaris Volume Management API's
(sparc) 1.0,REV=2001.11.02.03.17
Copyright 2001 Sun Microsystems, Inc. All rights reserved.
디렉토리 </>(을)를 패키지의 기본 디렉토리로 사용
## 패키지 정보 처리 중
## 시스템 정보 처리 중
  14개 패키지 경로 이름이 이미 제대로 설치되어 있습니다.
## 패키지 종속성 검증
## 디스크 공간 요구 검증 중
## 이미 설치되어 있는 패키지와의 충돌 여부를 확인하고 있습니다.

다음의 파일이 이미 시스템에 설치되어 있으며 다른 패키지에 의해
사용되고 있습니다:
  /usr/sadm/lib/wbem/doc <속성 변경만>

충돌하는 파일을 설치하겠습니까? y
## setuid/setgid 프로그램 점검

## 설치 전 스크립트 실행

.....


*** 주의 사항 ***
        시스템의 정확한 작동을 위해서는 반드시재부팅해야 합니다.
        다음을 실행한 후:
              shutdown -y -i6 -g0
        "콘솔 로그인:" 프롬프트가 나올 때까지 기다리십시오.


--패키지 설치 여부 확인작업

root@tech # pkginfo | grep mdx
system      SUNWhmdx      SunSwift SBus Adapter Drivers (64-bit)
system      SUNWmdx        Solstice DiskSuite Drivers(64-bit)
root@tech # pkginfo | grep -i solstice
ALE        SUNWksadl      Korean (EUC) Solstice Admintool launcher
system      SUNWmdg        Solstice DiskSuite Tool
system      SUNWmdja      Solstice DiskSuite Japanese localization
system      SUNWmdnr      Solstice DiskSuite Log Daemon Configuration Files
system      SUNWmdnu      Solstice DiskSuite Log Daemon
system      SUNWmdr        Solstice DiskSuite Drivers
system      SUNWmdu        Solstice DiskSuite Commands
system      SUNWmdx        Solstice DiskSuite Drivers(64-bit)
system      SUNWmibii      Solstice Enterprise Agents 1.0.3 SNMP daemon
system      SUNWsacom      Solstice Enterprise Agents 1.0.3 files for root file system
system      SUNWsadmi      Solstice Enterprise Agents 1.0.3 Desktop Management Interface
system      SUNWsadml      Solstice Launcher.
system      SUNWsadmx      Solstice Enterprise Agents 1.0.3 Desktop Management Interface Libraries (64-bit)
system      SUNWsasnm      Solstice Enterprise Agents 1.0.3 Simple Network Management Protocol
system      SUNWsasnx      Solstice Enterprise Agents 1.0.3 Simple Network Management Protocol Libraries (64-bit)





1. 테스트 장비
 
   - Sun Enterprise 3500

2. OS
   - 솔라리스 8

3. 테스트 디스크 정보
 root@E3500 # format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
          /sbus@3,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100002037979518,0
       1. c0t1d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@3,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100002037a85803,0
       2. c0t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/SUNW,socal@d,10000/sf@0,0/ssd@w2100002037e94a1e,0
       3. c0t3d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/SUNW,socal@d,10000/sf@0,0/ssd@w21000004cf997f24,0
Specify disk (enter its number):

 
c0t2d0
------------------------------------------------------------------------
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 - 14518       20.00GB    (14519/0/0) 41945391
  1 unassigned    wu       0                0         (0/0/0)            0
  2     backup    wm       0 - 24619       33.92GB    (24620/0/0) 71127180
  3 unassigned    wm       0                0         (0/0/0)            0
  4 unassigned    wm   14519 - 15244        1.00GB    (726/0/0)    2097414
  5 unassigned    wm   15245 - 15970        1.00GB    (726/0/0)    2097414
  6 unassigned    wm   15971 - 16696        1.00GB    (726/0/0)    2097414
  7 unassigned    wm   16697 - 16732       50.78MB    (36/0/0)      104004

c0t3d0
------------------------------------------------------------------------
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 - 14518       20.00GB    (14519/0/0) 41945391
  1 unassigned    wu       0                0         (0/0/0)            0
  2     backup    wm       0 - 24619       33.92GB    (24620/0/0) 71127180
  3 unassigned    wm       0                0         (0/0/0)            0
  4 unassigned    wm   14519 - 15244        1.00GB    (726/0/0)    2097414
  5 unassigned    wm   15245 - 15970        1.00GB    (726/0/0)    2097414
  6 unassigned    wm   15971 - 16696        1.00GB    (726/0/0)    2097414
  7 unassigned    wm   16697 - 16732       50.78MB    (36/0/0)      104004


4. Meta DB생성하기
  root@E3500 # metadb -a -f -c 3 c0t2d0s7
  root@E3500 # metadb -i
        flags           first blk       block count
     a        u         16              1034            /dev/dsk/c0t2d0s7
     a        u         1050            1034            /dev/dsk/c0t2d0s7
     a        u         2084            1034            /dev/dsk/c0t2d0s7
 o - replica active prior to last mddb configuration change
 u - replica is up to date
 l - locator for this replica was read successfully
 c - replica's location was in /etc/lvm/mddb.cf
 p - replica's location was patched in kernel
 m - replica is master, this is replica selected as input
 W - replica has device write errors
 a - replica is active, commits are occurring to this replica
 M - replica had problem with master blocks
 D - replica had problem with data blocks
 F - replica had format problems
 S - replica is too small to hold current data base
 R - replica had device read errors
  root@E3500 #

사용자 삽입 이미지


5. RAID 0 구성하기
 <Concatenation>   
root@E3500 # metainit d0 2 1 c0t2d0s4 1 c0t3d0s4
d0: Concat/Stripe is setup
root@E3500 # metastat d0
d0: Concat/Stripe
    Size: 4194828 blocks
    Stripe 0:
        Device              Start Block  Dbase
        c0t2d0s4                   0     No  
    Stripe 1:
        Device              Start Block  Dbase
        c0t3d0s4                   0     No  

root@E3500 #

사용자 삽입 이미지

 <Stripe>
root@E3500 # metainit d1 1 2 c0t2d0s5 c0t3d0s5 -i 128k
d1: Concat/Stripe is setup
root@E3500 # metastat d1
d1: Concat/Stripe
    Size: 4191939 blocks
    Stripe 0: (interlace: 32 blocks)
        Device             Start Block  Dbase
        c0t2d0s5                   0     No  
        c0t3d0s5                   0     No  

root@E3500 #

사용자 삽입 이미지

6. RAID 1 구성하기
root@E3500 # metainit d2 1 1 c0t2d0s6
d2: Concat/Stripe is setup
root@E3500 # metainit d3 1 1 c0t3d0s6
d3: Concat/Stripe is setup
root@E3500 # metainit d23 -m d2
d23: Mirror is setup
root@E3500 # metattach d23 d3
d23: submirror d3 is attached
root@E3500 # metastat d23
d23: Mirror
    Submirror 0: d2
      State: Okay        
    Submirror 1: d3
      State: Resyncing   
    Resync in progress: 0 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 2097414 blocks

d2: Submirror of d23
    State: Okay        
    Size: 2097414 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t2d0s6                   0     No    Okay        


d3: Submirror of d23
    State: Resyncing   
    Size: 2097414 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t3d0s6                   0     No    Okay        


root@E3500 #

사용자 삽입 이미지

7. Disk Mount 하기
root@E3500 # newfs /dev/md/rdsk/d23
root@E3500 # mount /dev/md/dsk/d23 /test

8. MetaDB 삭제하기
root@E3500 # metadb -i
        flags           first blk       block count
     a        u         16              1034            /dev/dsk/c0t2d0s7
     a        u         1050            1034            /dev/dsk/c0t2d0s7
     a        u         2084            1034            /dev/dsk/c0t2d0s7
     a        u         16              1034            /dev/dsk/c0t3d0s7
     a        u         1050            1034            /dev/dsk/c0t3d0s7
     a        u         2084            1034            /dev/dsk/c0t3d0s7
 o - replica active prior to last mddb configuration change
 u - replica is up to date
 l - locator for this replica was read successfully
 c - replica's location was in /etc/lvm/mddb.cf
 p - replica's location was patched in kernel
 m - replica is master, this is replica selected as input
 W - replica has device write errors
 a - replica is active, commits are occurring to this replica
 M - replica had problem with master blocks
 D - replica had problem with data blocks
 F - replica had format problems
 S - replica is too small to hold current data base
 R - replica had device read errors
root@E3500 # metadb -d -f c0t2d0s7 c0t3d0s7
root@E3500 # metadb -i
root@E3500 #


9. RAID 구성 삭제하기
root@E3500 # metastat
d23: Mirror
    Submirror 0: d2
      State: Okay        
    Submirror 1: d3
      State: Okay        
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 2097414 blocks

d2: Submirror of d23
    State: Okay        
    Size: 2097414 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t2d0s6                   0     No    Okay        
d3: Submirror of d23
    State: Okay        
    Size: 2097414 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t3d0s6                   0     No    Okay        


d0: Concat/Stripe
    Size: 4194828 blocks
    Stripe 0:
        Device              Start Block  Dbase
        c0t2d0s4                   0     No  
    Stripe 1:
        Device              Start Block  Dbase
        c0t3d0s4                   0     No  

d1: Concat/Stripe
    Size: 4191939 blocks
    Stripe 0: (interlace: 32 blocks)
        Device              Start Block  Dbase
        c0t2d0s5                   0     No  
        c0t3d0s5                   0     No  

root@E3500 #
root@E3500 # metaclear -r d0
d0: Concat/Stripe is cleared
root@E3500 # metaclear -r d1
d1: Concat/Stripe is cleared
root@E3500 # metaclear -r d23
d23: Mirror is cleared
d2: Concat/Stripe is cleared
d3: Concat/Stripe is cleared
root@E3500 # metastat
root@E3500 #



1. Hot spare 구성하기
  Volume 으로 구성하여 운영하던 중에 Disk의 hardware 장애로 인하여 volume 의 구성에 문제가 발생되어 여유분의 disk를 volume의 장애난 디스크와 자동 교체됨

root@E3500 # metainit hsp000 c0t2d0s5  <-Hot Spare 생성
hsp000: Hotspare pool is setup
root@E3500 # metastat hsp000
hsp000: 1 hot spare
        c0t2d0s5                Available       2097414 blocks

사용자 삽입 이미지

root@E3500 #
root@E3500 # metahs -a hsp000 c0t3d0s5  <- Hot Spare 추가
hsp000: Hotspare is added
root@E3500 # metastat hsp000
hsp000: 2 hot spares
        c0t2d0s5                Available       2097414 blocks
        c0t3d0s5                Available       2097414 blocks

root@E3500 #
root@E3500 # metahs -d hsp000 c0t3d0s5 <- Hot Spare 삭제
hsp000: Hotspare is deleted
root@E3500 # metastat hsp000
hsp000: 1 hot spare
        c0t2d0s5                Available       2097414 blocks

root@E3500 #
root@E3500 # metahs -r hsp000 c0t2d0s5 c0t3d0s5  <- Hot Sprae 교체
hsp000: Hotspare c0t2d0s5 is replaced with c0t3d0s5
root@E3500 # metastat hsp000
hsp000: 1 hot spare
        c0t3d0s5                Available       2097414 blocks

root@E3500 #

root@E3500 # metastat d10  <- RAID 1 구성상태
d10: Mirror
    Submirror 0: d0
      State: Okay        
    Submirror 1: d1
      State: Resyncing   
    Resync in progress: 4 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 2097414 blocks

d0: Submirror of d10
    State: Okay        
    Size: 2097414 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t2d0s4                   0     No    Okay        


d1: Submirror of d10
    State: Resyncing   
    Size: 2097414 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t3d0s4                   0     No    Okay        

root@E3500 # metaparam -h hsp000 d0  <- RAID1 과 연계
root@E3500 # metaparam -h hsp000 d1  <- RAID1 과 연계
root@E3500 # metastat d1
d1: Concat/Stripe
    Hot spare pool: hsp000
    Size: 2097414 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t3d0s4                   0     No    Okay        

root@E3500 #

사용자 삽입 이미지


root@E3500 # metaparam -h none d0  <- RAID1 과 연계제거
root@E3500 # metaparam -h none d1  <- RAID1 과 연계제거
root@E3500 #
root@E3500 # metaclear hsp000  <- Hot Spare spool 제거
hsp000: Hotspare pool is cleared
root@E3500 #
 

2. Soft Partition 구성하기
  기존 파티션에서 30Mbtye의 용량으로 2개의 Volume 만들기

root@E3500 # metainit d10 -p c0t2d0s6 30m   <- 30Mbyte Volume 만들기
d10: Soft Partition is setup
root@E3500 # metainit d11 -p c0t2d0s6 30m   <- 30Mbyte Volume 만들기
d11: Soft Partition is setup
root@E3500 #
root@E3500 # metastat d10 d11
d10: Soft Partition
    Component: c0t2d0s6
    State: Okay
    Size: 61440 blocks
        Extent              Start Block              Block count
             0                        1                    61440

d11: Soft Partition
    Component: c0t2d0s6
    State: Okay
    Size: 61440 blocks
        Extent              Start Block              Block count
             0                    61442                    61440

root@E3500 #
root@E3500 # metaclear -r d10  <- Volume 삭제
d10: Soft Partition is cleared
root@E3500 # metaclear -r d11  <- Volume 삭제
d11: Soft Partition is cleared
root@E3500 #



출처 : http://serings.tistory.com/

Posted by 1010