How your Linux installer should help you set up filesystems

September 15, 2011

I've said before that Linux installers handle setting up software RAID exactly backwards, forcing you to go from low level mechanics to high level results. In fact this is a symptom of a general failure in how most distributions handle partitioning and setting up filesystems.

The common approach I've seen is to offer you two basic choices: you can accept a few common variants of a canned filesystem configuration or you can specify everything from the ground up. If you're setting up software RAID, the ground up way is tedious and annoying; you create a bunch of partitions for RAID, associate them into RAID arrays, and then assign the RAID arrays to filesystems or swap space or whatever. Once upon a time I though that the right solution to the software RAID issue was basically to add mirrored software RAID to the canned options if the installer detected a suitable hardware setup. In retrospect I was only solving half of the real problem.

The real problem and the real solution is that the installer needs a 'goals-driven' intermediate method of setting up filesystems, one that starts from you wanting a given filesystem and works down instead of starting from the bottom and working up. You would start by telling the installer that you wanted to create a particular filesystem (or a swap area or whatever), then the installer would present you with options about where it'd go; on suitable hardware this would include 'mirrored software RAID' and the installer would take care of the details.

Among other advantages, I think that this would feel less tedious (even if you effectively did all of the same things) because you would always be answering a question that was relevant and necessary for your goal. You would always be moving forward and making progress. (Also, hopefully you would get asked fewer questions because the installer would make sensible choices for you.)

Such a filesystem-down approach to setup wouldn't cover all cases, so it couldn't replace bottom-up partitioning. But if it was added to installers as an option, I think that many people would happily switch to using it instead of the current tedious approach to partitioning.

(Assuming that it covered mirrored software RAID, we certainly would and it would definitely save us time.)

PS: although I haven't looked at auto-installers like Kickstart and FAI recently, my impression is that they already have at least some of this top-down specification of what you want.

Comments on this page:

From at 2011-09-15 05:37:48:

Kickstart definitely won't help here. I have been toying with the idea of generating its (low level) configuration from a higher-level description, but designing a reasonably generic tool is not so easy (read: I can't do it in 10 minutes). Maybe someday...

-- Arnaud Gomes

From at 2011-09-16 18:32:30:

Yeah, Kickstart requires you to specify things in a very particular order, and you definitely have to start by defining partitions, then specifying them as RAID. If you're doing LVM atop mirrored partitions, you also need to set up the volume group and then set up volumes within it.

The advantage, of course, is that you can set it up on one machine and then reuse it, or modify it once you've experimented around to make sure that it works. And, as it's just text, you can theoretically generate it. I generate partition setup for workstations that way, but the mirroring stuff for servers is used pretty rarely and is sufficiently complex and often so specific to a particular machine that I haven't automated that aspect of things.

 -- Claire
Written on 15 September 2011.
« Graphs are not enough (for your monitoring system)
Setting the character encoding for HTML form input »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Thu Sep 15 01:28:37 2011
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.