I'm currently working on enhancment to FAT file system implmentation in the linux kernel. I need to know just after a mount, what is the absolute path to the mount point. I tried different approaches, but it seems that the VFS mount and the actual mount are not binded. Does anyone has an idea how to accomplish that ?
Related
I'm wondering if, in a embedded linux board after the initial booting phase, if I surfing the filesystem using the terminal, is there a place where I can read which dtb file is currently in use from my system? A log stored in filesystem or something similar?
For forensic imaging of drives and/or segments with a native Mac application, I'm booting from external device (usb, hdd, etc.) into BaseSystem. I want to keep the internal drives and/or segments unmounted during the boot process (there is no way of knowing drive/segment volume names and/or UUID before booting). Later will disable disk arbitration, mount these drives/segments and image them.
I've created a deamon (System/Library/LaunchDeamons) for mount blocking (on external boot device), but it only blocks newly attached devices, not internal ones.
Note 1: I've created boot image from BaseSystem.dmg of Sierra (10.12.1), and modified the contents.
Note 2: Since there is no way of knowing drive/segment volume names and/or UUID before booting, it is not possible to use fstab.
I need a direction to follow, any comment may help. Thanks.
Nobody, even commented. I found the solution from a clue keyword from a friend: autodiskmount
I'm writing a fuse file system, and using the volname mount option supported by osxfuse to set the volume name. This works—I can see the correct name in the Finder when I view the folder containing the mount point.
However, I would like to write a test for the functionality to make sure I don't screw it up at some point in the future. How can I get the volume name for the mount programmatically in my test? I tried statfs(2), but statfs::f_mntfromname contains the distinct "file system name", as displayed in the output of mount.
I'm writing this in Go, so am looking for a specific syscall that I can call, not e.g. a Cocoa library function. But if you know how to do it in Cocoa that would still be a useful lead.
I am developing an OSX application that among other things shows mounted volumes as they appear/disappear. I do that using the disk arbitration framework. When I connect my computer to a network drive that I have configured as my time machine backup then a volume appears with the name "timemachine", i.e. the CFDictionary of the appearing device is this:
{DAVolumeMountable=true, DAVolumeNetwork=true, DAVolumeName=timemachine, DAVolumePath=file://localhost/Volumes/timemachine/, DAVolumeKind=afpfs}
I don't want this volume to appear in my application's UI. What criterion can I use to know it is really a time machine volume to exclude it? Just using the name or path seems weird. Wouldn't a drive formatted to have the name "timemachine" theoretically be mounted under the same name/path?
Any advice appreciated.
I don't find an API that identifies Time Machine volumes. You could call out to the tmutil program with the destinationinfo verb. I also see files such as ".com.apple.timemachine.donotpresent" on my Time Machine volume, although that's relying on undocumented implementation details.
By the way, a Time Machine volume can still be used as normal by the user. At least a local one can. They can browse into it and put other files on it besides their backup. Obviously, they shouldn't put anything there that they would be sorry to lose if a drive fails.
If you only want to show the same volumes as are present in the Finder, I would recommend using NSWorkspace and its NSWorkspaceDidMountNotification and NSWorkspaceWillUnmountNotification notifications to learn when volumes are mounted and unmounted. Use -[NSFileManager mountedVolumeURLsIncludingResourceValuesForKeys:options:] with NSVolumeEnumerationSkipHiddenVolumes. You might want to use -getResourceValue:forKey:error: with NSURLVolumeIsBrowsableKey, too, since I'm not sure that non-browsable is synonymous with hidden.
I need to find another way to monitor a directory recursively on an NFS mount on linux box.
Polling seems to be my only option. Any others? Is there a file monitor in ruby that doesn't use inotify?
Inotify requires the kernel and an nfs mount has the limitation that it cannot work over networked file system mounts.
Thanks for any ideas.
edit: This is to be used in my code, not a stand-alone command line tool.
Ara Howard's dirwatch might be a good fit for you. I don't believe it uses iNotify
http://codeforpeople.com/lib/ruby/dirwatch/dirwatch-0.9.0/README