Re: [opensuse] /dev/disk/by-uuid ?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On Tuesday, 2009-03-31 at 15:07 -0400, Greg Freemyer wrote:

On Tue, Mar 31, 2009 at 2:58 PM, Randall R Schulz <> wrote:
On Tuesday March 31 2009, Greg Freemyer wrote:
...

# mkswap -L swap /dev/sda1
/dev/sda1: Device or resource busy

Obviously, it is in use.

You can't reformat a swap partition while it's being used, of course.
Use "swapoff" to take it out of service before recreating it then
use "swapon" to put it back into service.


# swapoff -a
swapoff: /dev/sda1: Cannot allocate memory


You have three alternatives:

- Try switching to text mode (init 3), to reduce the amount of memory in
use. If it fails try runlevel 1, which stops all services.

- Create another swapspace (on file, for example), add it, then remove
sda1, use mkswap to recreate it with a label, then revert the process
to leave only sda1. After sda1 is activated, change the fstab (the
kernel might not see the label till next reboot.

- Reboot to a live dvd or rescue dvd to do the change while the system is
not running - unless the live founds swap space and uses it.


Remember, all I want to do is "label" the swap partition and update my
fstab to reference it. I can label a mounted filesystem, so it seems
like there should be a tool to label a in use swap partition.

Well, it can be handy, but the devs probably did not find it useful enough to do it. As far as I remember, it is not possible to label a filesystem while in use, and often the kernel does not see the change till you reboot.


I know I'm being a bit pig headed, but every opensuse distro update
I've done recently has told me to abort my upgrade and move away from
/dev/sda style references in /etc/fstab and then restart the upgrade.
(many of my machines started life several versions ago.)

Mine too.


If OpenSUSE is going to advise doing that, it really should provide
basic tools for doing so.

I don't remember off-hand if yast automates this or not :-?

After all, sysadmins have to earn their potatoes somehow ;-)

- -- Cheers,
Carlos E. R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAknSb5gACgkQtTMYHG2NR9UI1wCeJy6lJb0chgahu4Xh60YPp+O/
UKgAnj+89H9jcVHOLR7RA+0+0kdEXyy9
=5BmA
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • 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. ... You can label it with the mkswap command: ...
    (comp.os.linux.setup)
  • Re: Mount labels in fstab?
    ... can it be done with swap on? ... | -L label ... swapoff must be done before mkswap in order to prevent the use during mkswap. ...
    (Fedora)
  • 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)
  • RE: Swap memory
    ... The swap label ... somehow got created with a "space" character inside the label. ... The command was put into the rc.local ... Subject: Swap memory ...
    (Fedora)