Package: uswsusp
Version: 0.6~cvs20070202-1
Severity: important

s2disk does not mark (software) raid arrays as clean when shutting
down the machine. On the next bootup, the mdadm support in the
initrd starts up the arrays and, finding them dirty, starts a
background reconstruction.

When, afterwards, uswsusp tries to resume, after properly finding and
loading the resume image, it fails to freeze the raid resync
process. Thus, the resume fails and normal boot up continues.

This is a snip from /var/log/kern.log
--------------------------------------------------------
Mar 19 08:52:40 lisa kernel: md: md driver 0.90.3 MAX_MD_DEVS=256, 
MD_SB_DISKS=27
Mar 19 08:52:40 lisa kernel: md: bitmap version 4.39
Mar 19 08:52:40 lisa kernel: md: raid1 personality registered for level 1
Mar 19 08:52:40 lisa kernel: usb 1-1: new low speed USB device using uhci_hcd 
and address 3
Mar 19 08:52:40 lisa kernel: md: md1 stopped.
Mar 19 08:52:40 lisa kernel: md: bind<hda3>
Mar 19 08:52:40 lisa kernel: md: bind<hde3>
Mar 19 08:52:40 lisa kernel: raid1: raid set md1 active with 2 out of 2 mirrors
Mar 19 08:52:40 lisa kernel: md: md2 stopped.
Mar 19 08:52:40 lisa kernel: md: bind<hda4>
Mar 19 08:52:40 lisa kernel: md: bind<hde4>
Mar 19 08:52:40 lisa kernel: md: md2: raid array is not clean -- starting 
background reconstruction
Mar 19 08:52:40 lisa kernel: usb 1-1: configuration #1 chosen from 1 choice
Mar 19 08:52:40 lisa kernel: raid1: raid set md2 active with 2 out of 2 mirrors
Mar 19 08:52:40 lisa kernel: md: syncing RAID array md2
Mar 19 08:52:40 lisa kernel: md: minimum _guaranteed_ reconstruction speed: 
1000 KB/sec/disc.
Mar 19 08:52:40 lisa kernel: md: using maximum available idle IO bandwidth (but 
not more than 200000 KB/sec) for reconstruction.
Mar 19 08:52:40 lisa kernel: md: using 128k window, over a total of 77551424 
blocks.
Mar 19 08:52:40 lisa kernel: input: KYE Genius USB Wheel Mouse as 
/class/input/input2
Mar 19 08:52:40 lisa kernel: input: USB HID v1.00 Mouse [KYE Genius USB Wheel 
Mouse] on usb-0000:00:10.0-1
Mar 19 08:52:40 lisa kernel: device-mapper: ioctl: 4.7.0-ioctl (2006-06-24) 
initialised: [EMAIL PROTECTED]
Mar 19 08:52:40 lisa kernel: Freezing cpus ...
Mar 19 08:52:40 lisa kernel: Stopping tasks: ==========
Mar 19 08:52:40 lisa kernel:  stopping tasks timed out after 20 seconds (1 
tasks remaining):
Mar 19 08:52:40 lisa kernel:   md2_resync
Mar 19 08:52:40 lisa kernel: Restarting tasks...<6> Strange, md2_resync not 
stopped
Mar 19 08:52:40 lisa kernel:  done
Mar 19 08:52:40 lisa kernel: Thawing cpus ...
--------------------------------------------------------

This makes uswsusp completely unusable for me.

I tried testing from single user mode, with all my filesystems
unmounted or mounted read-only. As suspend/resume worked properly in
that case, I think configuration problems can be ruled out.

As can be seen from the log snippet, this system has two raid
arrays. md1, which contains my / filesystem, does not seem to be
affected by this problem. md2 is used as physical volume for lvm. It
might be that this interaction is what's causing the problem.

I assume this could be worked around by moving the resume code earlier
in the bootup sequence, before the starting of raid arrays, but that
would break resume for people whose resume partition is in one (not
that I think they can actually use this right now). Other possible
solution would be to mark arrays as clean on shutdown, but I assume
that'd be the kernel's work.

Before installing uswsusp I used to properly resume/suspend by simply
doing
 /bin/echo shutdown > /sys/power/disk; /bin/echo disk > /sys/power/state
from some custom rolled scripts, on the very same lvm-over-raid
configuration, with a custom built 2.6.17 kernel.

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing'), (400, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-k7
Locale: LANG=es_MX, LC_CTYPE=es_MX (charmap=ISO-8859-1)

Versions of packages uswsusp depends on:
ii  debconf [debconf-2.0]       1.5.11       Debian configuration management sy
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libgcc1                     1:4.1.1-21   GCC support library
ii  libgcrypt11                 1.2.3-2      LGPL Crypto library - runtime libr
ii  libgpg-error0               1.4-1        library for common error values an
ii  libsplashy0                 0.3.2        Library to draw splash screen on b
ii  zlib1g                      1:1.2.3-13   compression library - runtime

Versions of packages uswsusp recommends:
ii  initramfs-tools               0.85f      tools for generating an initramfs
ii  mount                         2.12r-19   Tools for mounting and manipulatin

-- debconf information:
* uswsusp/suspend_loglevel:
  uswsusp/no_swap:
  uswsusp/resume_offset:
* uswsusp/early_writeout: true
* uswsusp/image_size: 120838717
* uswsusp/snapshot_device:
* uswsusp/max_loglevel:
  uswsusp/shutdown_method: platform
* uswsusp/encrypt: true
* uswsusp/RSA_key_bits: 1024
* uswsusp/continue_without_swap: true
* uswsusp/compute_checksum: true
  uswsusp/no_snapshot:
* uswsusp/compress: true
* uswsusp/create_RSA_key: false
* uswsusp/RSA_key_file: /etc/uswsusp.key
* uswsusp/resume_device: /dev/hde2
  uswsusp/splash: false

Attachment: signature.asc
Description: Digital signature

Reply via email to