Bug 191230 - using mount --move results in wrong data in /etc/mtab
using mount --move results in wrong data in /etc/mtab
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-09 17:46 EDT by Radek Bíba
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-26 07:40:00 EDT
Type: ---
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 Radek Bíba 2006-05-09 17:46:02 EDT
Description of problem:
When trying to reconfigure a mount point to be in another directory using
`mount --move olddir newdir', wrong record is written to /etc/mtab.

Version-Release number of selected component (if applicable):
util-linux-2.13-0.20.1

How reproducible:
Always

Steps to Reproduce:
1. have a partition/nfs share/whatever mounted in a directory, say /home/users,
and try to "move" the mountpoint somewhere else, say to /opt
2. mount --move /home/users/ opt
3. see `mount'
  
Actual results:
...
server:/home/users on /home/users type nfs...
/home/users on /opt type none (rw)

Expected results:
Well, it depends... I guess there chould be an additional record for the moved
directory, but it seems better to reflect status of /proc/mounts, which in this
case contains:
server:/home/users/ /opt nfs...

Additional info:
BTW, if one tries to make another move, back to where it was:
mount --move /opt /home/users/
/etc/mtab, and thereby the output of `mount', starts growing:

server:/home/users/ on /home/users type nfs...
/home/users on /opt type none (rw)
/opt on /home/users type none (rw)

while /proc/mounts is still sane and reflects the reality.

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