I created an /sd-ext partition and linked /cache/download and /cache/dalvik-cache to /sd-ext/... When I boot up the phone and all filesystems are mounted and I start adb shell, "df -h" shows that I have both /sd-ext and /data/sdext2 and they are both connected to the same block device, /dev/block/mmcblk0p2. In fact that partition is mounted on 7 different mount points! Is that supposed to happen?
/dev/block/mmcblk0p2 915.2M 394.7M 471.6M 46% /sd-ext
/dev/block/mmcblk0p2 915.2M 394.7M 471.6M 46% /data/sdext2
/dev/block/mmcblk0p2 915.2M 394.7M 471.6M 46% /data/app
/dev/block/mmcblk0p2 915.2M 394.7M 471.6M 46% /data/app-private
/dev/block/mmcblk0p2 915.2M 394.7M 471.6M 46% /data/data
/dev/block/mmcblk0p2 915.2M 394.7M 471.6M 46% /data/dalvik-cache
/dev/block/mmcblk0p2 915.2M 394.7M 471.6M 46% /sd-ext/download
Furthermore, there is /sd-ext/dalvik-cache and /data/dalvik-cache. They seem to have identical contents. In fact, ls -ldi shows that they are the same inode!
When I first set up the /sd-ext partition, I added it to /etc/fstab. But each time I booted, I found that /etc/fstab was overwritten. Now I can no longer find fstab anywhere on the sd-card!
I also looked in init.rc and found the following:
# grep symlink init.rc
symlink /system/etc /etc
symlink /sys/kernel/debug /d
symlink /system/vendor /vendor
symlink /mnt/sdcard /sdcard
This doesn't really explain why /data/dalvik-cache and /sd-ext/dalvik-cache are the same inode, and many other things I'm seeing.
There is obviously more going on here than meets the eye, and I'd like to get to the bottom of it so I know what's going on.
/data/*
entries make perfect sense to me since the Android OS expects them to be separate partitions. Perhaps it's the same for downloads (or because you linked/cache/download/
)? I have no idea about/data/sdext2/
though. (Side note, I don't get any useful output when runningdf
on my device. Does CM have a special version included?)