Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following line in /etc/fstab:

none  /home/hydra/tmp  tmpfs  user,noauto,size=1000M,uid=1001,gid=1001  0  0

I can do mount ~/tmp as user hydra and it gets mounted ok. The only problem is that even thought it gets added to /proc/mounts, it does not get added to /etc/mtab. When I try a umount ~/tmp (again as hydra) it complains:

umount: /home/hydra/tmp is not mounted (according to mtab)

And when I try -f or -n, it complains that I am not root.


Some more info on the system that manifests this problem:

On sudo umount /home/hydra/tmp, the fs gets unmounted (I think I needed to used -f too)

  • Debian version is testing
  • mount --version -> mount from util-linux 2.19.1 (with libblkid and selinux support)
  • ls -l /etc/mtab -> -rw-r--r-- 1 root root 921 Nov 14 09:08 /etc/mtab
  • cat /proc/mounts | grep rootfs -> rootfs / rootfs rw 0 0
  • /home, /home/hydra nor /home/hydra/tmp are symbolic links
share|improve this question
    
What happens when you run this as root? – PriceChild Nov 11 '11 at 16:11
    
i think you have columns switched around in /etc/fstab. and what's the none for in the first column? tmpfs /home/hydra/tmp user,noauto,size=1000M,uid=1001,gid=1001 0 0 that's how i normally see it – matt Nov 11 '11 at 16:11
    
Oh and by the way, having an entry in /etc/fstab makes no difference to the mount command afaik? (i.e. it isn't required) If you wanted to mount a new addition to /etc/fstab, use mount -a – PriceChild Nov 11 '11 at 16:13
    
@matt No, vrinek's syntax is correct. The first column is the device name, it's ignored for non-device-backed filesystems such as tmpfs. vrinek: what version of Debian are you running? What version of the mount package? What does ls -l /etc/mtab show? Is / mounted read-only? Is /home or /home/hydra or /home/hydra/tmp a symbolic link (with that tmpfs unmounted, what does readlink -f /home/hydra/tmp show)? – Gilles Nov 11 '11 at 18:48
    
@PriceChild An entry in /etc/fstab is required if you want to call mount as a non-root user. – Gilles Nov 11 '11 at 18:50

You must log in to answer this question.

Browse other questions tagged .