Bug 189832 - dmsetup remove_all does not work
Summary: dmsetup remove_all does not work
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: device-mapper
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Alasdair Kergon
QA Contact:
: 189831 189834 (view as bug list)
Depends On:
Blocks: 176344
TreeView+ depends on / blocked
Reported: 2006-04-24 22:57 UTC by Dinesh Surpur
Modified: 2010-01-12 02:16 UTC (History)
7 users (show)

Clone Of:
Last Closed: 2007-05-01 22:42:51 UTC

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0284 normal SHIPPED_LIVE device-mapper bug fix and enhancement update 2007-04-28 18:38:09 UTC

Description Dinesh Surpur 2006-04-24 22:57:00 UTC
Description of problem:

I am running RH4 U3 and when i issue dmsetup remove_all i do not see the 
device links removed from /dev/mapper/<MP Device>. dmsetup table shows the 
devices were removed and /var/log/messages also shows the device removed. 
Issuing multipath -F does not help.  

Version-Release number of selected component (if applicable):
RH4 U3
# rpm -qa | grep -i device

How reproducible:
1. Export the storage volumes to the host
2. Issue "echo "scsi add-single-device"" to add the device to the scsi layer
3. issue multipath command (i had disablad user_friendly_names)
The following /etc/multipath.conf was used
defaults {
        udev_dir                /dev
        polling_interval        10
        selector                "round-robin 0"
        path_grouping_policy    multibus
        getuid_callout          "/sbin/scsi_id -g -u -s /block/%n"
        prio_callout            /bin/true
        rr_min_io               100
        rr_weight               priorities
        failback                immediate
        user_friendly_names     no

devnode_blacklist {
       wwid 26353900f02796769
        devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
        devnode "^hd[a-z]"
        devnode "^cciss!c[0-9]d[0-9]*"
        devnode "sda"

devices {
       device {
               vendor                  "3PARdata"
               product                 "VV"
               path_grouping_policy    multibus
               path_checker            tur       
               no_path_retry           60

4. ls  /dev/mapper
control 350002ac00d58003e 350002ac00d58003e1

5. dmsetup remove_all

From /var/log/messages
multipathd: dm map 350002ac00d58003e removed

6. ls /dev/mapper
control 350002ac00d58003e 350002ac00d58003e1 -- I still see the link

7. multipath -F 
# ls /dev/mapper
control 350002ac00d58003e 350002ac00d58003e1 -- I still see the link

8. dmsetup
dmsetup table
No devices found 

9. cat /proc/partitions -- shows no dm devices.

Things work correctly if dmsetup remove <device> is used. 

This is also causing issues when you use kpartx command it is not adding the 
partition existed on the device with the following error:

Apr 24 14:42:13 sqa-dell2850-01 hal.hotplug[16195]: timout(10000 ms) waiting 
for /block/dm-20
Apr 24 14:42:13 sqa-dell2850-01 hal.hotplug[16200]: timout(10000 ms) waiting 
for /block/dm-20

There is no /dev/dm-20 created

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Alasdair Kergon 2006-05-22 21:52:43 UTC
*** Bug 189834 has been marked as a duplicate of this bug. ***

Comment 2 Alasdair Kergon 2006-05-22 21:52:54 UTC
*** Bug 189831 has been marked as a duplicate of this bug. ***

Comment 3 Alasdair Kergon 2006-05-22 22:01:23 UTC
dmsetup remove_all issues an instruction to the kernel device-mapper to attempt
to remove all its devices.  This is similar to 'lvmchange -R' in the original
version of LVM on 2.4.

To reset /dev/mapper afterwards you need to issue 'dmsetup mknodes'.

Perhaps there's a case for providing a new option that runs both commands at once.

Comment 4 Alasdair Kergon 2006-07-05 17:31:53 UTC
Included in 1.02.08.

Comment 5 RHEL Product and Program Management 2006-08-18 16:07:11 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 9 Red Hat Bugzilla 2007-05-01 22:42:52 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.