| Summary: | unable to change read/write permissions of active cmirrors | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Corey Marthaler <cmarthal> |
| Component: | cmirror | Assignee: | Jonathan Earl Brassow <jbrassow> |
| Status: | CLOSED WONTFIX | QA Contact: | Cluster QE <mspqa-list> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.7 | CC: | agk, ccaulfie, dwysocha, edamato, heinzm, mbroz |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-11-22 22:19:36 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Corey Marthaler
2011-06-08 20:50:13 UTC
I'm sorry, I'm backing out of this one...
The code that enforces the inability to change permissions is found in lvchange.c:
if ((lv->status & MIRRORED) && (vg_is_clustered(lv->vg)) &&
lv_info(cmd, lv, 0, &info, 0, 0) && info.exists) {
log_error("Cannot change permissions of mirror \"%s\" "
"while active.", lv->name);
return 0;
}
I'm sure you could simply remove this check and the permissions would be allowed to change. However, I'm not clear what the goal is here and how the system is suppose to behave when there are multiple machines with file systems mounted - perhaps already with RW permissions.
Here is how things look in the single machine case:
[root@bp-01 ~]# mount /dev/vg/lv /mnt
[root@bp-01 ~]# lvchange -pr vg/lv
Logical volume "lv" changed
[root@bp-01 ~]# touch /mnt/foo
[root@bp-01 ~]# ls -l /mnt
total 13
-rw-r--r-- 1 root root 0 Nov 22 16:09 foo
drwx------ 2 root root 12288 Nov 22 16:09 lost+found
[root@bp-01 ~]# umount /mnt
[root@bp-01 ~]# !mount
mount /dev/vg/lv /mnt
mount: block device /dev/vg/lv is write-protected, mounting read-only
So, in the single machine case, we are allowed to change the permissions while the device is open, but the file system can still proceed to use the block device using the permissions it was originally opened with. It is only forced into read-only mode if a mount is attempted after the permission change.
It seems to me that it is the right thing to do to force users to deactivate the logical volume in order to change the permissions. This forces them to unmount their file systems. After all, what is the point in changing the permissions on their LV if they are allowed to keep running in the old mode?
Unless someone weighs in on this to convince me otherwise, I am closing this bug WONTFIX. (Additionally, I would think it proper to open a new bug to address the exposed issue on single machine illustrated above, but that may actually be expected behavior...)
|