Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionSal Castiglione
2014-09-16 16:49:43 UTC
Description of problem:
We typically mount /usr as ReadOnly (RO) - if that is the case, doing a "yum erase" will return a successful operation, even though files located in /usr were not removed.
Version-Release number of selected component (if applicable):
6.5
How reproducible:
Always
Steps to Reproduce:
1. mount -o ro,remount /usr
2. yum erase packagename
3.
Actual results:
Failure
Expected results:
Success ?
Additional info:
Additionally, if attempting to install while /usr is mounted RO, there is a failure but that indicates lack of disk space - perhaps that could be modified to indicate the filesystem not being mounted as RW ?
Example:
[root@rhel-adtest2 ~]# mount
/dev/mapper/vg_rhel65templat-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_rhel65templat-lv_home on /home type ext4 (rw,nosuid,nodev)
/dev/mapper/vg_rhel65templat-lv_opt on /opt type ext4 (rw,nosuid,nodev)
/dev/mapper/vg_rhel65templat-lv_tmp on /tmp type ext4 (rw)
/dev/mapper/vg_rhel65templat-lv_usr on /usr type ext4 (ro)
/dev/mapper/vg_rhel65templat-lv_var on /var type ext4 (rw,nosuid,nodev)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
[root@rhel-adtest2 ~]# which mtr
/usr/sbin/mtr
[root@rhel-adtest2 ~]# rm /usr/sbin/mtr
rm: remove regular file `/usr/sbin/mtr'? y
rm: cannot remove `/usr/sbin/mtr': Read-only file system
[root@rhel-adtest2 ~]# yum erase mtr
Loaded plugins: product-id, security, subscription-manager, verify
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mtr.x86_64 2:0.75-5.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================
Removing:
mtr x86_64 2:0.75-5.el6 @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5 96 k
Transaction Summary
=====================================================================================================================================================
Remove 1 Package(s)
Installed size: 96 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : 2:mtr-0.75-5.el6.x86_64 1/1
epel/metalink | 16 kB 00:00
epel | 4.4 kB 00:00
epel/primary_db | 6.3 MB 00:09
rhel-6-server-beta-rpms | 3.4 kB 00:00
rhel-6-server-rpms | 3.7 kB 00:00
rhel-6-server-rpms/primary_db | 28 MB 00:05
rhel-6-server-rpms/productid | 1.7 kB 00:00
rhel-server-dts-6-rpms | 2.9 kB 00:00
rhel-server-dts2-6-rpms | 2.9 kB 00:00
Verifying : 2:mtr-0.75-5.el6.x86_64 1/1
Removed:
mtr.x86_64 2:0.75-5.el6
Complete!
[root@rhel-adtest2 ~]# which mtr
/usr/sbin/mtr
[root@rhel-adtest2 ~]# yum erase mtr
Loaded plugins: product-id, security, subscription-manager, verify
Setting up Remove Process
No Match for argument: mtr
Package(s) mtr available, but not installed.
No Packages marked for removal
[root@rhel-adtest2 ~]# yum install mtr
Loaded plugins: product-id, security, subscription-manager, verify
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mtr.x86_64 2:0.75-5.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
mtr x86_64 2:0.75-5.el6 rhel-6-server-beta-rpms 54 k
Transaction Summary
=====================================================================================================================================================
Install 1 Package(s)
Total download size: 54 k
Installed size: 96 k
Is this ok [y/N]: y
Downloading Packages:
mtr-0.75-5.el6.x86_64.rpm | 54 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Check Error:
installing package mtr-2:0.75-5.el6.x86_64 needs 120KB on the /usr filesystem
Error Summary
-------------
[root@rhel-adtest2 ~]#
Comment 2Valentina Mukhamedzhanova
2014-12-05 10:04:03 UTC
Devel ack for adding a warning that was impossible to remove some file but not for failing whole transaction. This is how upstream rpm and rhel-7 rpm behaves.
Hi Lubos,
the reporter was also asking if the failed attempt to install package on a RO filesystem could be reported more accurately. Are you going to address also this issue?
Hi Lubos,
I am sorry that with my previous question I could made an impression that you really need to do a respin.
Unfortunately, I am afraid we cannot do the change you did. I am not sure if such a change won't be considered as a regression. Some custom scripts could be already parsing rpm output, moreover yum does that too.
Previously we have been addressing yum bugs 1212514 resp. 1051931 where yum is parsing rpm error message and I have just verified that the new rpm build breaks that yum functionality. We would have to update yum too but I guess that it would be better to revert this change.
If we even decide to address also the fs read only case I would rather propose to print an additional message (e.g. filesystem is mounted as read only), not to change the existing one.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-0936.html