I had a Sony Xperia Z2 running CyanogenMod 11 (Kitkat 4.4.4). I got curious about Android 5, which is still only in nightly. Before taking a look, I took a full backup in recovery, then upgraded to CM12.
I decided that for now I want to go back to CM11, so I restored my backup, and that worked fine. But after reboot, it's been unable since then, to read or write the external SDcard.
Diagnostic info so far:
1) Android "knows" the SD card exists, because
"Settings -> Storage" can mount and unmount it, and File Explorer can see and navigate to it.
2) If I go back into Kitkat,
Settings -> storage" lists it as mounted but capacity = 0, and
ls -l /storage seems to be saying it has the usual drwxrwx--x permissions.
3) The SD card is listed as having no contents and no size. Log entries in both recovery and logcat suggest some kind of error has occurred during mounting.
logcat errors are: status changed from unmounted->checking->mounted, but then that
cutils "Failed to mkdirat"(/storage/sdcard1/Android), that
Vold returned a failed operation (not specified what the operation was) with
unhandled error 30, that
"VoldConnector NDC Command took too long", and that mkdirat failed because of being a
"Read-only file system".
recovery (CWM 184.108.40.206) errors are that if I unmount and remount the SDcard, CWM log says it
"cannot load volume /misc", that the card's status changed from unmounted -> checking -> checked, it reports
"/storage/sdcard1 mounted", then
"200 0 volume operation succeeded", and then again
"cannot load volume /misc" followed by
"can't partition non mmcblk device /devices/msm_sdcc.2/mmc_host".
CWM can't list or read any files on the card either, perhaps making it likely to be a filing system issue rather than a hardware issue (odds of a sudden card fault exactly upon reverting OS seems small, card also a "known good" brand, Samsung)
Help really appreciated to fix this!