13.1-64 Swap fails to activate.

Hello list moderators!

From /var/log/boot.log I get this:

         Starting File System Check on /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part8...
systemd-fsck[492]: /dev/sda1: clean, 385/128000 files, 31267/512000 blocks
  OK  ] Started File System Check on /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part1.
         Mounting /boot...
  OK  ] Found device TOSHIBA_DT01ACA100.
         Starting File System Check on /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part2...
  OK  ] Found device TOSHIBA_DT01ACA100.
  OK  ] Found device TOSHIBA_DT01ACA100.
         Activating swap /dev/sda7...
         Activating swap /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7...
  OK  ] Activated swap /dev/sda7.
[FAILED] Failed to activate swap /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7.
See 'systemctl status dev-disk-by\x2did-ata\x2dTOSHIBA_DT01ACA100_139AVYSRS\x2dpart7.swap' for details.
[DEPEND] Dependency failed for Swap.
  OK  ] Found device TOSHIBA_DT01ACA100.


What’s new here is the “See” line. How would I do that?

I’ve mentioned this swap allocation behavior on a couple of other posts here dealing with other topics.

My 13.1 is an upgrade from 12.3-64 which didn’t have a swap problem. This swap activation error showed up starting with the first reboot after the 13.1 DVD install. According to yast > Online Update, this 13.1-64 is up to date.

I also have a 12.3-64 as a dual boot on the same hdd. That 12.3 does not have a swap problem either.

Again, what is this telling me? See ‘systemctl status dev-disk-by\x2did-ata\x2dTOSHIBA_DT01ACA100_139AVYSRS\x2dpart7.swap’ for details

Heboland.

As systemctl is a tool of systemd, it seems to encourage you let this commandd execute:

systemctl status dev-disk-by\x2did-ata\x2dTOSHIBA_DT01ACA100_139AVYSRS\x2dpart7.swap
man systemctl

As systemctl status only displays data and does not change anything, you could give it a try.

do that line to get more details. You will need to be root I believe

Just a thought… Do you use suspend to disk? Perhaps you were suspended when you did the install and use the same swap.

On 2014-02-28 18:06, heboland wrote:

> What’s new here is the “See” line. How would I do that?

It is simply telling you to execute the command that is inside the «’»
quote symbols. Paste that into a terminal and hit enter.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Thanks for all the responses guys!

Before I forget, these installs are on a tower. There’s no conscious attempt to suspend anything.

I ran the sysctrl command on the 13.1 and saved it to a file, then rebooted to the 12.3 and ran the command again.

This this the 13.1-64 results

root[501] systemctl status dev-disk-by-id-ata-TOSHIBA_DT01ACA100_139AVYSRS-part7.swap
dev-disk-byx2did-atax2dTOSHIBA_DT01ACA100_139AVYSRSx2dpart7.swap - /dev/disk/byx2did/atax2dTOSHIBA_DT01ACA100_139AVYSRSx2dpart7
   Loaded: loaded
   Active: inactive (dead)
     What: /dev/disk/byx2did/atax2dTOSHIBA_DT01ACA100_139AVYSRSx2dpart7
root[502]

The 12.3 version looks similar:

root[501] systemctl status dev-disk-by\x2did-ata\x2dTOSHIBA_DT01ACA100_139AVYSRS\x2dpart7.swap
dev-disk-byx2did-atax2dTOSHIBA_DT01ACA100_139AVYSRSx2dpart7.swap - /dev/disk/byx2did/atax2dTOSHIBA_DT01ACA100_139AVYSRSx2dpart7
      Loaded: loaded
      Active: inactive (dead)
        What: /dev/disk/byx2did/atax2dTOSHIBA_DT01ACA100_139AVYSRSx2dpart7
      CGroup: name=systemd:/system/dev-disk-byx2did-atax2dTOSHIBA_DT01ACA100_139AVYSRSx2dpart7.swap
root[502]

Is the CGroup line significant?

