본문 바로가기

Work/Solaris

solaris 10 zfs 상태 보기, 미러 걸기

zfs 정리


#zpool status


[t5120:/usr/sbin]zpool status

  pool: rpool

 state: ONLINE

 scan: none requested

config:


        NAME        STATE     READ WRITE CKSUM

        rpool       ONLINE       0     0     0

          c1t0d0s0  ONLINE       0     0     0


errors: No known data errors

[t5120:/usr/sbin]zpool status rpool

  pool: rpool

 state: ONLINE

 scan: none requested

config:


        NAME        STATE     READ WRITE CKSUM

        rpool       ONLINE       0     0     0

          c1t0d0s0  ONLINE       0     0     0


errors: No known data errors

[t5120:/usr/sbin]



#zpool list

[t5120:/usr/sbin]zpool list

NAME    SIZE  ALLOC   FREE    CAP  HEALTH  ALTROOT

rpool   136G  6.19G   130G     4%  ONLINE  -




O/S 영역 zfs 설치시 위에서 보듯이 c1t0d0의 슬라이스 0 번에 

전체 영역 할당하고, rpool 로 생성함.



# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2 ( silce 동기화 ) 

# zpool attach -f rpool c1t0d0s0 c1t1d0s0

=> c1t0d0s0 은 rpool 로 구성이고 c1t1d0s0 은 mirror 로 붙인다.



[t5120:/usr/sbin]zpool status

  pool: rpool

 state: ONLINE

status: One or more devices is currently being resilvered.  The pool will

        continue to function, possibly in a degraded state.

action: Wait for the resilver to complete.

 scan: resilver in progress since Sun Dec 28 15:50:19 2014

    663M scanned out of 6.19G at 66.3M/s, 0h1m to go

    663M scanned out of 6.19G at 66.3M/s, 0h1m to go

    662M resilvered, 10.46% done

config:


        NAME          STATE     READ WRITE CKSUM

        rpool         ONLINE       0     0     0

          mirror-0    ONLINE       0     0     0

            c1t0d0s0  ONLINE       0     0     0

            c1t1d0s0  ONLINE       0     0     0  (resilvering)


errors: No known data errors


resilvered 완료 후 부트 블럭 심어주기

# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t1d0s0 


** zfs mirror disk 교체 **


 

[t5120:/usr/sbin]zpool status

  pool: rpool

 state: ONLINE

 scan: resilvered 6.19G in 0h4m with 0 errors on Sun Dec 28 15:55:02 2014

config:


        NAME          STATE     READ WRITE CKSUM

        rpool         ONLINE       0     0     0

          mirror-0    ONLINE       0     0     0

            c1t0d0s0  ONLINE       0     0     0

            c1t1d0s0  ONLINE       0     0     0


errors: No known data errors



c1t0d0s0, c1t1d0s0 미러 상태


@@ c1t0d0s0 이 disk fault 상태면 @@


# zpool offline rpool c1t1d0s0

# cfgadm -c unconfigure c1::dsk/c1t0d0

< physically remove failed disk c1t0d0 > 

< physically insert replacement disk c1t0d0 >

# cfgadm -c configure c1::dsk/c1t0d0

# zpool replace rpool c1t0d0s0

# zpool online rpool c1t0d0s0

# zpool status rpool

< Let disk resilver before installing the boot blocks >

# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t0d0s0




@@ 참고 http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide


'Work > Solaris' 카테고리의 다른 글

zfs 파일 시스템  (0) 2014.12.30
solaris 10 NFS 설정  (0) 2014.12.28
솔라리스 패스워드 정책  (1) 2014.12.16
Solaris 스토리지 볼륨 인식 관련  (0) 2014.12.16
solaris 프로세스별 점유율 확인  (0) 2014.12.15