Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #59563 > unrolled thread

Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions

Started byJames Cowgill <jcowgill@debian.org>
First post2017-12-07 01:00 +0100
Last post2018-07-19 02:30 +0200
Articles 8 — 4 participants

Back to article view | Back to linux.debian.kernel


Contents

  Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions James Cowgill <jcowgill@debian.org> - 2017-12-07 01:00 +0100
    Bug#883735: marked as done (initramfs-tools: automatic resume  doesn't work for lvm swap partitions) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2017-12-07 01:10 +0100
    Bug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions James Cowgill <jcowgill@debian.org> - 2017-12-07 01:30 +0100
      Bug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions Ben Hutchings <ben@decadent.org.uk> - 2017-12-07 02:40 +0100
        Bug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions James Cowgill <jcowgill@debian.org> - 2017-12-11 12:40 +0100
    Processed: Re: Bug#883735: Re: Bug#883735: initramfs-tools:  automatic resume doesn't work for lvm swap partitions "Debian Bug Tracking System" <owner@bugs.debian.org> - 2017-12-07 02:40 +0100
    Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions Vladimir K <pzs-fs@yandex.ru> - 2018-01-15 17:00 +0100
    Bug#883735: marked as done (initramfs-tools: automatic resume  doesn't work for lvm swap partitions) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2018-07-19 02:30 +0200

#59563 — Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions

FromJames Cowgill <jcowgill@debian.org>
Date2017-12-07 01:00 +0100
SubjectBug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions
Message-ID<uTRLA-6R2-5@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Package: initramfs-tools
Version: 0.130
Severity: normal

Hi,

I had noticed this bug for quite a while now, but since I rarely turn my
machine off I left investigating what the problem was until now.

Every time I boot my laptop, it prints a lot of messages like this,
before eventually giving up:

Begin: Waiting for suspend/resume device ...
Begin: Running /scripts/local-block ... done
[...]
Begin: Running /scripts/local-block ... done
Gave up waiting for suspend/resume device.

I traced this down to the swap device being on an LVM partition on my
laptop. The script which automatically determines which device to resume
from stores the blkid in the initramfs, but unfortunately the lvm2
local-block script does not know how to activate LVM partitions based on
blkid. This means the swap device is never created and the initramfs
will never be able to find it.

Is it possible (and a good idea) to store the /dev/mapper path instead
of the blkid when the swap partition is on LVM?

I managed to solve my specific issue by manually setting RESUME to the
correct /dev/mapper path.

Thanks,
James

[toc] | [next] | [standalone]


#59564 — Bug#883735: marked as done (initramfs-tools: automatic resume doesn't work for lvm swap partitions)

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2017-12-07 01:10 +0100
SubjectBug#883735: marked as done (initramfs-tools: automatic resume doesn't work for lvm swap partitions)
Message-ID<uTRVf-79B-3@gated-at.bofh.it>
In reply to#59563

[Multipart message — attachments visible in raw view] — view raw

Your message dated Thu, 07 Dec 2017 00:06:11 +0000
with message-id <1512605171.2768.70.camel@decadent.org.uk>
and subject line Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions
has caused the Debian Bug report #883735,
regarding initramfs-tools: automatic resume doesn't work for lvm swap partitions
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
883735: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883735
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#59565 — Bug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions

FromJames Cowgill <jcowgill@debian.org>
Date2017-12-07 01:30 +0100
SubjectBug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions
Message-ID<uTSeB-7im-3@gated-at.bofh.it>
In reply to#59563

[Multipart message — attachments visible in raw view] — view raw

Hi,

