Skip to contentSkip to conversation

umount for deleted backing file?

DISCUSSION Bernhard Voelker 2 participants 3 messages Jul 27, 2012 Util-Linux package

lore
Share & tools
lore
#0 lore raw

Hi *,

shouldn't umount also work for a deleted backing file?

# rm -v /media/sdb5/berny/git/util-linux/tests/output/mount/regfile.img
removed `/media/sdb5/berny/git/util-linux/tests/output/mount/regfile.img'
$ mount | grep regfile
/media/sdb5/berny/git/util-linux/tests/output/mount/regfile.img (deleted) on
/media/sdb5/berny/git/util-linux/tests/output/mount/regfile-mnt type ext3
(rw,relatime,errors=continue,barrier=1,data=ordered)
$ ../umount -v /media/sdb5/berny/git/util-linux/tests/output/mount/regfile.img
umount: /media/sdb5/berny/git/util-linux/tests/output/mount/regfile.img: not found

Have a nice day,
Berny

maintainer
#1 lore raw
Quoted 7 lines · Bernhard Voelker

Hi *,

shouldn't umount also work for a deleted backing file?

# rm -v /media/sdb5/berny/git/util-linux/tests/output/mount/regfile.img
removed `/media/sdb5/berny/git/util-linux/tests/output/mount/regfile.img'
Quoted 6 lines
$ mount | grep regfile
/media/sdb5/berny/git/util-linux/tests/output/mount/regfile.img (deleted) on
/media/sdb5/berny/git/util-linux/tests/output/mount/regfile-mnt type ext3
(rw,relatime,errors=continue,barrier=1,data=ordered)
$ ../umount -v /media/sdb5/berny/git/util-linux/tests/output/mount/regfile.img

try:
umount /media/sdb5/berny/git/util-linux/tests/output/mount/regfile-mnt

man umount:

A file system is specified by giving the directory where it has been mounted. Giving the special device on which the file system lives may also work, but is obsolete...

... just in this case it's for umount difficult to translate a file which does not exist to mountpoint (it's possible but not too robust).

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
#2 lore raw
Quoted 2 lines · Karel Zak

... just in this case it's for umount difficult to translate a file which does not exist to mountpoint (it's possible but not too robust).

I agree, thanks for pointing that out.

Have a nice day,
Berny