You are not logged in.

#1 2013-12-30 15:56:56

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Swap does not activate in fstab, but activates manually...

As you can see in this screenshot of a virtual machine screen, during the boot systemd fails to activate swap blaming a timeout.
Yet the device is working, otherwise the rest of the system would not boot, and in fact I can use it from the command line.

In fstab I have this line:

/dev/mapper/encb1 none swap defaults 0 0

I tried to look for that .device file, but as far I can say it is not in the disk.


What can I try? Any insight? Thanks

Last edited by ezzetabi (2013-12-30 16:00:57)

Offline

#2 2014-01-01 15:34:37

Andreaskem
Member
Registered: 2013-10-13
Posts: 67

Re: Swap does not activate in fstab, but activates manually...

(Posting pictures of text is generally frowned upon here.)

What is your drive setup?

Offline

#3 2014-01-04 21:45:36

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Swap does not activate in fstab, but activates manually...

(I did not really have a choice since it is a vm...)

/dev/mapper/encb1 is a partition inside a cryptsetup block (plain dm-crypt) special.

Last edited by ezzetabi (2014-01-04 21:45:57)

Offline

#4 2014-01-04 21:51:02

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,605
Website

Re: Swap does not activate in fstab, but activates manually...

I believe this is the excepted behavior under systemd.  There have been at least one other thread on this topic.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2014-01-05 01:07:54

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Swap does not activate in fstab, but activates manually...

the expected behavior is waiting of a device that is already good for use?

Offline

#6 2014-01-05 01:44:13

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Swap does not activate in fstab, but activates manually...

The most recent releases of systemd have special GUIDs for swap and /home partitions.  If these are set, then it will try to automount them.  Of course, the logic is supposed to be that entries in the fstab should override this, but judging by the forum threads that have been popping up over this of late, this does not seem to be the case.

BTW, had you done a little searching for this issue, you would have found a number of threads.

Offline

#7 2014-01-05 10:56:07

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Swap does not activate in fstab, but activates manually...

I see, I am probably misunderstanding the problem since I cannot find anything. So it is a bug of systemd that will be probably fixed soon. Thanks.

Offline

#8 2014-01-07 13:19:34

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Swap does not activate in fstab, but activates manually...

I read around, but still I have the problem. The GUID problem does not seem to apply as I am using a msdos partition table, or at least this is what partprobe -s states when finding them. And neither are marked as Swap, jsut as Linux.

This is the fdisk output. (This is a real machine, no more pictures! wink )

Disk /dev/mapper/encssd: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8b7370dc

Device              Boot     Start       End   Blocks  Id System
/dev/mapper/encssd1           2048  50333695 25165824  83 Linux
/dev/mapper/encssd2       50333696 250069679 99867992  83 Linux

Offline

#9 2014-01-07 14:01:08

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Swap does not activate in fstab, but activates manually...

Not sure anyone actually read the first post. This is about lvm activation, not the gpt generator.

There's plenty out there about this, including resolved bug reports on our own flyspray. Nothing here is working as intended.

Offline

#10 2014-01-07 14:52:02

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Swap does not activate in fstab, but activates manually...

Sorry guys, I posted this in the "Newbie corner" for a reason. The LVM you are speaking about is the logical volume manager?
I do not think it is correlated, I have no lvm2 in my mkinitcpio configuration.

But, perhaps, since I have partitions inside a plain dm-crypt device is the same problem?

You see?

$ lsblk 
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda           8:0    0 931.5G  0 disk  
└─encplate  254:3    0 931.5G  0 crypt 
sdb           8:16   0 119.2G  0 disk  
└─encssd    254:0    0 119.2G  0 crypt 
  ├─encssd1 254:1    0    24G  0 dm    [SWAP]
  └─encssd2 254:2    0  95.2G  0 dm    
sr0          11:0    1  1024M  0 rom   

encplate and encssd2 do not appear mounted because I used zfs.

Offline

#11 2014-01-07 22:07:56

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Swap does not activate in fstab, but activates manually...

Just using the UUID in fstab solved the issue big_smile

UUID=0bea8e5e-6d77-49d8-b391-3922d5e7991c swap swap defaults,discard 0 0

Offline

Board footer

Powered by FluxBB