메뉴 닫기

Ubuntu Soft Raid Rebuild.

11_tips_rebuild

소프트 레이드는 아쉽게도 자동 리빌딩 기능이 없을뿐 아니라 리빌딩 명령어 또한 없습니다.

수동으로 리빌딩을 진행해 주어야 합니다.

degrrade 발생시 대처.

디스크 교체 후 .

#fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes

255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00040740

Device Boot Start End Blocks Id System

/dev/sda1 2048 7813119 3905536 fd Linux raid autodetect

/dev/sda2 7813120 234440703 113313792 fd Linux raid autodetect

기존 남아 있는 디스크

 

 

Disk /dev/sdc: 120.0 GB, 120034123776 bytes

66 heads, 2 sectors/track, 1776073 cylinders, total 234441648 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0xaac79236

Device Boot Start End Blocks Id System

/dev/sdc1 2048 4096 1024+ 83 Linux

새 디스크.

 

 

파티션이 맞추기 위해 end 지점 용량 확인 후 fdisk

root@ubuntu:~# fdisk /dev/sdc

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

root@ubuntu:~# fdisk /dev/sdc

Command (m for help): n

Partition type:

p primary (0 primary, 0 extended, 4 free)

e extended

Select (default p): p

Partition number (1-4, default 1):

Using default value 1

First sector (2048-234441647, default 2048):

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-234441647, default 234441647): 7813119

Command (m for help): t

Selected partition 1

Hex code (type L to list codes): fd

Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): n

Partition type:

p primary (1 primary, 0 extended, 3 free)

e extended

Select (default p): p

Partition number (1-4, default 2):

Using default value 2

First sector (7813120-234441647, default 7813120):

Using default value 7813120

Last sector, +sectors or +size{K,M,G} (7813120-234441647, default 234441647):

Using default value 234441647

Command (m for help): t

Partition number (1-4): 2

Hex code (type L to list codes): fd

Changed system type of partition 2 to fd (Linux raid autodetect)

Command (m for help): w

The partition table has been altered!

기존 하드와 동일하게 파티션 후

fdisk -l 명령어로 확인.

 

 

레이드 상태 확인.

mdadm -D /dev/md0

/dev/md0:

Version : 1.2

Creation Time : Thu Jul 30 11:51:43 2015

Raid Level : raid1

Array Size : 3903424 (3.72 GiB 4.00 GB)

Used Dev Size : 3903424 (3.72 GiB 4.00 GB)

Raid Devices : 2

Total Devices : 2

Persistence : Superblock is persistent

Update Time : Thu Jul 30 14:59:28 2015

State : clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0

Name : ubuntu:0 (local to host ubuntu)

UUID : 28673a8d:73c246ab:9cc8a513:f6a74da3

Events : 41

Number Major Minor RaidDevice State

0 8 1 0 active sync /dev/sda1

2 8 17 1 active sync

 

 

/dev/sdc1을 넣어 줘야 함.

mdadm /dev/md0 -a /dev/sdc1

같은 요령으로 md1 도 추가

 

 

root@ubuntu:~# mdadm -D /dev/md1

/dev/md1:

Version : 1.2

Creation Time : Thu Jul 30 11:51:55 2015

Raid Level : raid1

Array Size : 113248128 (108.00 GiB 115.97 GB)

Used Dev Size : 113248128 (108.00 GiB 115.97 GB)

Raid Devices : 2

Total Devices : 3

Persistence : Superblock is persistent

Update Time : Thu Jul 30 15:27:22 2015

State : clean, degraded, recovering

Active Devices : 1

Working Devices : 2

Failed Devices : 1

Spare Devices : 1

Rebuild Status : 39% complete

Name : ubuntu:1 (local to host ubuntu)

UUID : a9438ec7:44e2a339:f754c6a2:9d97d6bc

Events : 387

Number Major Minor RaidDevice State

0 8 2 0 active sync /dev/sda2

3 8 34 1 spare rebuilding /dev/sdc2

2 8 18 – faulty spare

진행 상황을 알 수 있음. 아직 디그레이드, 리커버링 상태.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x