[systemd-devel] Swap gets activated twice (through fstab and gpt generators)

Chris Murphy lists at colorremedies.com
Tue Jan 27 16:47:07 PST 2015


On Tue, Jan 27, 2015 at 5:28 PM, "Jóhann B. Guðmundsson"
<johannbg at gmail.com> wrote:
>
> On 01/28/2015 12:24 AM, Lennart Poettering wrote:
>>
>> On Tue, 27.01.15 17:17, Chris Murphy (lists at colorremedies.com) wrote:
>>
>>>> > >The problem is simply that we cannot know in advance that /dev/sda7
>>>> > >and /dev/disk/by-uuid/c0e7978b-f82b-4b7f-b72b-6717f6909abc will
>>>> > >eventually refer to the same device.
>>>
>>> >
>>> >Are these just scary looking warnings?
>>
>> It should be unproblematic, but it looks scary right now. The swapon
>> will only succeed once, and fail the second time, and that doesn't
>> look pretty, but the kernel should do the right thing and not get
>> confused by this.
>
>
> I can confirm it does and I simply remove the swap entry in fstab to make it
> go away when I encountered it.
>
> That said are there any real practical benefits of using swap et al in
> today's age or are people just still creating it out of habit?

For those who have hibernation working, it's needed. And there's a
case for it on baremetal servers, it's sometimes better that they slow
down instead of totally face planting. And it can be useful if you
don't have enough memory to do a full fsck on a large file system,
especially if swap is on an SSD it's not as slow as on a HDD. But
otherwise, maybe not.

Over on that other OS that begins with W, it looks like they aren't
using swap directly. Instead there's a separate Intel Rapid Start
specific partition (it has it's own GPT partition type GUID) that puts
some kind of hibernation like file there on normal shutdown. Cold boot
times are insanely fast, like 3-4 seconds from pushing the button.

-- 
Chris Murphy


More information about the systemd-devel mailing list