lkml.org 
[lkml]   [2010]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mount notification question
On 08/04/2010 08:41 PM, Chris Friesen wrote:
> On 08/02/2010 03:12 PM, Daniel Lezcano wrote:
>
>> Hi all,
>>
>> is there a way to be notified when a mount occurs on the system ?
>>
> Have you looked on google? The link is a bit misleading but they do
> give a way to do it (not using inotify).
>
> http://stackoverflow.com/questions/1113176/how-could-i-detect-when-a-directory-is-mounted-with-inotify
>

Thanks a lot for the pointer. I am not sure this solution will work,
because it is inadequate for watching a specific location in a container
context separated by the mount and the network namespaces. We have
multiple mount points at the same place (eg. the mount point
inheritance, the container configuration and the init scripts may mount
/dev or /var/run several time) and the network namespace separation will
make impossible to watch udev event via a netlink socket. I didn't look
at the inotify implementation but IMHO, it should be worth to add
IN_MOUNT and IN_UNMOUNT events for inotify no ?

Thanks
-- Daniel



\
 
 \ /
  Last update: 2010-08-06 03:11    [W:1.881 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site