Bug 976688

Summary: multipath -w does not work as expected
Product: Red Hat Enterprise Linux 7 Reporter: Xiaowei Li <xiaoli>
Component: device-mapper-multipathAssignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED CURRENTRELEASE QA Contact: yanfu,wang <yanwang>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.0CC: agk, bmarzins, heinzm, msnitzer, prajnoha, qcai
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: device-mapper-multipath-0.4.9-53.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-22 03:55:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xiaowei Li 2013-06-21 07:57:38 UTC
Description of problem:


Version-Release number of selected component (if applicable):
device-mapper-multipath-0.4.9-51.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
# multipath -ll
mpathb (353333330000007d1) dm-2 Linux   ,scsi_debug      
size=1.0G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 32:0:0:1 sdc 8:32 active ready running
`-+- policy='service-time 0' prio=1 status=enabled

1. > /etc/multipath/wwids
2. multipath -W
successfully reset wwids
3. multipath -w mpathb
wwid '353333330000007d1' not in wwids file
4. cat /etc/multipath/wwids 
# Multipath wwids, Version : 1.0
# NOTE: This file is automatically maintained by multipath and multipathd.
# You should not need to edit this file in normal circumstances.
#
# Valid WWIDs:
/353333330000007d1/

workaround:
run multipath -W again, then multipath -w mpathb will work.

Actual results:
multipath -w fails to remove the wwid

Expected results:


Additional info:

Comment 2 Ben Marzinski 2013-06-26 16:05:55 UTC
Multipath wasn't seeking back to the start of the file after it truncated it.  I'll have a package with a fix shortly.

Comment 3 Ben Marzinski 2013-07-05 22:49:59 UTC
This has been fixed now

Comment 4 yanfu,wang 2014-01-22 03:55:21 UTC
It's verified by /kernel/storage/multipath/wwids in RHEL7.0 snap2/snap3 testing:
https://tcms.engineering.redhat.com/run/108940/?from_plan=7249