Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have 3 3TB drives, and have raid5ed them together. I would expect to get a resulting device around 6TB. The command I used:

mdadm --create md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1

Also of note:

# fdisk -l | grep 'Disk /dev/sd'
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/mapper/root doesn't contain a valid partition table
Disk /dev/mapper/swap_1 doesn't contain a valid partition table
Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
Disk /dev/sdd: 320.1 GB, 320072933376 bytes
# mdadm --detail /dev/md0
md0:
        Version : 1.2
  Creation Time : Wed Jul 10 17:11:04 2013
     Raid Level : raid5
     Array Size : 4294702080 (4095.75 GiB 4397.77 GB)
  Used Dev Size : 2147351040 (2047.87 GiB 2198.89 GB)
   Raid Devices : 3
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Thu Jul 11 14:51:17 2013
          State : clean 
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : ...
           UUID : 6331582a:92950387:4e4e7314:8bccf9cb
         Events : 66195

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       3       8       33        2      active sync   /dev/sdc1
#

Let me know if more information would be helpful.

share|improve this question
3  
You did not use the command you say you did. If you had, the examine output would show the same ( sd[abc] ) rather than sd[abc]1. –  psusi Jul 11 '13 at 20:33
    
You are absolutely correct (and see mine answer below). Good catch!! –  Limited Atonement Jul 12 '13 at 13:06

2 Answers 2

up vote 3 down vote accepted

How did you partition the disks the first time? If you used fdisk, you may have limited yourself to just the first 2 TB of each disk, as that's the maximum partition size you can create with fdisk. As such, your raid device probably looks more like a RAID5 of 3 * 2TB disks.

Use parted to create your larger than 2TB partition.

Example:

[root@evil home]# parted /dev/sda -- mklabel GPT yes unit TB mkpart primary ext2 0 -1
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Information: You may need to update /etc/fstab.                           

[root@evil home]#

Do this for each of your drives, then recreate your RAID5 device and see if that allows you to use the rest of your drives.

You can use parted /dev/sda -- print to view the partition table once you've reset it per the above command line.

share|improve this answer
1  
I bet this would work and I bet you're right. I figured out a much easier way, though. I guess in stead of putting it here, I'll answer my own question. –  Limited Atonement Jul 12 '13 at 13:03

There's no need to format the disks beforehand; mdadm can handle this for you!

# mdadm --create md0 --level=5 --raid-devices=3 /dev/sda /dev/sdb /dev/sdc

And this should be done before any partitioning.

share|improve this answer
    
Why the downvote? I'm happy to receive criticism. If you're willing to take a reputation hit, at least get what you paid for! –  Limited Atonement Jul 15 '13 at 13:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.