Please understand that this behavior isn’t causing me any known problems! I would just like to know what’s going on. There isn’t any “See” message in the 12.3 boot log.

FWIW, the 12.3 boots from a different boot partition than the 13.1. Both installs are legacy (non-uefi) on the same GTP hdd. If grib2 is involved in this behavior, there may be a difference between the two boot partition’s code. Heboland.

If it were me, I would try doing “mkswap” on the partition, and see whether that fixes the problem.

Thanks for the suggestion nrickert!

I see there’s a little more to making swap that just one command. By the looks of this, I would say it has to be unmounted first.

root[510] mkswap --check /dev/sda7
mkswap: error: /dev/sda7 is mounted; will not make swapspace
root[511]

I’m not surprised sda7 has to first be unmounted. I chose the --check from the man page as something minimally critical. The man page mentions some things that mkswap won’t overwite unless the --force command is used. The force option looks kind of dangerous to me to fix a somewhat cosmetic problem.

FYI, I ran some other swap commands that I’ll include here:

root[512] swapon -s
Filename                Type        Size    Used    Priority
/dev/sda7                                  partition    8191996    0    -1
root[513] free -m
             total       used       free     shared    buffers     cached
Mem:         15766       1572      14194         50         97        896
-/+ buffers/cache:        578      15188
Swap:         7999          0       7999

And this one:

root[514] top

top - 22:55:38 up  2:58,  2 users,  load average: 0.02, 0.02, 0.05
Tasks: 226 total,   1 running, 225 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.1 us,  0.1 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:  16144732 total,  1609908 used, 14534824 free,    99672 buffers
KiB Swap:  8191996 total,        0 used,  8191996 free,   918292 cached

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                         
  884 root      20   0  460972  49692  37812 S 0.665 0.308   0:53.74 X                                                               
 1288 frank     20   0  965400  23688  14204 S 0.333 0.147   0:53.05 netactview                                                      
 1576 frank     20   0  599056  38236  10980 S 0.333 0.237   0:13.78 gmixer                                                          
 2680 frank     20   0  479480  18948  12960 S 0.333 0.117   0:02.71 beaver                                                          
    1 root      20   0   48320   4164   2292 S 0.000 0.026   0:00.54 systemd                                                         
    2 root      20   0       0      0      0 S 0.000 0.000   0:00.00 kthreadd                                                        
    3 root      20   0       0      0      0 S 0.000 0.000   0:00.00 ksoftirqd/0                                                     
    5 root       0 -20       0      0      0 S 0.000 0.000   0:00.00 kworker/0:0H                                                    
    7 root      rt   0       0      0      0 S 0.000 0.000   0:00.00 migration/0                                                     
    8 root      -2   0       0      0      0 S 0.000 0.000   0:00.00 rcuc/0                                                          
    9 root      -2   0       0      0      0 S 0.000 0.000   0:00.00 rcub/0                                                          
   10 root      20   0       0      0      0 S 0.000 0.000   0:04.03 rcu_preempt                                                     
   11 root      20   0       0      0      0 S 0.000 0.000   0:01.08 rcuop/0                                                         
   12 root      20   0       0      0      0 S 0.000 0.000   0:01.14 rcuop/1                                                         
   13 root      20   0       0      0      0 S 0.000 0.000   0:00.88 rcuop/2                                                         
   14 root      20   0       0      0      0 S 0.000 0.000   0:00.99 rcuop/3                                                         
   15 root      20   0       0      0      0 S 0.000 0.000   0:00.14 rcuop/4                                                         
root[515]

One more thing here is that this i7 tower has 32GB of memory. Could that have a bearing on the reported 0 usage? Heboland.

Well, the swap partition is already activated.
And that’s not surprising, seeing your first post:

        Activating swap /dev/sda7...
         Activating swap /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7...
  OK  ] Activated swap /dev/sda7.
[FAILED] Failed to activate swap /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7.

