View Single Post
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#568
on a sidenote: make sure your mountpoint dirs are *empty* when nothing is mounted on them!
E.G. storing photos to MyDocs while MyDocs isn't mounted will create files in the mountpoint dir and those files "vanish" on mounting sth to the dir, and eat up your storage in a "magical" way.
(above advise also applies during mass storage exported MyDocs: don't store anything to MyDocs on device while actually the MyDocs got exported to USB mass storage and thus unmounted)

Code:
t900:~# cd /media/
t900:/media# ls -l mmc1/
drwxrwxrwx    2 user     root        16384 Jul 12  2008 DCIM
drwxrwxrwx    2 user     root        16384 Feb 14  2008 Java
drwxrwxrwx    2 user     root        16384 Jul 12  2008 MSMETADATA
-rw-r--r--    1 user     root         3098 Aug 14  2008 gta03-ng_product_spec.txt
drwxrwxrwx    4 user     root        16384 Jul 14  2008 mp3
t900:/media# #now open battery lid, unmounts mmc1
t900:/media# ls -l mmc1/
t900:/media# echo "big nasty file" >mmc1/this-will-vanish-but-eat-your-stoage-nevertheless
t900:/media# ls -l mmc1/
-rw-r--r--    1 root     root           15 Apr  9 16:17 this-will-vanish-but-eat-your-stoage-nevertheless
t900:/media# #now close battery lid, mounts mmc1
t900:/media# ls -l mmc1/
drwxrwxrwx    2 user     root        16384 Jul 12  2008 DCIM
drwxrwxrwx    2 user     root        16384 Feb 14  2008 Java
drwxrwxrwx    2 user     root        16384 Jul 12  2008 MSMETADATA
-rw-r--r--    1 user     root         3098 Aug 14  2008 gta03-ng_product_spec.txt
drwxrwxrwx    4 user     root        16384 Jul 14  2008 mp3
t900:/media#
You see in above example how " this-will-vanish-but-eat-your-stoage-nevertheless" is hidden from all access after mounting sth to mmc1. Of course the paranoid contemporary may decide to deliberately exploit that effect ;-). Us usual mortals don't want to waste storage for ghost files.


ps.: your mount will fail if *any* filehandle to the mountpoint dir or its content is still open. I.E. if I'd do a "cd mmc1" in above example, the mounting of uSD to /media/mmc1 would fail on closing the lid. That's one of the reasons you need to reboot after fixing the ke-recv issue

/j
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N

Last edited by joerg_rw; 2012-04-09 at 14:42.
 

The Following 5 Users Say Thank You to joerg_rw For This Useful Post: