Bug 220405 - unable to change the rw permissions of an active cluster mirror
unable to change the rw permissions of an active cluster mirror
Status: CLOSED CURRENTRELEASE
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: cmirror (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jonathan Earl Brassow
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-20 18:47 EST by Corey Marthaler
Modified: 2010-01-11 21:01 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-08-05 17:25:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch to allow permission changes on active cluster mirrors (781 bytes, patch)
2007-03-16 15:26 EDT, Jonathan Earl Brassow
no flags Details | Diff

  None (edit)
Description Corey Marthaler 2006-12-20 18:47:14 EST
Description of problem:

I have one linear and one mirror:
[root@link-07 ~]# lvs
  LV    VG            Attr   LSize Origin Snap%  Move Log        Copy%
  lvol0 mirror_4_3659 -wi-a- 1.00G
  lvol1 mirror_4_3659 mwi-a- 1.00G                    lvol1_mlog 100.00

[root@link-07 ~]# lvscan
  ACTIVE            '/dev/mirror_4_3659/lvol0' [1.00 GB] inherit
  ACTIVE            '/dev/mirror_4_3659/lvol1' [1.00 GB] inherit
[root@link-07 ~]# lvchange -pr /dev/mirror_4_3659/lvol0
  Logical volume "lvol0" changed
[root@link-07 ~]# lvchange -pr /dev/mirror_4_3659/lvol1
  Error locking on node link-04: device-mapper: reload ioctl failed: Invalid
argument
  Error locking on node link-02: device-mapper: reload ioctl failed: Invalid
argument
  Error locking on node link-07: device-mapper: reload ioctl failed: Invalid
argument
  Error locking on node link-08: device-mapper: reload ioctl failed: Invalid
argument
  Failed to lock lvol1


Console:
Dec 20 17:56:43 link-07 dmeventd[2917]: Monitoring mirror device,
mirror_4_3659-lvol1 for events
Dec 20 17:57:09 link-07 dmeventd[2917]: mirror_4_3659-lvol1 is now in-sync
Dec 20 18:00:41 link-07 kernel: dm-cmirror: Log already exists with uuid, tonnj7OF
Dec 20 18:00:41 link-07 kernel: device-mapper: dm-mirror: Error creating mirror
dirty log
Dec 20 18:00:41 link-07 kernel: device-mapper: error adding target to table


Version-Release number of selected component (if applicable):
[root@link-07 ~]# rpm -q cmirror
cmirror-1.0.1-0
[root@link-07 ~]# rpm -qa | grep lvm2
lvm2-cluster-debuginfo-2.02.06-7.0.RHEL4
lvm2-cluster-2.02.17-1
lvm2-2.02.17-1
[root@link-07 ~]# uname -ar
Linux link-07 2.6.9-42.17.ELsmp #1 SMP Mon Oct 9 18:42:57 EDT 2006 x86_64 x86_64
x86_64 GNU/Linux
Comment 1 Corey Marthaler 2007-01-04 15:22:16 EST
FWIW, this works just fine in single mode mirrors.

[root@link-08 ~]# lvscan
  ACTIVE            '/dev/corey/mirror' [100.00 MB] inherit
[root@link-08 ~]# lvs -a -o +devices
  LV                VG    Attr   LSize   Origin Snap%  Move Log         Copy% 
Devices                             
  mirror            corey mwi-a- 100.00M                    mirror_mlog 100.00
mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] corey iwi-ao 100.00M                                      
/dev/sdb1(0)                        
  [mirror_mimage_1] corey iwi-ao 100.00M                                      
/dev/sdc1(0)                        
  [mirror_mlog]     corey lwi-ao   4.00M                                      
/dev/sdh1(0)                        
[root@link-08 ~]# lvchange -pr /dev/corey/mirror
  Logical volume "mirror" changed
[root@link-08 ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/corey/mirror
  VG Name                corey
  LV UUID                pGzHZ7-1Xar-PLTV-cuRb-3hcm-LXOq-p1u3Ry
  LV Write Access        read only
  LV Status              available
  # open                 0
  LV Size                100.00 MB
  Current LE             25
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:5
Comment 3 Jonathan Earl Brassow 2007-01-10 12:27:39 EST
Not going into RHEL 4.5.

To change permissions on a device mapper device, the table must be reloaded. 
Cluster mirroring prevents reloads of identical tables.  The fix for this would
involve kernel changes (and associated userspace changes) and is not possible
for 4.5.

There is a workaround though.  Deactivate the mirror, change the permissions,
then reactivate.

Also, we can do better in terms of error reporting.  That is something that can
be done for RHEL 4.5.
Comment 4 Jonathan Earl Brassow 2007-01-10 13:14:51 EST
This is what it prints now.

[root@neo-04 ~]# lvchange -p r vg/lv
  Permissions for mirrored logical volume "lv" cannot be changed while active.
Comment 6 Jonathan Earl Brassow 2007-02-15 11:33:05 EST
The clearing of bug 228104 has also removed the restrictions on changing
permission while a cluster mirror is active...  There is no more need for the
patch that prevents this action (comment 4).
Comment 7 Jonathan Earl Brassow 2007-03-16 15:26:58 EDT
Created attachment 150272 [details]
Patch to allow permission changes on active cluster mirrors
Comment 8 Corey Marthaler 2007-04-12 14:14:40 EDT
Fix verified in lvm2-cluster-2.02.21-3.el4/cmirror-kernel-2.6.9-30.0. Marking
verified.
Comment 9 Chris Feist 2008-08-05 17:25:02 EDT
Fixing as this bug has been fixed in the latest cmirror release.

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