LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-05-2008, 11:56 PM   #1
zaxonus
Member
 
Registered: Jul 2005
Posts: 66

Rep: Reputation: 15
mdadm (lvm) expertise wanted.


Hi,

I am writing this post hoping that someone with a better understanding of LVM will make some comment.

Here is what I did. I started with four physical hard disks, each of them being 1TB.
Each of the HD had a single primary partition filling up all the available space.

In order to build a raid array, I ran the command :
mdadm -C /dev/md0 -l 5 -n 4 /dev/sd[a-d]1.

Then I ran mdadm -Q /dev/md0.
The report I get is :
/dev/md0: 2794.53GiB raid5 4 devices, 1 spare. Use mdadm --detail for more detail.

I have two questions at this point :
1) Why is there a spare device here ?
2) How can I get almost 3GB of space with only 3 active devices, each one of 1TB, combined in a RAID 5 array ?

*1 : For question one; I am surprised to see a spare device. Because when I did something similar a few years earlier, I did not get any spare device. On this present machine I have mdadm - v2.5.6. On the one I was using previously I had mdadm - v1.9.0. And also the four partitions I had at the time were much smaller than 1TB; they were around 200MB and did not use the full drives.

*2 : Concerning the second question I would expect around 3GB of space with 4 active devices, or around 2GB of space with 3 active devices.

Any comment helping to make things clearer will be welcome.

Bye
 
Old 01-08-2009, 05:23 PM   #2
ljwobker
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
Did you mean someone with more mdadm experience? Because you don't mention LVM anywhere in your post. ;-)

I don't know why you're seeing 1 spare device... the array was built correctly using 4 devices (otherwise you wouldn't have 3GB available)... I just checked on my system which has 3 devices in the array, and it says "3 devices, 0 spares" as expected.

For question #2 -- are you asking why you only show 2794GiB instead of 3TB? The answer is that some of the math is done in decimal (i.e. a "gigabyte" is 1 billion bytes) while some of it is done in binary (i.e. a "gigabyte" is 2^30 bytes)...

the difference is about 7%, and if you reverse the calculation of "three terabytes" back into binary math, you get right at the 2.79 TB reported above...

Code:
name	                   in power form	# of actual bytes
--------------	           --------------	--------------
binary gigabyte	           2^30	                1,073,741,824
decimal gigabyte	   10^9	                1,000,000,000

"three TB in hard drive speak"		        3,000,000,000
"three TB in binary speak"		        2,793,967,724
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SoftwareRaid1 (mdadm) and LVM setup. Working, but is it ok? isync Linux - Server 7 05-17-2011 08:48 PM
unable to load MDADM module BUT mdadm works?!?!?! alirezan1 Linux - Software 2 09-08-2008 07:58 PM
mdadm says "mdadm: /dev/md1 not identified in config file" when booting FC7 raffeD Linux - Server 1 08-11-2008 11:47 AM
LVM + MDADM...help carve81 Debian 2 08-25-2006 03:17 AM
Your Expertise Please deepgrewal SUSE / openSUSE 4 03-12-2005 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration