SVM - Mirror 구성 -

- 솔라리스 볼륨 매니저를 활용한 미러 구성

1. 미러 구성을 위한 원본 디스크 생성

# metainit d2 1 1 c0t0d0s3

d2: Concat/Stripe is setup
# metastat
d2: Concat/Stripe
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c0t0d0s3          0     No      Yes

Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST34371W_SUN4.2GJDE924870HMH13
# newfs /dev/md/rdsk/d2
newfs: /dev/md/rdsk/d2 last mounted as /d1
newfs: construct a new file system /dev/md/rdsk/d2: (y/n)? y
/dev/md/rdsk/d2:        1026000 sectors in 475 cylinders of 16 tracks, 135 secto

rs
        501.0MB in 30 cyl groups (16 c/g, 16.88MB/g, 8128 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 34736, 69440, 104144, 138848, 173552, 208256, 242960, 277664, 312368,
 691808, 726512, 761216, 795920, 830624, 865328, 900032, 934736, 969440,
 1004144
# mount /dev/md/dsk/d2 /d2
# cd /d2
# cp /etc/passwd .
# ls
lost+found  passwd
#

2. 미러 구성을 위한 백업 디스크 생성

# metainit d3 1 1 c0t0d0s4
d3: Concat/Stripe is setup
# metastat
d3: Concat/Stripe
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c0t0d0s4          0     No      Yes

d2: Concat/Stripe
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c0t0d0s3          0     No      Yes

Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST34371W_SUN4.2GJDE924870HMH13
# newfs /dev/md/rdsk/d3
newfs: construct a new file system /dev/md/rdsk/d3: (y/n)? y
/dev/md/rdsk/d3:        1026000 sectors in 475 cylinders of 16 tracks, 135 sect

rs
        501.0MB in 30 cyl groups (16 c/g, 16.88MB/g, 8128 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 34736, 69440, 104144, 138848, 173552, 208256, 242960, 277664, 312368,
 691808, 726512, 761216, 795920, 830624, 865328, 900032, 934736, 969440,
 1004144
# metastat
d3: Concat/Stripe
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c0t0d0s4          0     No      Yes

d2: Concat/Stripe
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c0t0d0s3          0     No      Yes

Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST34371W_SUN4.2GJDE924870HMH13

3. 미러 구성

# metainit d23 -m d2
d23: Mirror is setup
# metastat
d23: Mirror
    Submirror 0: d2
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 1026000 blocks (500 MB)

d2: Submirror of d23
    State: Okay
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s3          0     No            Okay   Yes


d3: Concat/Stripe
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c0t0d0s4          0     No      Yes

Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST34371W_SUN4.2GJDE924870HMH13
#
# metattach d23 d3

d23: submirror d3 is attached
# metastat
d23: Mirror
    Submirror 0: d2
      State: Okay
    Submirror 1: d3
      State: Resyncing
    Resync in progress: 1 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 1026000 blocks (500 MB)

d2: Submirror of d23
    State: Okay
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s3          0     No            Okay   Yes


d3: Submirror of d23
    State: Resyncing
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s4          0     No            Okay   Yes


Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST34371W_SUN4.2GJDE924870HMH13
#

# metastat
d23: Mirror
    Submirror 0: d2
      State: Okay
    Submirror 1: d3
      State: Resyncing
    Resync in progress: 48 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 1026000 blocks (500 MB)

d2: Submirror of d23
    State: Okay
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s3          0     No            Okay   Yes


d3: Submirror of d23
    State: Resyncing
    Size: 1026000 blocks (500 MB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s4          0     No            Okay   Yes


Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST34371W_SUN4.2GJDE924870HMH13
#
# mount /dev/md/dsk/d23 /d23
# ls /d23            //copy 한 데이터 확인
lost+found  passwd
#

by mesense | 2009/01/05 15:09 | solaris | 트랙백 | 덧글(0)

SVM - RAID0 Stripe -

- 솔라리스 볼륨 매니저를 활용한 Stripe 구성

1. Stripe용 볼륨 생성

# metainit d1 1 2 c0t0d0s3 c0t0d0s4 -i 128k
d1: Concat/Stripe is setup
# metastat
d1: Concat/Stripe
    Size: 2049840 blocks (1000 MB)
    Stripe 0: (interlace: 256 blocks)
        Device     Start Block  Dbase   Reloc
        c0t0d0s3          0     No      Yes
        c0t0d0s4          0     No      Yes

Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST34371W_SUN4.2GJDE924870HMH13
#

2. 파일 시스템 구성

# newfs /dev/md/rdsk/d1
newfs: /dev/md/rdsk/d1 last mounted as /d0
newfs: construct a new file system /dev/md/rdsk/d1: (y/n)? y
/dev/md/rdsk/d1:        2049840 sectors in 949 cylinders of 16 tracks, 135 secto

rs
        1000.9MB in 60 cyl groups (16 c/g, 16.88MB/g, 8128 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 34736, 69440, 104144, 138848, 173552, 208256, 242960, 277664, 312368,
 1728320,
          1763024, 1797728, 1832432, 1867136, 1901840, 1936544, 1971248,
 2005952, 2040656
#

3. 마운트 후 사용
# mount /dev/md/dsk/d1 /d1
# df -k

by mesense | 2009/01/05 14:55 | solaris | 트랙백 | 덧글(0)

SVM -concatenation 구성-

1. SVM 디스크 환경 설정
    - SVM의 구성정보와 상태정보를 저장하는 database영역 : c0t0d0s0    50mb
    - volume 구성을 위한 영역 : c0t0d0s3, c0t0d0s4, c0t0d0s5    500mb

2. metadb 영역 생성
    #> metadb -a -f -c 3 c0t0d0s0 // 기본 1개, replica 2개
    #> metadb
        flags           first blk       block count
     a        u         16              8192            /dev/dsk/c0t0d0s0
     a        u         8208           8192            /dev/dsk/c0t0d0s0
     a        u         16400          8192            /dev/dsk/c0t0d0s0
    #> metadb -i        // 상태 확인

        flags           first blk       block count
     a        u         16              8192            /dev/dsk/c0t0d0s0
     a        u         8208           8192            /dev/dsk/c0t0d0s0
     a        u         16400          8192            /dev/dsk/c0t0d0s0

 r - replica does not have device relocation information
 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

3. concat 구성
    - concat 용 volume d0 생성    
# metainit d0 2 1 c0t0d0s3 1 c0t0d0s4
d0: Concat/Stripe is setup
# metastat
d0: Concat/Stripe
    Size: 2052000 blocks (1001 MB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c0t0d0s3          0     No      Yes
    Stripe 1:
        Device     Start Block  Dbase   Reloc
        c0t0d0s4          0     No      Yes

Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST34371W_SUN4.2GJDE924870HMH13
#
    - 파일 시스템 생성
# newfs /dev/md/rdsk/d0
newfs: /dev/md/rdsk/d0 last mounted as /d23
newfs: construct a new file system /dev/md/rdsk/d0: (y/n)? y
/dev/md/rdsk/d0:        2052000 sectors in 950 cylinders of 16 tracks, 135 sectors
        1002.0MB in 60 cyl groups (16 c/g, 16.88MB/g, 8128 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 34736, 69440, 104144, 138848, 173552, 208256, 242960, 277664, 312368,
 1728320, 1763024, 1797728, 1832432, 1867136, 1901840, 1936544, 1971248,
 2005952, 2040656
#
    - 마운트 후 사용
# mount /dev/md/dsk/d0 /d0
# df -k            // 마운트 용량 확인

4. concat 볼륨에 디스크 추가하기
# metastat
d0: Concat/Stripe
    Size: 2052000 blocks (1001 MB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c0t0d0s3          0     No      Yes
    Stripe 1:
        Device     Start Block  Dbase   Reloc
        c0t0d0s4          0     No      Yes

Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST34371W_SUN4.2GJDE924870HMH13
# metattach d0 c0t0d0s5
d0: component is attached
# growfs -M /d0 /dev/md/rdsk/d0
Warning: inode blocks/cyl group (212) >= data blocks (135) in last
    cylinder group. This implies 2160 sector(s) cannot be allocated.
/dev/md/rdsk/d0:        3075840 sectors in 1424 cylinders of 16 tracks, 135 sect

ors
        1501.9MB in 89 cyl groups (16 c/g, 16.88MB/g, 8128 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 34736, 69440, 104144, 138848, 173552, 208256, 242960, 277664, 312368,
 2732432, 2764832, 2799536, 2834240, 2868944, 2903648, 2938352, 2973056,
 3007760, 3042464
# df -k        // 마운트 용량 확인

by mesense | 2009/01/05 14:48 | 미분류 | 트랙백 | 덧글(0)

솔라리스 네트워크 설정


솔라리스는 부팅시 런레벨 S 에서 /etc/rcS.d/S30network.sh 파일에서 /etc/hostname.xxn 파일과 /etc/hosts 파일을
참조하여 NIC 설정을 한다

-- 주요 Network interface instance name

hostname.xxn : For Sun Microsystems
.bge : Gigabit Ethernet driver for Broadcom BCM57XX
.hme : Sun Microsystems / On-Board 형태의 NIC
.pcn : AMD Ethernet device driver
.elxl : 3Com Ethernet device driver
.rtls : Realtek Fast Ethernet 

-- Interface Configuration

#> ifconfig -a
#> ifconfig hme0 plumb // 커널과 통신할 수 있도록 설정
#> ifconfig hme0 192.168.1.100 netmask 255.255.255.0 up

or

#> vi /etc/hostname.hme0
192.168.1.100
저장 후 reboot

-- virtual interface configuration
#> ifconfig hme0:0 plumb
#> ifconfig hme0:0 192.168.1.100 netmask 255.255.255.0 up
#> ifconfig hme0:0

#> ifconfig hme0:1 plumb
#> ifconfig hme0:1 192.168.2.100 netmask 255.255.255.0 up
#> ifconfig hme0:1

-- Default Router Configuration

#> netstat -nr
#> route add default 192.168.1.1

or
#> vi /etc/defaultrouter
192.168.1.1 저장 후 reboot

-- DNS Client Configuration

#> vi /etc/resolv.conf
nameserver 168.126.63.1 저장 후 reboot

by mesense | 2008/11/07 16:11 | solaris | 트랙백 | 덧글(0)

솔라리스 기본 정보확인


-- 운영체제의 기본정보 확인 (OS 종류, 릴리즈 정보, 버전, 커널 아이디, 머신 타입 등..)

#> uname -r
#> uname -i
#> uname -p
#> uname -a
#> uname -X

-- 프로세서 정보 확인

#> psrinfo -v

-- 운영체제 시간 확인

#> date

-- 운영체제 날짜 확인

#> cal

by mesense | 2008/11/07 15:28 | solaris | 트랙백 | 덧글(0)

◀ 이전 페이지          다음 페이지 ▶