Re: [util-linux] Re: magic device renumbering was -- Re: Linux 2.4.2ac20

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Fri Mar 16 2001 - 08:57:31 EST


Andreas Dilger writes:
> Andries writes:
> > > I've implemented a patch for util-linux-2.11a
> > > which adds LABEL support to mkswap(8) and swapon/swapoff(8).
> >
> > But I would prefer a somewhat more ambitious approach.
> >
> > My first thought was: why label individual swap partitions?
> > I almost never want to distinguish swap partitions, and just do
> > "swapon -a". In case one wants to guard against changing device names,
> > why not add an option -A so that "swapon -A" does swapon on each
> > partition with a swap signature?
> >
> > However, that would greatly increase the risk that exists already
> > today: someone has a swap partition, and does mkfs.foo, and
> > it so happens that foofs does not use the sector with the swapsignature.
> > Now this foofs partition has a swap signature, but we would be very
> > unhappy if it were used as swap space.
>
> I think the LABEL is a good intermediate step for people not using LVM.
> It basically allows your /etc/fstab to not have _any_ device names in it.

Exactly. IMO, it doesn't really help having LABEL= on your ext2 partitions
in /etc/fstab if you cannot also do the same on swap partitions.
My LABEL= patch for mkswap/swapon may not be as sexy as a brand new partition
table format [which arguably is the better solution in the long run], but it
does provide a useful improvement NOW with minimal implementation cost and full
compatibility with existing 2.2/2.4 kernels.

> I'm not sure I would be happy with auto-mounting swap partitions,
> especially because this would overwrite any data in the partition. Bad.

Me too. I can easily add Andries' "swapon -A" to my patch, but I really
don't think that semantics should be the default.

Cheers,

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:08 EST