Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i have 4 disks, sd[a,b,f,g] of various sizes that I want to 'merge' together. I am using mdadm to achieve this.

my question is, what's the difference between --

mdadm --create /dev/md0 --level=linear --raid-devices=4 /dev/sda /dev/sdb /dev/sdf /dev/sdg

and

mdadm --create /dev/md0 --level=linear --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdf1 /dev/sdg1

When both work? For some reason (if someone could explain this too, it would be awesome) I lose a lot of disk space as is when I look at /dev/md0 but if I create partitions and then create a linear raid, I end up losing even more space.

So why create partitions at all? Even when I do not have this setup and just want to use a disk, can I just do a mkfs.ext3 /dev/sda ?


Additional stuff - Here's /proc/partitions -

8 0 244140625 sda
8 1 244139008 sda1
8 16 244140625 sdb
8 17 244139008 sdb1
8 80 39063024 sdf
8 81 39061504 sdf1
8 96 156290904 sdg
8 97 156289024 sdg1

WHy are the sizes of my partitions smaller than my disk as listed above?

share|improve this question
    
It is perfectly legal to do that, but you will have problem if you try to do that on your boot drive. Your will need to store your boot loader somewhere. –  Zoredache Mar 26 '13 at 7:35
    
Note that you're not losing any space until the fifth significant figure. That is, the loss -- which is used for storing the partition table, MBR, and other metadata -- is tiny and not worth worrying about. –  Reid Apr 24 '13 at 23:17

1 Answer 1

up vote 3 down vote accepted

Why make a partition at all

You need partitions if you want to use part of a drive for RAID for a specific array. You can also be more flexible with more partitions.

Example:

1 TB HDD #1:    SDA1 (500 MB)     SDA2 (490 MB)
1 TB HDD #2:    SDB1 (500 MB)     SDB2 (490 MB)
1 TB HDD #3:    SDC1 (500 MB)     SDC2 (500 MB)

I can add sda1, sdb1 and sdc1 in a stripe for performance,
and sda2 and sdb2 in a mirror for security,
amd sdc2 just as a plain disk.

I can not do that if I use the whole drive.

In your case you seem to want only one single large setup, which means that it does not matter which way you do it.

share|improve this answer
    
All right thanks. Yeah I just want the entire disk (atleast for the disks I have). So this clarifies it :) –  Hari Sundararajan Mar 28 '13 at 14:14

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.