View Single Post
Posts: 17 | Thanked: 4 times | Joined on Mar 2010 @ Germany
#12
Guess I understand what you desire to do. The short answer is:
It is possible, but not by the default behavior. Actually MyDocs is a separate partition (/dev/mmcblk0p1). You can see this, if you enter "mount" on the command line in Xterminal as long as you are unconnected. If you do the same when connected, you will recognize, that this partition is unmounted, so it can only be accessed from PC side. Doing like you described would result in some scenarios. To keep it "short" I described them below, so you can stop reading after the solution, if you are not interested in the rest ;°)

-> WARNING: Concurrent data access requires special synchronization mechanisms. As unmounting the drive is the default behavior, I believe that Nokia may not have included such mechanism in their drivers. So fiddling with the drive from two different sides is pretty much of provoking data corruption. So only do this if you are aware what you are doing and be very careful!

So, after this important point, here is the "quick 'n' dirty" solution:

- If not done, yet: install rootsh
- Connect in Mass Storage mode
- Open Xterminal
- enter:
$> root
$> mount /dev/mmcblk0p1
$> <Ctrl+D>
$> ls MyDocs

Done!


If you are interested in what happens, if you try it in any "regular" way (like you did), here is why it does not work. Depending on from where you create the folder:

1. You can create /home/user/MyDocs/test on the N900 while unconnected. This folder will be physically created on the MyDocs partition. When you connect your N900 to the PC it will be unmounted with the complete partition. Thus, you can access it from PC side, now, but you won't see it from N900 as long as it is connected.

2. You can create e.g. /mnt/N900/test or E:\test as folder when connected. This would be effectively the same as described under 1.

3. If you create /home/user/MyDocs/test from N900 while connected, it will be created within the /dev/mmcblk0p2 (mark the last 2!!!), which is the partition mounted as /home (you can see this with "mount", too). So test will be a sub-folder of /home/user/MyDocs. The PC again cannot see th /dev/mmcblk0p2 file system,and thus cannot access this folder. But you can cd into it and do some work stuff. However, it'll get funny, as soon as you disconnect from the PC. /dev/mmcblk0p1 will be remounted under /home/user/MyDocs and will hide the test folder. If you happen to be there in your Xterminal session, trying to do some stuff will work as long as you do not use any relative or local file system access. If you try, you will get some error messages, saying, that your current working directory does not exist. You can escape by cd with an existing absolute path name. (Haven't tried this on my device, but this is standard UNIX behavior)

Other approaches like links will not work: Hard links can only be used inside the same file system. Symbolic links are only a reference to a path name as if you used this path directly. So, you would face all effects described above if...........

.......if a vfat file system (such as /dev/mmcblk0p1) could manage links at all ;°)