On 07/12/17 00:06, Ben Hutchings wrote:
> On Wed, 2017-12-06 at 23:48 +0000, James Cowgill wrote:
>> Package: initramfs-tools
>> Version: 0.130
>> Severity: normal
>>
>> Hi,
>>
>> I had noticed this bug for quite a while now, but since I rarely turn my
>> machine off I left investigating what the problem was until now.
> [...]
>> Is it possible (and a good idea) to store the /dev/mapper path instead
>> of the blkid when the swap partition is on LVM?
>>
>> I managed to solve my specific issue by manually setting RESUME to the
>> correct /dev/mapper path.
>
> This is the correct way to refer to LVs used as root, /usr or resume
> partition.  The reason for this is that lvm2 only activates VGs that
> are definitely needed, and there is no way to determine whether a
> filesystem UUID or label refers to an LV (or which VG it's in).

Ok, but I don't understand why this can't be fixed. Why can't you
convert the /dev/dm-* path from /proc/swaps into a /dev/mapper path when
you generate the initramfs and store that instead?

James

[toc] | [prev] | [next] | [standalone]


#59567 — Bug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions

FromBen Hutchings <ben@decadent.org.uk>
Date2017-12-07 02:40 +0100
SubjectBug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions
Message-ID<uTTkl-7UR-5@gated-at.bofh.it>
In reply to#59565

[Multipart message — attachments visible in raw view] — view raw

Control: reopen -1
Control: tag -1 patch moreinfo

On Thu, 2017-12-07 at 00:22 +0000, James Cowgill wrote:
> Hi,
> 
> On 07/12/17 00:06, Ben Hutchings wrote:
> > On Wed, 2017-12-06 at 23:48 +0000, James Cowgill wrote:
> > > Package: initramfs-tools
> > > Version: 0.130
> > > Severity: normal
> > > 
> > > Hi,
> > > 
> > > I had noticed this bug for quite a while now, but since I rarely turn my
> > > machine off I left investigating what the problem was until now.
> > 
> > [...]
> > > Is it possible (and a good idea) to store the /dev/mapper path instead
> > > of the blkid when the swap partition is on LVM?
> > > 
> > > I managed to solve my specific issue by manually setting RESUME to the
> > > correct /dev/mapper path.
> > 
> > This is the correct way to refer to LVs used as root, /usr or resume
> > partition.  The reason for this is that lvm2 only activates VGs that
> > are definitely needed, and there is no way to determine whether a
> > filesystem UUID or label refers to an LV (or which VG it's in).
> 
> Ok, but I don't understand why this can't be fixed. Why can't you
> convert the /dev/dm-* path from /proc/swaps into a /dev/mapper path when
> you generate the initramfs and store that instead?

Oh I see, I failed to parse 'automatic resume' as meaning automatic
selection of the resume device.

Does the attached patch fix this for you?

Ben.

-- 
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein

[toc] | [prev] | [next] | [standalone]


#59605 — Bug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions

FromJames Cowgill <jcowgill@debian.org>
Date2017-12-11 12:40 +0100
SubjectBug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions
Message-ID<uVuBb-4Cv-3@gated-at.bofh.it>
In reply to#59567

[Multipart message — attachments visible in raw view] — view raw

Hi,

On 07/12/17 01:30, Ben Hutchings wrote:
> Control: reopen -1
> Control: tag -1 patch moreinfo
> 
> On Thu, 2017-12-07 at 00:22 +0000, James Cowgill wrote:
>> Hi,
>>
>> On 07/12/17 00:06, Ben Hutchings wrote:
>>> On Wed, 2017-12-06 at 23:48 +0000, James Cowgill wrote:
>>>> Package: initramfs-tools
>>>> Version: 0.130
>>>> Severity: normal
>>>>
>>>> Hi,
>>>>
>>>> I had noticed this bug for quite a while now, but since I rarely turn my
>>>> machine off I left investigating what the problem was until now.
>>>
>>> [...]
>>>> Is it possible (and a good idea) to store the /dev/mapper path instead
>>>> of the blkid when the swap partition is on LVM?
>>>>
>>>> I managed to solve my specific issue by manually setting RESUME to the
>>>> correct /dev/mapper path.
>>>
>>> This is the correct way to refer to LVs used as root, /usr or resume
>>> partition.  The reason for this is that lvm2 only activates VGs that
>>> are definitely needed, and there is no way to determine whether a
>>> filesystem UUID or label refers to an LV (or which VG it's in).
>>
>> Ok, but I don't understand why this can't be fixed. Why can't you
>> convert the /dev/dm-* path from /proc/swaps into a /dev/mapper path when
>> you generate the initramfs and store that instead?
> 
> Oh I see, I failed to parse 'automatic resume' as meaning automatic
> selection of the resume device.
> 
> Does the attached patch fix this for you?

Thanks, your patch does fix this for me.

James

[toc] | [prev] | [next] | [standalone]


#59566 — Processed: Re: Bug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2017-12-07 02:40 +0100
SubjectProcessed: Re: Bug#883735: Re: Bug#883735: initramfs-tools: automatic resume doesn't work for lvm swap partitions
Message-ID<uTTkl-7UR-7@gated-at.bofh.it>
In reply to#59563
Processing control commands:

> reopen -1
Bug #883735 {Done: Ben Hutchings <ben@decadent.org.uk>} [initramfs-tools] initramfs-tools: automatic resume doesn't work for lvm swap partitions
Bug reopened
Ignoring request to alter fixed versions of bug #883735 to the same values previously set
> tag -1 patch moreinfo
Bug #883735 [initramfs-tools] initramfs-tools: automatic resume doesn't work for lvm swap partitions
Added tag(s) moreinfo and patch.

-- 
883735: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883735
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#59996

FromVladimir K <pzs-fs@yandex.ru>
Date2018-01-15 17:00 +0100
Message-ID<v8fkZ-3AR-1@gated-at.bofh.it>
In reply to#59563
Hi.
I am also seenig this issue in initramfs-tools 0.130 with swap on LVM. Provided patch fixes it.

[toc] | [prev] | [next] | [standalone]


#61475 — Bug#883735: marked as done (initramfs-tools: automatic resume doesn't work for lvm swap partitions)

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2018-07-19 02:30 +0200
SubjectBug#883735: marked as done (initramfs-tools: automatic resume doesn't work for lvm swap partitions)
Message-ID<wd4Zr-3yi-15@gated-at.bofh.it>
In reply to#59563

[Multipart message — attachments visible in raw view] — view raw

Your message dated Thu, 19 Jul 2018 00:19:37 +0000
with message-id <E1ffwfR-000BU0-48@fasolo.debian.org>
and subject line Bug#883735: fixed in initramfs-tools 0.131
has caused the Debian Bug report #883735,
regarding initramfs-tools: automatic resume doesn't work for lvm swap partitions
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
883735: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883735
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web