Bug 1291896 - systemd unmounts a filesystem whos underlying lvm cache origin device has been renamed
systemd unmounts a filesystem whos underlying lvm cache origin device has bee...
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.2
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: systemd-maint
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-15 15:13 EST by Corey Marthaler
Modified: 2017-05-31 17:08 EDT (History)
4 users (show)

See Also:
Fixed In Version: systemd-219-19.el7_2.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-12 13:59:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2015-12-15 15:13:44 EST
Description of problem:
So far this only appears to affect cache volumes with lvmlockd. I've tried linear, raid1, and stripe and none were auto unmounted by systemd when the volume was renamed.


SCENARIO - [cache_pool_rename]

*** Cache info for this scenario ***
*  origin (slow):  /dev/mapper/mpatha1
*  pool (fast):    /dev/mapper/mpathc1
************************************

Create a cache volume with fs data, and then rename both the cache pool and cache origin volume
Adding "slow" and "fast" tags to corresponding pvs
Create origin (slow) volume
lvcreate --activate ey -L 4G -n rename_orig_A cache_sanity @slow

Create cache data and cache metadata (fast) volumes
lvcreate --activate ey -L 4G -n rename_pool_A cache_sanity @fast
lvcreate --activate ey -L 12M -n rename_pool_A_meta cache_sanity @fast

Create cache pool volume by combining the cache data and cache metadata (fast) volumes with policy: smq  mode: writeback
lvconvert --yes --type cache-pool --cachepolicy smq --cachemode writeback -c 32 --poolmetadata cache_sanity/rename_pool_A_meta cache_sanity/rename_pool_A
  WARNING: Converting logical volume cache_sanity/rename_pool_A and cache_sanity/rename_pool_A_meta to pool's data and metadata volumes.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Create cached volume by combining the cache pool (fast) and origin (slow) volumes
lvconvert --yes --type cache --cachepool cache_sanity/rename_pool_A cache_sanity/rename_orig_A

Placing an xfs filesystem on origin volume
mkfs.xfs -f /dev/cache_sanity/rename_orig_A
Mounting origin volume
mkdir -p /mnt/rename_orig_A
mount /dev/cache_sanity/rename_orig_A /mnt/rename_orig_A

Writing files to /mnt/rename_orig_A
/usr/tests/sts-rhel7.2/bin/checkit -w /mnt/rename_orig_A -f /tmp/checkit_origin_1 -n 500

Checking files on /mnt/rename_orig_A
/usr/tests/sts-rhel7.2/bin/checkit -w /mnt/rename_orig_A -f /tmp/checkit_origin_1 -v

syncing before snap creation...
Renaming cache ORIGIN volume...
lvrename cache_sanity/rename_orig_A cache_sanity/rename_orig_B


Dec 15 17:33:46 mckinley-03 qarshd[14424]: Running cmdline: lvrename cache_sanity/rename_orig_A cache_sanity/rename_orig_B
Dec 15 17:33:48 mckinley-03 systemd: Unmounting /mnt/rename_orig_A...
Dec 15 17:33:48 mckinley-03 systemd: Requested transaction contradicts existing jobs: Resource deadlock avoided
Dec 15 17:33:48 mckinley-03 kernel: XFS (dm-21): Unmounting Filesystem
Dec 15 17:33:48 mckinley-03 systemd: Unmounted /mnt/rename_orig_A.



[root@mckinley-03 mnt]# lvs -a -o +devices
  LV                    VG               Attr       LSize   Pool            Origin                Data%  Meta%  Move Log Cpy%Sync Convert Devices                  
  [lvmlock]             cache_sanity     -wi-ao---- 256.00m                                                                               /dev/mapper/mpathh1(0)   
  [lvol0_pmspare]       cache_sanity     ewi-------  12.00m                                                                               /dev/mapper/mpathh1(64)  
  rename_orig_B         cache_sanity     Cwi-a-C---   4.00g [rename_pool_A] [rename_orig_B_corig] 4.03   12.92           0.00             rename_orig_B_corig(0)   
  [rename_orig_B_corig] cache_sanity     owi-aoC---   4.00g                                                                               /dev/mapper/mpatha1(0)   
  [rename_pool_A]       cache_sanity     Cwi---C---   4.00g                                       4.03   12.92           0.00             rename_pool_A_cdata(0)   
  [rename_pool_A_cdata] cache_sanity     Cwi-ao----   4.00g                                                                               /dev/mapper/mpathc1(0)   
  [rename_pool_A_cmeta] cache_sanity     ewi-ao----  12.00m                                                                               /dev/mapper/mpathc1(1024)
  [lvmlock]             global           -wi-ao---- 256.00m                                                                               /dev/mapper/mpathd1(0)   


Version-Release number of selected component (if applicable):
3.10.0-325.el7.x86_64
systemd-219-19.el7.x86_64

lvm2-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
lvm2-libs-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
lvm2-cluster-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-libs-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-event-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-event-libs-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 09:58:10 CDT 2015
cmirror-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
sanlock-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
sanlock-lib-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
lvm2-lockd-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
Comment 4 Michal Sekletar 2016-01-12 13:59:13 EST
Bug fix will be shipped in next z-stream batch.
Comment 5 Alfredo Deza 2017-05-31 17:08:44 EDT
Is there any workaround for this issue? We need to support older versions of systemd that will not contain this patch.

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