InstallerVolumeManagement

Revision 23 as of 2005-09-19 18:49:55

Clear message

InstallerVolumeManagement

Status

Introduction

This spec considers our options for setting up logical volume management in the installer by default.

Rationale

Partitioning has historically been a headache on default Linux installations. It would help if we could perform Logical Volume Manager (LVM) installations out of the box.

Scope and Use Cases

  • A user adds a hard disk to her computer, and wants to make use of the extra space without having to juggle mount points.
  • Having created separate / and /home partitions, a user finds that he is running out of space in /home, and wants to reallocate more space from /.

Implementation Plan

Today, the standard implementations of logical volume management on Linux revolve around the device-mapper. The most widely used front-ends are LVM2 and EVMS. The back-end storage is compatible between the two, so we are free to make use of the simplest command-line interface available, which currently seems to be LVM2.

There are a number of factors to take into consideration when deploying LVM2 on new systems by default:

  • GRUB does not support /boot on LVM

  • We need to verify that our initrd-tools package supports installing with / on LVM

    • done - 11/05/2005:
      • Our initrd-tools supports installation with / on LVM and /boot on separate partition. This should fit our requirements for breezy. The test has been done installing hoary with manual partition setup. The machine (i386) booted perfectly. As extra test, an upgrade to breezy (including kernel) has been performed successfully. As a side note a 128MB /boot partition was created. After the upgrade to breezy (2 kernel installed) there are still 90MB free. 20MB in use. the missing bits are the ext3 journal data.

  • Resizing tools for LVM2 still need investigation (no e2fsadm)

    • investigation in progress - 11/05/2005:
      • this part is extremely tricky. The lvm side is straight forward and it works smoothly for extending the size of a volume groups (like adding a disk). shrink can work the same way. The real problem is the resize of the filesystem. This is strictly related to the filesystem we need to grow. In my tests / was on ext3/lvm that is probably the hardest one to work on since / can't be umounted. The main issue is that no tools are available to perform online resize that actually work (ext2online is not portable and it requires too many hacks to work properly). The way i could manage to resize / was using the same trick as other resizing tools (like pqmagic) do. I created a slightly extended initrd image with a modified /script, that will take care of the resize operations before actually mounting '/'. This worked very well and:

        • it prevents FS corruption due to the partion being mounted.
        • it is pretty simple to implement as a general solution for N filesystems.
        • it can use the grub magic (what about yaboot?) to boot one kernel stanza once and reboot again into the stable system (tho there is no real need for an extra reboot).

We will investigate these, and apply fixes as required. It will probably be safest to create a separate /boot partition outside LVM; 128MB has been suggested as a sensible default size.

There is already an installer component (partman-auto-lvm) that can automatically create partitions on LVM. This will need testing and bug-fixing (it has not been widely used anywhere yet) and will need work to allow creating a mix of LVM and non-LVM partitions. This should happen early in the Breezy development cycle. We will make LVM partitioning options available (not as the default) early in development, and will then consider whether it can be a safe default. If we encounter problems that primarily affect desktop users, we have the option of considering LVM partitioning as the default only for server installations.

On powerpc, parted does not yet support LVM, although work is in progress on this; thus, for the time being, we may need to make this change only for i386 and amd64. Like GRUB, yaboot does not support /boot on LVM.

  • Started working on partman-auto-lvm (p-a-l from now) and started implementating the basic test infrastructure.
  • 2005-07-05 we are now able to:
    • scratch the entire disk and create the separate "envelope" for /boot and pv/vg for lvm.
    • do some recipe (partman-auto) magic to calculate the proper "envelope".
    • complete the first p-a-l install on i386.. YADADADADA.
  • 2005-07-07 Uploaded preliminary version that should be able to work on i386/amd64 without any problem.
  • 2005-07-08 Uploaded p-a-l with fixed algo to calculate partition size inside the lvm volume.
  • 2005-07-14 After discussion with ColinWatson, we agreed on a more safer approach in this feature implementation. LVM is not ready on all our supported arches (ppc is lacking) and the UI is clearly not ready yet to give our users the best experience (see above notes about resizing /, that also apply to other sensible fs). We will offer the LVM installation on i386/amd64 as an option (as it is now) but we will not make it the default install for breezy. We will instead wait for community response and react according to it for breezy+1 based on the fact that who really needs LVM also know how to handle it.

Data Preservation and Migration

We will not attempt to migrate existing systems to LVM; this is a very hard problem, and would probably be unwise.

Packages Affected

User Interface Requirements

Standard command line user interfaces for modifying and resizing logical volumes exist. Of the available graphical user interfaces, the leader appears to be evmsgui, but it is extremely complex and cryptic. We should investigate other options, and if no adequate solutions are available we should consider developing our own.

Red Hat has system-config-lvm, but its UI needs work and it is lacking in functionality.

Outstanding Issues


CategoryUdu CategorySpec