[opensuse] fstab Swap Entries Akin to Volume-Lable Filesystem Mounts
Hi, Is there any kind of counterpart to the volume label option for activating swap partitions via /etc/fstab? Alternatively, is there a way to have all extant disk partitions that activate all partitions with partition type codes that identify them as swap partitions? And if this cannot be accomplished via /etc/fstab entries, is there a similarly adaptive option based on init scripts?? And if none of the above options are possible, how does one fully exploit file system mounting based on volume labels if swap partitions cannot be specified independently of an absolute and fixed path name in /dev? Thanks. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2008-07-20 at 16:47 -0700, Randall R Schulz wrote:
Hi,
Is there any kind of counterpart to the volume label option for activating swap partitions via /etc/fstab? Alternatively, is there a way to have all extant disk partitions that activate all partitions with partition type codes that identify them as swap partitions?
Yeess... How about... using labels? :-)) LABEL=160_swap swap swap pri=42 0 0 You just have to give a label to the swap partition. See "man mkswap". - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIg9matTMYHG2NR9URAu7ZAJ9gvCHHUqaDW20eZVfRq8aRUBiAIQCgj2H4 TPhnESfUZ9IXzFf0A3sPda8= =7iKh -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
The Sunday 2008-07-20 at 16:47 -0700, Randall R Schulz wrote:
Is there any kind of counterpart to the volume label option for activating swap partitions via /etc/fstab? Alternatively, is there a way to have all extant disk partitions that activate all partitions with partition type codes that identify them as swap partitions?
How about... using labels? :-))
LABEL=160_swap swap swap pri=42 0 0
You just have to give a label to the swap partition. See "man mkswap".
Hi Carlos, This worked for me once with 10.3 "after" installation, but when I try to do it as part of a fresh install, it fails. First boot fails to find the label and issues a warning, plus "top" shows 0-bytes of swap. Regards, Lew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2008-07-20 at 20:12 -0700, Lew Wolfgang wrote:
Carlos E. R. wrote:
The Sunday 2008-07-20 at 16:47 -0700, Randall R Schulz wrote:
Is there any kind of counterpart to the volume label option for activating swap partitions via /etc/fstab? Alternatively, is there a way to have all extant disk partitions that activate all partitions with partition type codes that identify them as swap partitions?
How about... using labels? :-))
LABEL=160_swap swap swap pri=42 0 0
You just have to give a label to the swap partition. See "man mkswap".
Hi Carlos,
This worked for me once with 10.3 "after" installation, but when I try to do it as part of a fresh install, it fails. First boot fails to find the label and issues a warning, plus "top" shows 0-bytes of swap.
I don't know about that, it may be a bug in yast. I'm certainly using this method after installation. In my factory install I have it this way instead: /dev/disk/by-id/ata-ST3320620A_5QF2M56F-part5 swap swap pri=42 and I see that I have commented out this other way: #/dev/disk/by-id/ata-ST340810A_3FB0E72J-part5 swap swap defaults 0 0 and it makes sense, the "0 0" is absurd for swap. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIhE15tTMYHG2NR9URAtvKAJ9kC6JdoJoqSLw8zSEjYd6Z26c5sACfRkZU CwWoIrDzGKmDboVJsQ0sjBk= =Bchz -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 20 July 2008 17:34, Carlos E. R. wrote:
The Sunday 2008-07-20 at 16:47 -0700, Randall R Schulz wrote:
Hi,
Is there any kind of counterpart to the volume label option for activating swap partitions via /etc/fstab? Alternatively, is there a way to have all extant disk partitions that activate all partitions with partition type codes that identify them as swap partitions?
Yeess... How about... using labels? :-))
LABEL=160_swap swap swap pri=42 0 0
You just have to give a label to the swap partition. See "man mkswap".
Thanks. It's odd that I couldn't conjur up a Google search that would show this. Obviously, I should have checked the mkswap man page, too. So I took the swap off-line with swapoff, re-ran mkswap with the -L option, modified my fstab and ran swapon -a, but it failed with this: % swapon -a swapon: cannot canonicalize /dev/disk/by-label/Swap_10_3: No such file or directory swapon: cannot stat /dev/disk/by-label/Swap_10_3: No such file or directory The system did not yet know about the label on that disk slice. So on a hunch I ran /etc/init.d/boot.udev force-reload and then tried the swapon again and this time it worked. By the way, this is for a 10.3 installation. It didn't seem like the kind of thing that would be changing a lot from release to release.
-- Cheers, Carlos E. R.
Thanks. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2008-07-21 at 06:42 -0700, Randall R Schulz wrote:
partitions with partition type codes that identify them as swap partitions?
Yeess... How about... using labels? :-))
LABEL=160_swap swap swap pri=42 0 0
You just have to give a label to the swap partition. See "man mkswap".
Thanks. It's odd that I couldn't conjur up a Google search that would show this. Obviously, I should have checked the mkswap man page, too.
So I took the swap off-line with swapoff, re-ran mkswap with the -L option, modified my fstab and ran swapon -a, but it failed with this:
% swapon -a swapon: cannot canonicalize /dev/disk/by-label/Swap_10_3: No such file or directory swapon: cannot stat /dev/disk/by-label/Swap_10_3: No such file or directory
Curious!
The system did not yet know about the label on that disk slice. So on a hunch I ran /etc/init.d/boot.udev force-reload and then tried the swapon again and this time it worked.
I'll have to remember that trick.
By the way, this is for a 10.3 installation. It didn't seem like the kind of thing that would be changing a lot from release to release.
No... but you know, linux moves a lot, you can't leave anything for granted. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIhJf6tTMYHG2NR9URAtm1AJ4uX7VEwoWPyI9n3VbMsAX7RbIVdQCfZtPS s+owXIVGsfZXA+oePQJiloM= =K1Jm -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Carlos E. R.
-
Lew Wolfgang
-
Randall R Schulz