yosemite unmounts my ramdisk at startup
Today i've tried to make ramdisk automatically created while booting.
I've taken script from one of sites, which google gives me:
#!/bin/bash
ramfs_size_mb=2048
mount_point=/private/tmp
ramfs_size_sectors=$((${ramfs_size_mb}*1024*1024/512))
#ramdisk_dev=`/usr/bin/hdid -nomount ram://${ramfs_size_sectors}`
ramdisk_dev=`hdik -drivekey system-image=yes -nomount ram://${ramfs_size_sectors}`
/sbin/newfs_hfs -v 'ramdisk' ${ramdisk_dev}
/bin/mkdir -p ${mount_point}
/sbin/mount -o union,nobrowse,noatime -t hfs ${ramdisk_dev} ${mount_point}
/usr/sbin/chown root:wheel ${mount_point} /bin/chmod 1777 ${mount_point}
script works excellent, if i launch it from root. then i've added .plist in launchd, in order to start script at boot. after rebooting i've discovered that ramdisk didn't created.
few minutes passed, and i've discovered that script are started, ramdisk are created and mounted, but after 10 seconds after ramdisk mounting, it was unmounted by unknown yosemite system program. i see this in system.log, but cannot determine who is unmounting my ramdisk. i've tried to disable automountd/autofs, but nothing was changed.
this is part of my system.log:
Jan 6 10:58:40 My-Mac-Pro kernel[0]: hfs: mounted ramdisk on device disk2
......
Jan 6 10:58:49 My-Mac-Pro kernel[0]: hfs: unmount initiated on ramdisk on device disk2
please help - how can i debug this situation ? is there are possible to switch on some debug mode, that will show me who is launching umount at boot time ?
Mac Pro, OS X Yosemite (10.10.1)