Difference between revisions of "Talk:Software RAID and LVM"

From ArchWiki
Jump to: navigation, search
(use https for links to archlinux.org)
(mdadm mostly does the right thing?)
(10 intermediate revisions by 3 users not shown)
Line 36: Line 36:
  
 
- [[User:Alphaniner|Alphaniner]] ([[User talk:Alphaniner|talk]]) 18:43, 22 April 2013 (UTC)
 
- [[User:Alphaniner|Alphaniner]] ([[User talk:Alphaniner|talk]]) 18:43, 22 April 2013 (UTC)
 +
:Hi '''Alphaniner''', I really appreciate your input to this article. I haven't looked at this article in a while, but I believe I understand what you're talking about.
 +
:It looks like arrays are created for the swap space ({{ic|md1}}) and root filesystem ({{ic|md0}}), but the former is never used later in the article. Instead a swap partition is created on the VG that sits on top of {{ic|md0}}. Is that why you would think a reader would setup the swap space on {{ic|md0}}?
 +
:Can you explain why {{ic|/home}} would be spread across {{ic|md0}} and {{ic|md1}}? It doesn't look like {{ic|md1}} is added to the Volume Group or even referenced in the article after its creation (which seems to be a related issue).
 +
:~ [[User:Filam|Filam]] ([[User talk:Filam|talk]]) 15:54, 30 April 2013 (UTC)
 +
::The wording of the article - ie. "Make the '''RAIDs''' accessible to LVM by converting '''them''' into physical '''volumes'''" and "Next step is to create a volume group (VG) on the '''PVs'''" - suggests both RAIDs are to be 'made into' PVs, and both PVs are to be 'put into' the VG. Sure, the commands don't reflect this, but they don't exclude it either. And this is Arch, after all... one can't expect one is being fed all necessary commands. OTOH, the fact that the creation of lvswap is optional contradicts this interpretation, all the way back to the creation of md1.
 +
::How ever I look at it, though, I think this article has some fundamental flaws. And I think rectifying these will involve a lot of rework. Seeing as I've never done any significant wiki-work, I figured it would be sensible to have a discussion.
 +
::- [[User:Alphaniner|Alphaniner]] ([[User talk:Alphaniner|talk]]) 18:56, 30 April 2013 (UTC)
 +
:::I completely agree and certainly appreciate that you started the discussion.
 +
:::The question I'm left with is whether it makes sense to add the swap array to the LVM at all. The only benefit I can think of is that the user can then reduce the swap space if the RAM is upgraded. If less swap space is required then that would allow the root filesystem to use part of the swap array and then there is no separation between the swap space and the root filesystem on the disc.
 +
:::And then if you ignored the LVM, does it makes sense to use a different RAID level for the swap partitions than the root partitions?
 +
:::~ [[User:Filam|Filam]] ([[User talk:Filam|talk]]) 15:11, 1 May 2013 (UTC)
 +
::::I think the practical thing would be to remove all references to md1 and just describe a simple one RAID configuration, with the creation of lvswap remaining optional. Maybe the "Swap space" section could be expanded a bit to describe other ways of dealing with swap (separate array, discrete physical partitions), but I don't think even that is necessary.
 +
::::-[[User:Alphaniner|Alphaniner]] ([[User talk:Alphaniner|talk]]) 19:04, 2 May 2013 (UTC)
 +
:::::Sounds good to me. But isn't the following statement from the article valid?
 +
:::::"Creating the swap space on a separate array is not intended to provide additional redundancy, but instead, to prevent a corrupt swap space from rendering the system inoperable, which is more likely to happen when the swap space is located on the same partition as the root directory."
 +
:::::~ [[User:Filam|Filam]] ([[User talk:Filam|talk]]) 20:43, 2 May 2013 (UTC)
 +
::::::I had forgotten about that. The article is the only place I'd ever heard it, so I don't know if it's true or not. If it is true - and a legitimate concern - then certainly we shouldn't be making any suggestions that would result in that. I guess this would mean either the md1 method or using physical partitions.
 +
::::::- [[User:Alphaniner|Alphaniner]] ([[User talk:Alphaniner|talk]]) 21:57, 2 May 2013 (UTC)
 +
 +
== Optimum RAID link now goes to paid site ==
 +
 +
