March 2012
M T W T F S S
« Feb   Apr »
 1234
567891011
12131415161718
19202122232425
262728293031  
148

Refs

Categories

Archives

profile for slm on Stack Exchange, a network of free, community-driven Q&A sites

Delicious Bookmarks for March 5th from 00:21 to 15:32

These are my links for March 5th from 00:21 to 15:32:

How to Add a New Hard Drive to a Linux Software RAID (CentOS & Fedora)

Getting Started

A while back I setup a 1TB hard drive for backing up my primary file server. That 1TB drive was setup in a software RAID, a RAID 1 mirror to be exact. However I opted at the time to only add the one drive to the RAID, mainly because I only had just the one. Well I finally got around to getting a 2nd 1TB drive and needed to add it as another member of the RAID. These are the steps that I used to accomplish it.

Preexisting RAID

Now before we get started here’s what the RAID setup looks like. NOTE: Throughout this article I’ll be making use of the command mdadm. This command is the primary tool for managing a software RAID under Linux. Also notice that my RAID is identified by /dev/md0. Typically the software RAIDs are identified as /dev/mdX, where X is a number.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Existing RAID setup
 
% mdadm --detail /dev/md0
/dev/md0:
        Version : 0.90
  Creation Time : Wed Dec 16 22:55:51 2009
     Raid Level : raid1
     Array Size : 976759936 (931.51 GiB 1000.20 GB)
  Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
   Raid Devices : 1
  Total Devices : 1
Preferred Minor : 0
    Persistence : Superblock is persistent
 
    Update Time : Sun Feb 19 04:22:02 2012
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0
 
           UUID : 1f1b36fd:ce3d589e:6a89fc71:2e8f3e64
         Events : 0.222
 
    Number   Major   Minor   RaidDevice State
       0       8       33        0      active sync   /dev/sdc1

Nothing amazing here. We have 1 device, the RAID is clean and the RAID device is /dev/sdc1.

Installing the 2nd HDD (Hard Disk Drive)

The next step was to power down the system, install the 2nd HDD, and reboot. Once the system detected the new drive I confirmed that it was detected cleanly by the Linux kernel.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# visually inspect the dmesg log
 
% dmesg
...
...
 
### drive #1 (existing HDD)
 
ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata5.00: ATA-8: Hitachi HDS721010CLA332, JP4OA3MA, max UDMA/133
ata5.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata5.00: configured for UDMA/133
 
...
...
 
### drive #2 (newly added HDD)
 
ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata6.00: ATA-8: Hitachi HDT721010SLA360, ST6OA31B, max UDMA/133
ata6.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata6.00: configured for UDMA/133

Good so the hardware was detected by the kernel. Now let’s see if the kernel was able to assign a device handle to the newly installed HDD.


…. Continue reading → How to Add a New Hard Drive to a Linux Software RAID (CentOS & Fedora) »»

Delicious Bookmarks for March 4th from 23:07 to 23:49

These are my links for March 4th from 23:07 to 23:49: