mount

Python: Get Mount Point on Windows or Linux

I need a function to determine if a directory is a mount point for a drive. I found this code already which works well for linux: def getmount(path): path = os.path.abspath(path) while path != os.path.sep: if os.path.ismount(path): return path path = os.path.abspath(os.path.join(path, os.pardir)) return path But I'...

Using a bash script on a Mac to connect to network shares?

I'm using a Mac at work and would like some network shares mounting when i start the computer. Can i use a bash script (or similar) to connect and mount these shares? The shares are from both Windows and Mac servers and we usually connect using IP addresses. ...

Mount notifications on Solaris - as normal user (not root)

Does anyone know of a good (i.e. efficient) way of getting notifications of filesystem mounts/unmounts and/or new/removed devices in Solaris (10), without requiring root? I'm trying to avoid simply polling /etc/mnttab for new/removed/changed entries, so my first prototype involved using sysevent_subscribe_event to listen for device eve...

Bash Script - umount a device, but don't fail if it's not mounted?

I'm writing a bash script and I have errexit set, so that the script will die if any command doesn't return a 0 exit code, i.e. if any command doesn't complete successfully. This is to make sure that my bash script is robust. I have to mount some filesystems, copy some files over, the umount it. I'm putting a umount /mnt/temp at the sta...

Get information about afp mountpoint in script

I have a couple of macs where the mnthome command does not return the servername/IP in the "Host DNS name:" line. Two questions: Is there any other scriptable way to get the servername/IP of an AFP mount point. Who has an idea why that is? Thanks! ...

loopback mounting individual partitions from within a file that contains a partition table on linux

Is there any new/better way of loopback mounting individual partitions from within a file that contains a partition table on linux? I see the following but they are somewhat dated. http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-01/7183.html http://lists.gnu.org/archive/html/grub-devel/2005-01/msg00077.html ftp://ftp.hq.nasa.gov...

Ruby code on NFS mount, using another file on same mount causes problems.

I'm working on an embedded system whoose details are explained at the end of this post. Tools are ruby on linux. I put my ruby code on a remote NAS device on network and mount it to the embedded system I'm working on using NFS v3. My project scenario is like this: there is an all-in-one auto starter which 1.mounts the nfs share, 2. star...

How to register FUSE filesystem type with mount(8) and fstab?

I've written a small FUSE-based filesystem and now the only part's missing is that I want to register it with fstab(5) to auto-mount it on system startup and/or manually mount it with just mount /srv/virtual-db. How can I achieve this? I know, I can just run /usr/bin/vdbfs.py /srv/virtual-db from some init script, but that's not exactly...

How can I mount an ISO file on Windows 7 to install software that reboots during install?

I have Windows 7. I downloaded the Visual Studio Express 2010 beta ISO file. In installed Virtual Clone Drive and mounted the above ISO file as a drive. I installed from that drive, but upon the necessary reboot, it couldn't find the drive, even after I mounted it again and clicked Try Again, it still couldn't find the file and hence ...

Difference between statvfs() and statfs() system calls?

Why do the statfs() and statvfs() calls both exist when they're so similar? Under what circumstances would I prefer one over the other? ...

Is there a way to mount Android .img to access the AVD (Android Virtual Device) contents?

I feel a bit blind developing on an emulator for Android and not being able to see the file system on the AVD (.img). Is there a way to mount it in Windows or Linux, so that I could at least see the file listing and maybe contents? Bonus if it's mounted with write permissions as well. Thank you. ...

HKLM\SYSTEM\MountedDevices Fully Qualified Name different between 32 and 64 bit Windows 7

I am attempting to resolve a drive letter from a found usb mass storage device via VID and PID. To make this magical connection, I was using the following registry key: Computer\HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices In 32bit versions of windows, the data contained within (for example) \DosDevices\F: is the following: "STORAGE\REMO...

Getting mount point when a USB device is inserted Mac OS X and linux

Hi All, I am trying to develop a program in Mac OS and Linux which lists the files and folders in USB drive. I need to get the some events when USB device is connected and removed. I know that in Mac OS X I can use IOKit. But I do n't know how to get the mount point where the device is mounted. Can I get it using IOkit? Is there any cro...

What is the equivalent of getfsstat() on Linux?

Question says it all. I want C function call that returns the list the mounted filesystems along with associated information such as filesystem type. ...

Partitioning and formatting vmdk virtual disk

Hi, I need to distribute directory containing about 300k files with total size of 20G. Other people should be able to easily access this directory and edit those files. Right now I'm using zip archives, but packing/unpacking takes a really long time. Recently a collegue of mine suggested using some kind of virtual disks. I'm familiar ...

how to get Device id, vendor id and product id of a mounted usb device in Mac OS cocoa

Hi I am trying to write a Cocoa program which detects iPods connected to Mac OS. I am listening to NSWorkspaceDidMountNotification and NSWorkspaceDidUnmountNotification for the USB device mount and unmount notifications. I can get the device path of the mounted device using NSString *path = [[notif userInfo] objectForKey:@"NSDevicePath"...

View a vmdk file from Python?

Is there any way to view the contents of a vmdk file from Python, and to be able to read files from it? (I have no need to write to it). If not, is there any way to mount a vmdk file on a host machine, or generally any other way to look at a vmdk file without attaching it to a VM and running it? ...

Who can explain this technique issue happened on Linux

I wrote a program which need to parse a batch of files. But I found that the parsing speed for local files is lower than the one for remote mounted files. Why? All the files are HTMLs, I do some parsing work on them. Average size is less than 1M. ...

How to tell if a directory is remotely mounted using Java

Is there a way to determine programatically if a particular directory is actually remotely mounted? Can this be done with Java, and if not can it be done with native C code over JNI? Since this is Java it could be running under Linux or Windows or Mac, so a proper solution needs to address all these platforms. (Again if its multiple se...

Finding the path of a mounted network share on Mac OS X

I'd like to find out where a network share is mounted when the mount command fails like this: $ mkdir ~/share $ mount_afp afp://server/share ~/share mount_afp: the volume is already mounted This looked promising... $ mount ... snip ... afp_000000004oMw0q76003DF78u-1.2d000006 on /Volumes/share-1 (afpfs, nodev, nosuid, mounted by usern...