search

Replacing HDD with RAID 1


1. check /dev/sdb failed -> sdbX | sdaX [U_] (f)

2. change status fail for sdbX

mdadm –manage /dev/md0 –fail /dev/sdb1
mdadm –manage /dev/md1 –fail /dev/sdb2
mdadm –manage /dev/md2 –fail /dev/sdb3
mdadm –manage /dev/md3 –fail /dev/sdb5
mdadm –manage /dev/md4 –fail /dev/sdb6
mdadm –manage /dev/md5 –fail /dev/sdb7
mdadm –manage /dev/md6 –fail /dev/sdb8

3. Hot remove sdbX

mdadm –manage /dev/md0 –remove /dev/sdb1
mdadm –manage /dev/md1 –remove /dev/sdb2
mdadm –manage /dev/md2 –remove /dev/sdb3
mdadm –manage /dev/md3 –remove /dev/sdb5
mdadm –manage /dev/md4 –remove /dev/sdb6
mdadm –manage /dev/md5 –remove /dev/sdb7
mdadm –manage /dev/md6 –remove /dev/sdb8

4. Stop All service

5. Shutdown Server, and change hardsik (this is condition if server same as PC)

6. Check HDD Information

smartctl -i /dev/sda

=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda (SATA 3Gb/s, 4K Sectors)
Device Model: ST1000DM003-1CH162
Serial Number: Z1D3FMSW
LU WWN Device Id: 5 000c50 04fc820e0
Firmware Version: CC44
User Capacity: 1.000.204.886.016 bytes [1,00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Wed Dec 21 02:59:39 2016 GMT
SMART support is: Available – device has SMART capability.
SMART support is: Enabled

smartctl -i /dev/sdb

smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.30.3.el6.x86_64] (local build)

Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor: /3:0:0:0
Product:
>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more ‘-T permissive’ options.

7. Create 7 Partation with FS TYPE linux_raid_member

sfdisk -d /dev/sda | sfdisk /dev/sdb

8. add /dev/sdbX to raid mdX

mdadm –manage /dev/md0 –add /dev/sdb1
mdadm –manage /dev/md1 –add /dev/sdb2
mdadm –manage /dev/md2 –add /dev/sdb3
mdadm –manage /dev/md3 –add /dev/sdb5
mdadm –manage /dev/md4 –add /dev/sdb6
mdadm –manage /dev/md5 –add /dev/sdb7
mdadm –manage /dev/md6 –add /dev/sdb8

9. wait rsync, and monitorig

watch "cat /proc/mdstat" 
close
Visit Us On TwitterVisit Us On GooglePlusVisit Us On Linkedin

Hi, guest!

settings

menu