It tries to activate /dev/sda7 (which succeeds) and /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7. The latter one seems to be the same partition, so it cannot work really.
Can you please post your /etc/fstab? Maybe you have 2 entries in there?

One more thing here is that this i7 tower has 32GB of memory. Could that have a bearing on the reported 0 usage? Heboland.

Of course. With 32GiB RAM there should be no need for swap space in most situations (for “normal” use cases at least… :wink: ).
Heck, I don’t even have 32GB total memory, just 2GiB RAM and 2GiB swap…

PS, just to mention: You won’t be able to hibernate with your configuration (32 GiB RAM, 8 GiB swap).
For hibernation, the swap should be at least as big as the RAM (akthough it might work with less), since all of the RAM is saved to the swap partition.

Btw, I do see a problem though:
Your “free” output only reports 15766 MiB (~15GiB) RAM.
So apparently not all of your 32GiB are detected.

What does the BIOS report?

Maybe try to run memtest…

Thanks for the replies wolfi323!

Btw, I do see a problem though:
Your “free” output only reports 15766 MiB (~15GiB) RAM.
So apparently not all of your 32GiB are detected.
This one is my problem! I just looked up the purchase order. My i7 tower memory is a pair of 8GB parts for 16GB total. Guess over a year the memory size grew like a fish story!

This is hwinfo --memory:

root[502] hwinfo --memory
01: None 00.0: 10102 Main Memory                                
  [Created at memory.66]
  Unique ID: rdCR.CxwsZFjVASF
  Hardware Class: memory
  Model: "Main Memory"
  Memory Range: 0x00000000-0x3d9656fff (rw)
  Memory Size: 15 GB
  Config Status: cfg=no, avail=yes, need=no, active=unknown
root[503]

This is fstab:

frank[5110] cat /etc/fstab 
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part10 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part11 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part1 /boot                ext2       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part2 /boot32              ext2       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part9 /home32              ext4       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part3 /ntfs                ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part6 /share               vfat       users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part8 /slash32             ext4       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part5 /usr1                ext4       defaults              1 2
frank[5111] cat /etc/fstab
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part10 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part11 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part1 /boot                ext2       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part2 /boot32              ext2       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part9 /home32              ext4       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part3 /ntfs                ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part6 /share               vfat       users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part8 /slash32             ext4       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part5 /usr1                ext4       defaults              1 2
frank[5111]

One other thing I would like to ask here in case I need it in the future is this. If I have to unmount swap, will umount do it? Alternately if I have to unmount swap with swapoff, the command itself only gets it’s help menu. Previously I used swapoff -a. It seemed to work.

The hibernate is something I don’t expect to use. Heboland.

Can’t imagine a scenario where you would want to umount swap

Why are you showing the fstab twice?

You will need to use “swapoff”.

I think you can use:


# swapoff /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7

Some limited help is available with:


# swapoff --help

On 2014-03-01 20:06, heboland wrote:

> One other thing I would like to ask here in case I need it in the future
> is this. If I have to unmount swap, will umount do it?

No. The command is “swapoff”.

> Alternately if I
> have to unmount swap with swapoff, the command itself only gets it’s
> help menu. Previously I used swapoff -a. It seemed to work.

Swap can not be mounted.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-03-01 20:26, nrickert wrote:
> Some limited help is available with:

Why not “man”? :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Unless I misread, he had said that he already used “man” but was still confused.

On 2014-03-01 21:16, nrickert wrote:
>
> robin_listas;2628004 Wrote:
>> Why not “man”? :slight_smile:
>
> Unless I misread, he had said that he already used “man” but was still
> confused.

Oh. :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Thanks for all the replies!

gogalthorp, sorry about the duplicate fstabs! I did cat fstab twice, but the first time the shell window was small and the lines were wrapped. I stretched the window and the wrapped lines didn’t unwind. Apparently they did after I reran the cat and unknowingly I picked up both of them with the mouse.

Can’t imagine a scenario where you would want to umount swap
You’re probably corrected in your statement, but here’s why:

