Чтобы в маны не лазить:
# sfdisk -d /dev/sdb > sdb.out
# sfdisk /dev/sdc < sdb.out
# mdadm --manage /dev/md0 --remove /dev/sda2
# mdadm --manage /dev/md1 --add /dev/sdc2
# cat /proc/mdstat
# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda3[2](F) sdb3[1]
273659136 blocks [2/1] [_U]
bitmap: 39/131 pages [156KB], 1024KB chunk
md0 : active raid1 sdc2[2] sdb2[1]
8193024 blocks [2/1] [_U]
[>....................] recovery = 1.5% (128000/8193024) finish=2.0min speed=64000K/sec
bitmap: 0/126 pages [0KB], 32KB chunk
md1 : active raid1 sdb1[1] sda1[2](F)
30716160 blocks [2/1] [_U]
bitmap: 48/235 pages [192KB], 64KB chunk
# mdadm --manage /dev/md1 --remove /dev/sda1
# mdadm --manage /dev/md1 --add /dev/sdc1
# mdadm --manage /dev/md2 --remove /dev/sda3
# mdadm --manage /dev/md2 --add /dev/sdc3
# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sdc3[2] sdb3[1]
273659136 blocks [2/1] [_U]
resync=DELAYED
bitmap: 39/131 pages [156KB], 1024KB chunk
md0 : active raid1 sdc2[0] sdb2[1]
8193024 blocks [2/2] [UU]
bitmap: 0/126 pages [0KB], 32KB chunk
md1 : active raid1 sdc1[2] sdb1[1]
30716160 blocks [2/1] [_U]
[=====>...............] recovery = 28.7% (8835968/30716160) finish=6.7min speed=54126K/sec
bitmap: 48/235 pages [192KB], 64KB chunk
2 комментария:
можно сразу через пайп:
sfdisk -d /dev/sdb |sfdisk /dev/sdc
Точно ))
Отправить комментарий