Android allows mounting of removable media over USB. Before the storage media is mounted on the host computer, the Android device unmounts it to ensure that only a single system has the storage media mounted at a time. That works fine for removable media.
When an Android device has only internal memory without any removable media (like the Galaxy Nexus and newer Nexus devices), the device cannot unmount its internal memory to let the host computer mount it. The Android OS requires use of the internal memory. Hence, mounting over USB does not work.
Some devies with internal memory only (like the Nexus S) worked around this problem by providing a separate storage partition not required by the Android OS. That separate partition could be unmounted by Android and allowed to be mounted on the host computer. Multiple storage partitions make it harder for users to manage their storage space. That is, one partition may fill up first while there is plenty of space in the other partition. So recent Nexus devices come only with a single partition in their internal memory which cannot be directly mounted on the host computer.
With such devices, mounting the internal memory on the host computer can be achieved with go-mtpfs using MTP and FUSE. I have tested the following on Ubuntu 12.04.1.
$ sudo apt-get install golang fuse git-core libmtp-dev libfuse-dev
$ mkdir /tmp/go-mtpfs
$ export GOPATH=/tmp/go-mtpfs
$ go get github.com/hanwen/go-mtpfs
$ sudo mv /tmp/go-mtpfs/bin/go-mtpfs /usr/bin/
$ sudo adduser $USER fuse
Mount an Android device:
$ mkdir /tmp/AndroidDevice
$ go-mtpfs /tmp/AndroidDevice &
Use the mounted filesystem:
$ ls /tmp/AndroidDevice
$ ls /tmp/AndroidDevice/Internal\ storage/
$ fusermount -u /tmp/AndroidDevice