[Bug 891688] Re: mount -o remount always appends options to /etc/mtab even if they already exist

Martin Pitt martin.pitt at ubuntu.com
Fri Dec 9 07:35:23 UTC 2011


Upstream (Karel Zak) says that this is pretty much wontfix for util-
linux, and man mount says that it doesn't try to parse mount options.
What pm-utils could do here is to remember the old mount options and use
this form instead, i. e. with explicitly specifying the directory:

        The  remount  functionality follows the standard way how the mount
        command works with options from fstab. It means the mount command
        doesn't read fstab (or mtab) only when  a  device  and dir are fully
        specified.

           mount -o remount,rw /dev/foo /dir

        After this call all old mount options are replaced and arbitrary stuff
        from fstab is ignored, except the loop= option which is internally
        generated and maintained by the mount command.

(from man mount).

** Package changed: util-linux (Ubuntu) => pm-utils (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/891688

Title:
  mount -o remount always appends options to /etc/mtab even if they
  already exist

Status in “pm-utils” package in Ubuntu:
  Triaged

Bug description:
  I have an external usb HDD attached to my system to store parts of
  /home. Every time I suspend and resume the laptop, mount appends a
  subset of the mount options to the already existing list.

  I currently have this in the output of mount:

  /dev/sdc1 on /media/LaCie type ext4
  (rw,nosuid,nodev,commit=600,commit=600,commit=0,commit=600,commit=0,commit=600,commit=0,commit=0,commit=0,commit=600,commit=0,commit=0,commit=600,commit=0,commit=600,commit=600,commit=0,uhelper=udisks)

  /etc/fstab doesn't have a line for this disk.

  ---------

  Reproducer:
  $ sudo modprobe scsi_debug
  # ATTENTION! MAKE TRIPLE-SURE ABOUT THE DEVICE NAME HERE!
  $ sudo mkfs.ext4 /dev/sdb
  $ sudo mount /dev/sdb /mnt
  $ grep sdb /etc/mtab
  /dev/sdb /mnt ext4 rw 0 0

  $ sudo mount -o remount,commit=600 /dev/sdb
  $ grep sdb /etc/mtab
  /dev/sdb /mnt ext4 rw,commit=600 0 0

  $ sudo mount -o remount,commit=600 /dev/sdb
  $ grep sdb /etc/mtab
  /dev/sdb /mnt ext4 rw,commit=600,commit=600 0 0

  
  ----------

  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: mount 2.19.1-2ubuntu3
  ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
  Uname: Linux 3.0.0-12-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 1.23-0ubuntu4
  Architecture: amd64
  CheckboxSubmission: ebb646ad5c6c4ca2fe9420855758001f
  CheckboxSystem: 7e42599bda39ea7ff8b528272b6ef52b
  Date: Thu Nov 17 21:29:08 2011
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64+mac (20110127)
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
   LC_PAPER=a4
  SourcePackage: util-linux
  UpgradeStatus: Upgraded to oneiric on 2011-10-15 (33 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/891688/+subscriptions




More information about the foundations-bugs mailing list