CM11 weekly doesn't mount my SD card

Search This thread

forkbomb444

Senior Member
Aug 22, 2013
161
3,585
Sydney
Logcat:
Code:
I/Vold    (  103): Vold 2.1 (the revenge) firing up
D/Vold    (  103): Volume sdcard0 state changing -1 (Initializing) -> 0 (No-Media)
D/Vold    (  103): Volume sdcard0 state changing 0 (No-Media) -> 2 (Pending)
D/DirectVolume(  103): DirectVolume::handlePartitionAdded -> MAJOR 179, MINOR 1, PARTN 1
D/DirectVolume(  103): DirectVolume::handlePartitionAdded -> MAJOR 179, MINOR 2, PARTN 2
D/Vold    (  103): Volume sdcard0 state changing 2 (Pending) -> 1 (Idle-Unmounted)
*snip*
D/DirectVolume(  103): Checking for bad partition major number
D/DirectVolume(  103): Checking for bad partition major number
I/Vold    (  103): /dev/block/vold/179:1 being considered for volume sdcard0
D/Vold    (  103): Volume sdcard0 state changing 1 (Idle-Unmounted) -> 3 (Checking)
D/Vold    (  103): Trying to get filesystem type for /dev/block/vold/179:1
D/MountService(  436): volume state changed for /storage/sdcard0 (unmounted -> checking)
D/MountService(  436): sendStorageIntent Intent { act=android.intent.action.MEDIA_CHECKING dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
*snip*
D/Vold    (  103): Found vfat filesystem on /dev/block/vold/179:1
D/DirectVolume(  103): Volume sdcard0 /mnt/media_rw/sdcard0 partition 179:2 removed
D/DirectVolume(  103): Volume sdcard0 /mnt/media_rw/sdcard0 partition 179:1 removed
D/DirectVolume(  103): Volume sdcard0 /mnt/media_rw/sdcard0 disk 179:0 removed
D/Vold    (  103): Volume sdcard0 state changing 3 (Checking) -> 0 (No-Media)
V/KeyguardService(  525): onCreate()
I/fsck_msdos(  103): ** /dev/block/vold/179:1
I/fsck_msdos(  103): Can't open: No such device or address
I/fsck_msdos(  103): fsck_msdos terminated by exit(8)
E/Vold    (  103): Filesystem check failed (unknown exit code 8)
E/Vold    (  103): /dev/block/vold/179:1 failed FS checks (I/O error)
D/Vold    (  103): Volume sdcard0 state changing 0 (No-Media) -> 1 (Idle-Unmounted)
W/Vold    (  103): Returning OperationFailed - no handler for errno 0
D/MountService(  436): volume state changed for /storage/sdcard0 (checking -> unmounted)
I/PackageManager(  436): Updating external media status from unmounted to unmounted
D/MountService(  436): sendStorageIntent Intent { act=unmounted dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
D/MountService(  436): volume state changed for /storage/sdcard0 (unmounted -> removed)
D/MountService(  436): sendStorageIntent Intent { act=android.intent.action.MEDIA_REMOVED dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
E/VoldConnector(  436): NDC Command {3 volume mount /storage/sdcard0} took too long (3668ms)
E/MountService(  436): Boot-time mount failed (-1)

SD works in CM11 RC1, but not the weekly. The SD card is still found in recovery as well.

If I try and remove the SD card after it's booted it posts the "preparing SD card..." notification and then the "SD card safe to remove" notification.
 

reshampanth

Senior Member
Jul 14, 2012
239
69
Mumbai
www.epiblog.in
Logcat:
Code:
I/Vold    (  103): Vold 2.1 (the revenge) firing up
D/Vold    (  103): Volume sdcard0 state changing -1 (Initializing) -> 0 (No-Media)
D/Vold    (  103): Volume sdcard0 state changing 0 (No-Media) -> 2 (Pending)
D/DirectVolume(  103): DirectVolume::handlePartitionAdded -> MAJOR 179, MINOR 1, PARTN 1
D/DirectVolume(  103): DirectVolume::handlePartitionAdded -> MAJOR 179, MINOR 2, PARTN 2
D/Vold    (  103): Volume sdcard0 state changing 2 (Pending) -> 1 (Idle-Unmounted)
*snip*
D/DirectVolume(  103): Checking for bad partition major number
D/DirectVolume(  103): Checking for bad partition major number
I/Vold    (  103): /dev/block/vold/179:1 being considered for volume sdcard0
D/Vold    (  103): Volume sdcard0 state changing 1 (Idle-Unmounted) -> 3 (Checking)
D/Vold    (  103): Trying to get filesystem type for /dev/block/vold/179:1
D/MountService(  436): volume state changed for /storage/sdcard0 (unmounted -> checking)
D/MountService(  436): sendStorageIntent Intent { act=android.intent.action.MEDIA_CHECKING dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
*snip*
D/Vold    (  103): Found vfat filesystem on /dev/block/vold/179:1
D/DirectVolume(  103): Volume sdcard0 /mnt/media_rw/sdcard0 partition 179:2 removed
D/DirectVolume(  103): Volume sdcard0 /mnt/media_rw/sdcard0 partition 179:1 removed
D/DirectVolume(  103): Volume sdcard0 /mnt/media_rw/sdcard0 disk 179:0 removed
D/Vold    (  103): Volume sdcard0 state changing 3 (Checking) -> 0 (No-Media)
V/KeyguardService(  525): onCreate()
I/fsck_msdos(  103): ** /dev/block/vold/179:1
I/fsck_msdos(  103): Can't open: No such device or address
I/fsck_msdos(  103): fsck_msdos terminated by exit(8)
E/Vold    (  103): Filesystem check failed (unknown exit code 8)
E/Vold    (  103): /dev/block/vold/179:1 failed FS checks (I/O error)
D/Vold    (  103): Volume sdcard0 state changing 0 (No-Media) -> 1 (Idle-Unmounted)
W/Vold    (  103): Returning OperationFailed - no handler for errno 0
D/MountService(  436): volume state changed for /storage/sdcard0 (checking -> unmounted)
I/PackageManager(  436): Updating external media status from unmounted to unmounted
D/MountService(  436): sendStorageIntent Intent { act=unmounted dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
D/MountService(  436): volume state changed for /storage/sdcard0 (unmounted -> removed)
D/MountService(  436): sendStorageIntent Intent { act=android.intent.action.MEDIA_REMOVED dat=file:///storage/sdcard0 (has extras) } to UserHandle{-1}
E/VoldConnector(  436): NDC Command {3 volume mount /storage/sdcard0} took too long (3668ms)
E/MountService(  436): Boot-time mount failed (-1)

SD works in CM11 RC1, but not the weekly. The SD card is still found in recovery as well.

If I try and remove the SD card after it's booted it posts the "preparing SD card..." notification and then the "SD card safe to remove" notification.

I am not a developer but these home remedies might help.
1} Format your SD card from PC. Format any sd-ext partitions if available. Then clean flash CM11
2} Try some other SD card. Your might not be bugged!
 

forkbomb444

Senior Member
Aug 22, 2013
161
3,585
Sydney
I've done some more research, and it looks a lot like a bug with vold, but I really would need someone like @thewisenerd to help out :fingers-crossed: Perhaps a more verbose version of vold might be needed? idk.

dmesg output from a boot (includes me pulling it in/out a few time) (only lines with 'sd' or 'mmc'): paste dot kde dot org/pyrxbgd9z/c5fjco (XDA won't let me put in external links)

It's not a hardware or partitioning issue. Running this bash script:
Code:
while true; do
  if ls /dev/block | grep mmc; then
    killall vold
  fi
done
will cause the SD to appear in /dev/block and be mountable - and when I stop running the script, the blockfiles disappear but the card still remains mounted. fsck_msdos shows no errors when run outside of vold, TWRP works for the card, and it was working before.
 

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Code:
E/Vold    (  103): /dev/block/vold/179:1 failed FS checks (I/O error)

Please mount the card somehow, and fsck it!
 

forkbomb444

Senior Member
Aug 22, 2013
161
3,585
Sydney
Code:
E/Vold    (  103): /dev/block/vold/179:1 failed FS checks (I/O error)

Please mount the card somehow, and fsck it!

Without vold running (on the phone, in the weekly):

Code:
root@pico:/ # fsck_msdos /dev/block/mmcblk0p1
** /dev/block/mmcblk0p1
** Phase 1 - Read FAT (compare skipped)
Attempting to allocate 6477 KB for FAT
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
** Phase 4 - Checking for Lost Files
36 files, 1950664 free (1536242 clusters)
root@pico:/ # mount -t vfat /dev/block/mmcblk0p1 /storage/sdcard0/
root@pico:/ # ls /storage/sdcard0
Alarms
-snip-
root@pico:/ #

Looks a lot like vold is doing something to cause it to error out...
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Without vold running (on the phone, in the weekly):

Code:
root@pico:/ # fsck_msdos /dev/block/mmcblk0p1
** /dev/block/mmcblk0p1
** Phase 1 - Read FAT (compare skipped)
Attempting to allocate 6477 KB for FAT
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
** Phase 4 - Checking for Lost Files
36 files, 1950664 free (1536242 clusters)
root@pico:/ # mount -t vfat /dev/block/mmcblk0p1 /storage/sdcard0/
root@pico:/ # ls /storage/sdcard0
Alarms
-snip-
root@pico:/ #

Looks a lot like vold is doing something to cause it to error out...

Really strange... Could you give some more info on which weekly you are on? I'll try to look through CM's system/vold changes, if anything is breaking stuff...

Also, in any case, did you try connecting the card to a sytem, while on recovery && mounted, and fsck it through Window's CMD, or fsck.msdos?
 

forkbomb444

Senior Member
Aug 22, 2013
161
3,585
Sydney
Really strange... Could you give some more info on which weekly you are on? I'll try to look through CM's system/vold changes, if anything is breaking stuff...

Also, in any case, did you try connecting the card to a sytem, while on recovery && mounted, and fsck it through Window's CMD, or fsck.msdos?

I'm on the latest weekly with the latest aw3som3 kernel (July 2) installed. idk where my microsd adapter's gone, but I'll get one tomorrow and then I'll have some results.
 

forkbomb444

Senior Member
Aug 22, 2013
161
3,585
Sydney
Was it working in earlier builds?

edit: I'm assuming yes :)

please ask more support from the OP @kirmaniarslan ;)

Doesn't work in Omni. Latest build bootloops because something's causing I/O errors... sd-ext is mounted as /data successfully, but then vold comes in and weird stuff happens.

Logcat: ix.io/dgE

Dmesg: ix.io/dgG (all those ext4 errors seem to be because the device has disappeared)

Oh, and CM RC1 has stopped mounting the card (oh joy)

Logcat: ix.io/dgH

Dmesg: ix.io/dgI
 

forkbomb444

Senior Member
Aug 22, 2013
161
3,585
Sydney
Well, weird. It's started working again :D

I reformatted the card to exfat rather than vfat and it's mounting properly now. Weird.

Thanks for your help, though :cowboy:

EDIT: For some reason exfat doesn't mount in aw3som3's TWRP @thewisenerd, it complains about missing tzinfo. Bug?
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
EDIT: For some reason exfat doesn't mount in aw3som3's TWRP @thewisenerd, it complains about missing tzinfo. Bug?

Ah, that! exFat is currently disabled in TWRP (in BoardConfig.mk). fixed that up with the current device tree (local), and will upload TWRP 2.7.1.0 soon.

About missing tzinfo, other people are reporting it too (other devices), and it doesn't seem to have any adverse side-effects, so, I'll choose to ignore it too (until it's (probably) fixed upstream)