Under [[Software_RAID_and_LVM#Prepare_hard_drive]] is an external link, "Optimum RAID", at linuxpromagazine.com, which hosted the article in HTML format until sometime in the last couple weeks.  It now requires a paid subscription to view the article as PDF, which is about as far from "open source community" as it gets.  :-\  The link should probably be removed.
 +
 +
In its place... I dunno.  Is there a good writeup elsewhere about measuring and figuring out the best stripe/width/etc mkfs parameters to use with RAID and LVM?  For that matter, is it still required or is mkfs smart enough to Do The Right Thing when confronted with a device like this?
 +
[[User:Superblocked|Superblocked]] ([[User talk:Superblocked|talk]]) 17:43, 22 May 2013 (UTC)
 +
 +
: How about [http://www.linas.org/linux/Software-RAID/Software-RAID-8.html this FAQ]? In general, I think that mdadm does the Right Thing to get decent performance when it's on top of LVM etc... I don't have the references right now to back that up, though. [[User:Giddie|Giddie]] ([[User talk:Giddie|talk]]) 08:50, 23 May 2013 (UTC)

Revision as of 08:50, 23 May 2013

This article is an updated version of the Installing with Software RAID or LVM article. That page has been redirected to this page. The most recent revision of the old article can be found here.

Note: Numerous sections on this talk page were archived to /Archive 1 on May 22, 2012.

Installation image

Which installation image should be used (i.e. Netinstall or Core)? As lilsirecho writes on the forum: "This action occurs when utilizing ftp install which installs the latest kernel rather than the very old kernel in the 2010-05 .iso. ... If you are not using ftp install grub2 may not be compatible with the kernel in 2010-05 .iso." ~ Filam 13:54, 1 September 2011 (EDT)

I don't know a thing about groub2 or RAID, but we now have new official images, from 2011.08.19 - the forum discussion you mention took place 2 weeks before their release. -- Karol 14:14, 1 September 2011 (EDT)
What's the status of this issue? We may have a new official image soon. -- Karol (talk) 20:41, 7 May 2012 (UTC)

Update mdadm.conf

The current instruction fails: the correct method is:

 # mdadm --examine --scan > /mnt/etc/mdadm.conf

I'll edit the page if a) someone can confirm it (it does work for me), and b) it should be added here or on Kynikos's page... Jasonwryan 17:23, 20 February 2012 (EST)

Hi Jason, can you explain why you believe that is the correct directory? The man page states that /etc/mdadm.conf and /etc/mdadm/mdadm.conf are the only defaults. Otherwise you would need to use the -c or --config flag. And why would you add that edit to Kynikos's User page? ~ Filam 23:37, 20 February 2012 (EST)
I recently reinstalled with Raid/LVM/LUKS and when manually updating files from outside the installer (ie, another TTY), I had to preface the directory with /mnt/ to access the correct file - I assumed it had to do with the way the installer sets up a chroot. I meant Kynikos's alternate RAID page (sorry, that wasn't clear) Jasonwryan 23:56, 20 February 2012 (EST)
I don't think it's clear yet... Maybe a link will drive away any doubt :) -- Kynikos 07:18, 21 February 2012 (EST)
Perhaps I am hallucinating: I thought you had a version of this page under development? Jasonwryan 16:21, 21 February 2012 (EST)
Do you mean the RAID article? Both articles should make note of it. Unfortunately, I don't have time to reproduce it. Am I right in assuming that reproducing it would require someone to build a new RAID using the Arch Linux installation media?
Yes: that is correct. This blog article is what tipped me off http://yannickloth.be/blog/2010/08/01/installing-archlinux-with-software-raid1-encrypted-filesystem-and-lvm2/ Jasonwryan 16:21, 21 February 2012 (EST)
Ok, I made a couple changes to the RAID article. Jason, can you append a paragraph to RAID#Update RAID configuration to the effect of "If you are updating the configuration file from the Arch Linux installation media you may need to ...". And then append a brief note template to Software RAID and LVM#Update RAID configuration with a link to the RAID article?
Thanks for taking the time to start a discussion section! ~ Filam 13:41, 21 February 2012 (EST)
Yes - no problem Jasonwryan 16:21, 21 February 2012 (EST)

Much adon't about [/]swap

Assumption 1: '/swap' is a horribly confused way of referring to swap space.

Assumption 2: The md1 array (and only the md1 array) is intended to be used for '/swap'.

If my assumptions are correct, I expect this guide has unwittingly led a lot of people to put their '/swap' on md0 and spread their /home across md0 and md1.

The following command does what the guide seems to intend: devote all free PEs of md1 to lvswap:

lvcreate VolGroupArray -l 100%PV /dev/md1 -n lvswap

- Alphaniner (talk) 18:43, 22 April 2013 (UTC)

Hi Alphaniner, I really appreciate your input to this article. I haven't looked at this article in a while, but I believe I understand what you're talking about.
It looks like arrays are created for the swap space (md1) and root filesystem (md0), but the former is never used later in the article. Instead a swap partition is created on the VG that sits on top of md0. Is that why you would think a reader would setup the swap space on md0?
Can you explain why /home would be spread across md0 and md1? It doesn't look like md1 is added to the Volume Group or even referenced in the article after its creation (which seems to be a related issue).
~ Filam (talk) 15:54, 30 April 2013 (UTC)
The wording of the article - ie. "Make the RAIDs accessible to LVM by converting them into physical volumes" and "Next step is to create a volume group (VG) on the PVs" - suggests both RAIDs are to be 'made into' PVs, and both PVs are to be 'put into' the VG. Sure, the commands don't reflect this, but they don't exclude it either. And this is Arch, after all... one can't expect one is being fed all necessary commands. OTOH, the fact that the creation of lvswap is optional contradicts this interpretation, all the way back to the creation of md1.
How ever I look at it, though, I think this article has some fundamental flaws. And I think rectifying these will involve a lot of rework. Seeing as I've never done any significant wiki-work, I figured it would be sensible to have a discussion.
- Alphaniner (talk) 18:56, 30 April 2013 (UTC)
I completely agree and certainly appreciate that you started the discussion.
The question I'm left with is whether it makes sense to add the swap array to the LVM at all. The only benefit I can think of is that the user can then reduce the swap space if the RAM is upgraded. If less swap space is required then that would allow the root filesystem to use part of the swap array and then there is no separation between the swap space and the root filesystem on the disc.
And then if you ignored the LVM, does it makes sense to use a different RAID level for the swap partitions than the root partitions?
~ Filam (talk) 15:11, 1 May 2013 (UTC)
I think the practical thing would be to remove all references to md1 and just describe a simple one RAID configuration, with the creation of lvswap remaining optional. Maybe the "Swap space" section could be expanded a bit to describe other ways of dealing with swap (separate array, discrete physical partitions), but I don't think even that is necessary.
-Alphaniner (talk) 19:04, 2 May 2013 (UTC)
Sounds good to me. But isn't the following statement from the article valid?
"Creating the swap space on a separate array is not intended to provide additional redundancy, but instead, to prevent a corrupt swap space from rendering the system inoperable, which is more likely to happen when the swap space is located on the same partition as the root directory."
~ Filam (talk) 20:43, 2 May 2013 (UTC)
I had forgotten about that. The article is the only place I'd ever heard it, so I don't know if it's true or not. If it is true - and a legitimate concern - then certainly we shouldn't be making any suggestions that would result in that. I guess this would mean either the md1 method or using physical partitions.
- Alphaniner (talk) 21:57, 2 May 2013 (UTC)

Optimum RAID link now goes to paid site

Under Software_RAID_and_LVM#Prepare_hard_drive is an external link, "Optimum RAID", at linuxpromagazine.com, which hosted the article in HTML format until sometime in the last couple weeks. It now requires a paid subscription to view the article as PDF, which is about as far from "open source community" as it gets.  :-\ The link should probably be removed.

In its place... I dunno. Is there a good writeup elsewhere about measuring and figuring out the best stripe/width/etc mkfs parameters to use with RAID and LVM? For that matter, is it still required or is mkfs smart enough to Do The Right Thing when confronted with a device like this? Superblocked (talk) 17:43, 22 May 2013 (UTC)

How about this FAQ? In general, I think that mdadm does the Right Thing to get decent performance when it's on top of LVM etc... I don't have the references right now to back that up, though. Giddie (talk) 08:50, 23 May 2013 (UTC)