[lkml]   [2001]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: magic device renumbering was -- Re: Linux 2.4.2ac20
On Wed, 14 Mar 2001 12:34:06 -0700 (MST), Andreas Dilger wrote in LKML:

>Lars writes:
>> > Put LABEL=<label set with e2label> in you fstab in place of the device name.
>> Which is great, for filesystems that support labels. Unfortunately,
>> this isn't universally available -- for instance, you cannot mount
>> a swap partition by label or uuid, so it is not possible to completely
>> isolate yourself from the problems of disk device renumbering.
>There is room for a LABEL and/or UUID in the swap superblock, if you
>would want to implement support for this.

Despair no more! I've implemented a patch for util-linux-2.11a
which adds LABEL support to mkswap(8) and swapon/swapoff(8).

- I shrunk the padding field in the new-style swap_header to make
room for 16 bytes worth of volume label (same as ext2)
- mkswap -L label also sets the volume label
- swapon -L label looks for a swap partition with the given label
(using a clone of mount(8)'s LABEL/UUID= support code)
- swapon/swapoff -a also handles swap fstab entries where the
device is specified as LABEL=<label>

The patch is available at

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:22    [W:0.025 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site