Talk:Software RAID and LVM

From ArchWiki
Revision as of 19:05, 2 May 2013 by Alphaniner (Talk | contribs) (Much adon't about [/]swap)

Jump to: navigation, search

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)