All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Uzel <petr.uzel@suse.cz>
To: Christophe Varoqui <christophe.varoqui@free.fr>
Cc: dm-devel@redhat.com
Subject: [multipath-tools] kpartx -a: resume ioctl failed: Invalid argument
Date: Tue, 16 Jun 2009 13:55:46 +0200	[thread overview]
Message-ID: <20090616115546.GA704@localhost> (raw)

Hi all,

I have a simple testing linear DM device:

dmsetup info
> Name:              test
> State:             ACTIVE
> Read Ahead:        256
> Tables present:    LIVE
> Open count:        0
> Event number:      0
> Major, minor:      253, 0
> Number of targets: 1

# Let's create a partition:
parted -s /dev/dm-0 mkpart primary ext2 0 10M

# Create devmapping with kpartx:
kpartx -v -a -p _part /dev/dm-0 
> add map test_part1 (253:1): 0 19531 linear /dev/dm-0 1

dmsetup info test_part1
> Name:              test_part1
> State:             ACTIVE
> Read Ahead:        256
> Tables present:    LIVE
> Open count:        0
> Event number:      0
> Major, minor:      253, 1
> Number of targets: 1
> UUID: part1-dm-0

# Recreate the partition with different size:
parted -s /dev/dm-0 rm 1
parted -s /dev/dm-0 mkpart primary ext2 0 20M

# Try to recreate devmappings with kpartx:
kpartx -v -a -p _part /dev/dm-0 
> device-mapper: resume ioctl failed: Invalid argument
> resume failed on test_part1
> add map test_part1 (253:1): 0 39062 linear /dev/dm-0 1

Note: the ioctl doesn't fail when kpartx is called multiple times without
changing the partition table on dm-0.

It happens with current multipath-tools from git. The bug is caused by
----
commit 44b1e84d7eb72a3c03cec486a227dc1beaa9ccd6
Author:     Hannes Reinecke <hare@suse.de>
AuthorDate: Mon Feb 9 13:59:57 2009 +0100
Commit:     Christophe Varoqui <christophe.varoqui@free.fr>
CommitDate: Wed Apr 22 01:44:53 2009 +0200

    Use noflush for kpartx

	kpartx has to use 'noflush' to be able to complete for an all-paths
	down scenario. Otherwise no uevent might be sent and multipath
	will stall.
----

The patch uses --noflush with DM_DEVICE_RESUME, but as far as I understand it,
--noflush makes sense only with DM_DEVICE_SUSPEND.

Perhaps kpartx should suspend the mapping before doing reload?


-- 
Best regards / s pozdravem

Petr Uzel, Packages maintainer
---------------------------------------------------------------------
SUSE LINUX, s.r.o.                          e-mail: puzel@suse.cz
Lihovarská 1060/12                          http://www.suse.cz
190 00 Prague 9                             
Czech Republic                              

                 reply	other threads:[~2009-06-16 11:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090616115546.GA704@localhost \
    --to=petr.uzel@suse.cz \
    --cc=christophe.varoqui@free.fr \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.