root[510] mkswap --check /dev/sda7 mkswap: error: /dev/sda7 is mounted; will not make swapspace root[511]
If I had to run makswap here, it would have been necessary to unmount sda7, swap, or shut swap off.

robin_listas, OK so umount would not be appropriate to unmount swap. Could I have unmounted sda7?. Maybe something is different with my system, but this is what swapoff gets me:

root[501] swapoff

Usage:
 swapoff [options] <spec>]

Options:
 -a, --all              disable all swaps from /proc/swaps
 -v, --verbose          verbose mode

 -h, --help     display this help and exit
 -V, --version  output version information and exit

The <spec> parameter:
 -L <label>             LABEL of device to be used
 -U <uuid>              UUID of device to be used
 LABEL=<label>          LABEL of device to be used
 UUID=<uuid>            UUID of device to be used
 <device>               name of device to be used
 <file>                 name of file to be used

For more details see swapoff(8).
root[502] 

For me that command needs an option or else it only displays it’s help. I was merely asking the proper way for me to invoke the command. The help menu is different from the swapoff man page. I was trying to shut swap off, not get the help menu.

nrickert as you suggested the spec parameter may be sufficient. I didn’t experiment with it.

I have the impression now that we are back to the beginning of this thread. 13.1 gives a swap activation failure in the boot long, then shows a dependency failure, then activates swap. What’s making 13.1 act like this? Let me copy those couple of lines again here.

         Activating swap /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7...
[FAILED] Failed to activate swap /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7.
See 'systemctl status dev-disk-by\x2did-ata\x2dTOSHIBA_DT01ACA100_139AVYSRS\x2dpart7.swap' for details.
[DEPEND] Dependency failed for Swap.
  OK  ] Activated swap /dev/sda7.

Any more ideas about what’s causing the boot failure messages? Is there a way to find the failed dependency in the log? Heboland.

You don’t have to run mkswap, because it already is a valid swap partition. Otherwise the swap could not be activated.

You might to have to run mkswap only if the activation of the swap partition would fail. But in that case you wouldn’t have to deactivate it since it wouldn’t be activated/in use anyway.

Try to remove this line from your fstab:

/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7 swap                 swap       defaults              0 0

Then your error message should disappear.
Apparently the swap partition gets activated anyway (by systemd maybe?).

Run “free” again afterwards to check whether the swap is still active then or not.

Congratulations wolfi323! You’ve solved another thread for me!

I commented out the fstab line for the swap partition that you had suggested. The boot.log failure line is gone now!

frank[5119] grep -i swap /var/log/boot.log   
         Activating swap /dev/sda7...
  OK  ] Activated swap /dev/sda7.
  OK  ] Reached target Swap.
frank[5120]

The free command response is:

frank[5120] free -m
             total       used       free     shared    buffers     cached
Mem:         15766       1034      14731         56         72        392
-/+ buffers/cache:        569      15196
Swap:         7999          0       7999
frank[5121]

For the record, this is the 13.1 fstab

/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part10 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part11 /home                ext4       acl,user_xattr        1 2
#/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part1 /boot                ext2       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part2 /boot32              ext2       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part9 /home32              ext4       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part3 /ntfs                ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part6 /share               vfat       users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part8 /slash32             ext4       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part5 /usr1                ext4       defaults              1 2

For grins this is the 12.3 fstab:

/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part8 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part9 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part2 /boot                ext2       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part1 /boot13.1            ext2       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part11 /home13.1            ext4       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part3 /ntfs                ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part6 /share               vfat       users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part10 /slash13.1           ext4       defaults              1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part5 /usr1                ext4       defaults              1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Note the 12.3 fstab has the swap entry, but finds no problem with it. I upgraded the 13.1 from a 12.3, but not this current 12.3 install.

I doubt I would have ever figured this 13.1 behavior out by myself. Good job! Heboland.

Some fstab entries are no longer needed. But they are left there if you upgrade rather then a new install.