PartitionManagement

Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

  • Launchpad Entry: partition-management

  • Packages affected: hal, nautilus, gnome-vfs2, maybe a few others

Summary

We propose the design of the necessary backend support into UI agnostic infrastructure (HAL) and the user interface integration into Gnome and KDE.

Related to partition management is the occasional fsck at boot. This will be changed to provide proper usplash integration and user feedback.

Release Note

(To be done when beta is available)

Rationale

At the moment there is no GUI tool to change the label of a Linux file system, and no obvious way at all to change the label of a VFAT partition. There are wiki instructions, but this is way too inaccessible.

The fsck at boot time leads to quite a lot of confusion at the moment, since it breaks usplash, leads to unpredictable long boot times, and is not even necessary in general.

Use Cases

  • Jenna wants to change her USB sticks name.
  • Hugo wants to schedule a full filesystem check.
  • Edward doesn't want to have a full filesystem check when running on battery power.

Design

  1. Provide partition renaming similar to file renaming: F2 and icon label editing (currently produces an error message), or "Rename" in the context menu. Renaming will fail with an appropriate error message if the current label appears in /etc/fstab (This is not the default and is discouraged).

  2. Make the "Name" input field in volume properties actually editable instead of producing an error message.
  3. Add a "Check/Repair" button in the drive properties if the volume is not mounted or is mounted readonly. If the volume is mounted R/W, provide a checkbox to run fsck on next boot. Display when the last check happened.
  4. When a file system check happens at boot, display a message in usplash:

    Checking drive <label if present, or device name> for errors... (Press Enter to skip this step.) Allow skipping the fsck only if the file system was clean before.

Implementation

Code Changes

  • (1./2./3.) Provide hal methods for relabeling, checking, and getting the fsck state of a volume, so that DE specific code is kept minimal. Access permissions are similar to mounting privileges, i. e. administrator only for fixed hard disks, local console user for removable drives (enforced by PolicyKit rules).

  • (1./2.) Provide hal methods for getting label constraints (length and character set), specific to the file system. These should be called in file managers (nautilus/konqueror) if such constraints can be set in the input lines; if not, these constraints will be checked when trying to change the label, and an error message box is produced if necessary.
  • (1./2.) Call those hal functions in nautilus when editing the label of a file system instead of producing an error message.
  • (4.) Add an option to fsck to provide machine parseable output and provide a wrapper script which, when usplash is running, uses that option, calls fsck as a forked process and waits for it, and kills it if the file system was clean before and enter is pressed. Also see usplash-polish for an earlier discussion about this.

Relabeling a partition will not immediately mount --move the mountpoint, since this is too error prone. Instead, a symlink with the new label will be added to /media/, which gets added to /media/.hal-mtab and cleaned up on unmount.

UI Changes

  • Nautilus drive/volume icons: Add "Rename..." option to context menu.
  • Nautilus drive/volume properties: Split the current "Name" input line into drive name (fixed) and label (editable).
  • Nautilus drive/volume properties: Display when the last fsck was made and add a "Check now..." button (unmounted drives) or a "Check on next computer restart" check box (mounted volumes).

Test/Demo Plan

(To be done when beta is available)

Outstanding Issues

A major missing feature is a way or tool to format partitions with various file systems, including LUKS encryption support.

DesktopTeam/Specs/PartitionManagement (last edited 2008-08-06 16:24:52 by localhost)