Re: LABEL for swap partition.



On 1 Nov 2006 09:46:54 -0800, george.e.sullivan@xxxxxxxx wrote:

I have added a second disk to my system that will be used for SWAP
space. I have it ready to go and want to include it in my fstab. I'd
like to use the LABEL method that is currently in fstab for the current
swap space. It looks like this:

LABEL=SWAP-sda2 swap swap and all that stuff.

I can't find how to label a swap disk/space. The tune2fs, fdisk,
parted, and e2label haven't been helpful. They seem to work only for a
partition with a regular filesystem not a swap partition. Anyone know
the command to label SWAP partition? Or perhaps the correct way to use
one of those previously mentioned commands just in case I am missing
something in the manpage. So my new swap entry in fstab would then
look something like:


#LABEL=SWAP-sda2 swap swap defaults 0 0
LABEL=SWAP-hda1 swap swap defaults 0 0


Operating system is Redhat Enterprise Linux Workstation 4.0 Update 4.

Thanks all

You can label it with the mkswap command:

mkswap -L label /dev/hdxx

see: man mkswap

Mektub

.



Relevant Pages

  • Re: swap partition wont mount
    ... for good measure I put this in fstab. ... I had also given the swap partition a label of 'swap', ... "cannot stat swap" blah blah blah ... I have not given a label to mkswap at any time. ...
    (Ubuntu)
  • Re: LABEL for swap partition.
    ... I have it ready to go and want to include it in my fstab. ... I can't find how to label a swap disk/space. ... since it is not a Linux file system in the usual sense. ...
    (comp.os.linux.setup)
  • Re: [opensuse] /dev/disk/by-uuid ?
    ... Use "swapoff" to take it out of service before recreating it then ... sda1, use mkswap to recreate it with a label, then revert the process ... kernel might not see the label till next reboot. ... not running - unless the live founds swap space and uses it. ...
    (SuSE)
  • Re: How to set label on swap partition
    ... so it is no longer recognized by Fedora as a swap. ... > doesn't want to set label since it is not a ext2/ext3 partition. ...
    (Fedora)
  • Re: Sata controller order
    ... This has the effect of juggling the drives so mount does not work. ... solution posted is to mount by label rather than by drive. ... This is possible for EXT2/EXT3 but it is not possile AFAIKS for swap. ... Ron Johnson, Jr. ...
    (Debian-User)