Mount a folder from external sd as /data How do I mount /mnt/sdcard/data as /data. Right now the /data has its own partition but it's too small (~500mb) and I would much rather give it more space than move apps and other things to my SD card.

My device is Micromax Canvas 2 A110.

It has a ~2GB internal sd card mounted at /mnt/sdcard2
and an external one at /mnt/sdcard and /sdcard
(I'm on some custom rom that switches internal and external default mount points like that)

I don't know what filesystem those are in.
This is the way to have /data on the SD Card directory:


Copy all /data to the SD card directory: /mnt/sdcard/data
Delete /data
Create a symlink that points to the SD: ln -s /mnt/sdcard/data /data


The main problem is that /data could be EXT2/3/4 partition, while the SD Card is FAT32. The best thing to achieve what you want is to create an extra partition on the SD Card as EXT2/3/4 filesystem. Then you can link the directory /data with the partition.

When the phone restarts, it will mount the data partition more or less like this:

mount &lt;args&gt; /dev/block/mmcblk0p2 /data


Since /data is pointing now to /mnt/sdcard/data, the above command is equivalent to this one:

mount &lt;args&gt; /dev/block/mmcblk0p2 /mnt/sdcard/data


So in the end, we would have our data partition mounted in the SD card. Again, it should be in a separate partition, so we have the SD card as FAT and the extra partition as EXT2/3/4 so it won't fail when it mounts due to the filesystem.

If you want a more elegant solution, you can try any of the XDA Developers App2SD scripts, they let you achieve the same but without symlinking (it will mount it and bind it to /data). You will only need a Custom Recovery to be able to flash them. You can check them here.