Re: util-linux-v2.25:mountpoint misnamed or bugged, and "-d" bugged

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 15, 2017 at 06:08:17PM -0700, L A Walsh wrote:
> 
> mountpoint doesn't detect file, device
> or other inode mount points.
> 
> Also, the "-d" switch doesn't show the maj:min of the mounted
> inode.  Of note: "-x" does show the maj:min of a remounted blockdev.

Version, distro, do you have classic mtab, etc, etc.... ?

> #reproduce (showing additional variant w/a char device)
> 
> cd /tmp
> mkdir foo1
> cd foo1
> mkdir mnt
> sudo mount tmpfs -t tmpfs mnt
> touch mnt/file mnt_file mnt_null
> sudo mknod mnt/null c 1 3
> sudo mount --bind mnt/file mnt_file
> sudo mount --bind mnt/null mnt_null
> function is_mountedQ {
>  if /usr/bin/mountpoint -q $1; then
>    echo "$1 is a mount point"
>  else
>    echo "$1 is not a mount point"
>  fi
> }
> is_mountedQ mnt_file
> is_mountedQ mnt_null

Works for me:

# cd /tmp               
# mkdir foo1            
# cd foo1               
# mkdir mnt             
# mount tmpfs -t tmpfs mnt
# touch mnt/file mnt_file mnt_null
# mknod mnt/null c 1 3  
# mount --bind mnt/file mnt_file
# mount --bind mnt/null mnt_null
# mountpoint mnt_null   
mnt_null is a mountpoint
# mountpoint mnt_file   
mnt_file is a mountpoint
 
# findmnt --submounts /tmp
TARGET               SOURCE       FSTYPE OPTIONS
/tmp                 tmpfs        tmpfs  rw,nosuid,nodev
├─/tmp/foo1/mnt      tmpfs        tmpfs  rw,relatime
├─/tmp/foo1/mnt_file tmpfs[/file] tmpfs  rw,relatime
└─/tmp/foo1/mnt_null tmpfs[/null] tmpfs  rw,relatime


    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux