![]() |
Crazy mounting **** all over the place!!!!
Frustrated by the use of the sh|ttifying FAT32 FS on MyDocs and the stupid way it allocates space I decided I wanted to move 'maps' folder to /opt so it could nestle down in a 'real' FS.
The only problem is you cannot symlink (derp) on a fat32. Creating a FS image seemed like to much of of a kludge (besides fat32 doesn't allow sparse files (herp)). Further to this when you plug in USB and mass storage mode everything gets unmounted (herp derp). Fortunately with nix you can mount pretty much anything, anywhere! MyDocs partition is mounted and unmounted by two scripts when you enable/disable mass storage mode. They are: Code:
/usr/sbin/osso-mmc-mount.sh Code:
/usr/sbin/osso-mmc-umount.sh Code:
mount --bind /home/opt/maps_osm /home/user/MyDocs/.maps I also had to include: Code:
##unmount extra stuff While this is very specific to my case it may be useful for other people who want to have things automatically mounted/unmounted/linked to the exported MyDocs partition. |
Re: Crazy mounting **** all over the place!!!!
Huh? Seems clever. Did you notice this:
$ df /home/opt 2064208 (1-k blocks) /home/user/MyDocs 28312128 (1-k blocks) Other than that kudos for you for promoting the DIY philosophy! |
Re: Crazy mounting **** all over the place!!!!
Quote:
Thanks vi_, I wondered about this a lot & when my SD card gets full I'll come back to this post. |
Re: Crazy mounting **** all over the place!!!!
Hey vi_,
thanks for pointing :) But wouldn't it make more sense to mount/umount in the scripts /usr/sbin/osso-usb-mass-storage-enable.sh (early) /usr/sbin/osso-usb-mass-storage-disable.sh (late) ? Did not check those (too tired now). Maybe tomorrow. Question: Indeed I have the problem of not getting unmounted MyDocs when enabling mass storage. But I do not see the reference to my maps storage file. Even if I umount it in advance, I have this problem. I get around when I enter Code:
umount -l MyDocs Any ideas? |
Re: Crazy mounting **** all over the place!!!!
Quote:
osso-mmc-umount.sh is called to unmount MyDocs when you choose 'mass storage' mode. If you look in osso-mmc-umount.sh you will see it goes through about 4 diffent methods of unmounting (starting nicely, ending up rather brutally) only using the next one if the previous has failed. In my change to osso-mmc-umount.sh I told it to specifically unmount a thing I had mounted then wait 2 seconds. After that it goes about its unmounting business as normal. If your Mydocs is not unmounting with osso-mmc-umount.sh AND you have already unmounted your image then something else is holding it open. You sure you are not doing something dumb like leaving your terminal in a directory in MyDocs? |
Re: Crazy mounting **** all over the place!!!!
Quote:
It is like that. Even if I plug in USB and mass storage mode should be enabled (calling osso-mm-umount), the MyDocs keeps mounted, so not accesible from PC. I have investigated and it is definitely the loop mount of the image file. I have booted with the entry in fstab automatically generated. But not mounted the image. This way enaböing USB works and MyDocs gets unmounted. Once I mount the image file (creating /dev/loop0), the umount of MyDocs does not work anymore. Even if I umount the image file (/dev/loop0) in advance. Only solution is 'umount MyDocs -l' manually. This is lazy unmounting, also referenced in osso-mmc-umount, but not called. I know how to workaround, but would like to know the reason (and correct solution). Cheers. --edit Quote:
And this behaviour I normally know only from Windoof (and/or DOS) ... |
Re: Crazy mounting **** all over the place!!!!
Quote:
|
All times are GMT. The time now is 15:40. |
vBulletin® Version 3.8.8