Replacement SD card not mounted properly in device I have an Android 8.1 device (encrypted, not rooted) that is configured to use an SD card as internal storage. That SDcard broke down and needed to be replaced.
After inserting a fresh replacement card, the device recognized it and asked how it should be formatted. I chose &quot;internal&quot;, and the format went though without issues. The card shows up under &quot;Storage&quot; with the correct capacity, just as the old one did.
However, using this card is not possible. All apps that try to access it (like camera, browser downloads, file managers) show &quot;SD card not available&quot; errors.
When I connect to the device through adb shell to check how the file systems are mounted, I can see a difference. This is what shows up when the old card is inserted:
bbb100:/ $ mount
[...]
/dev/block/dm-3 on /mnt/expand/beb7cb3c-0c09-43cf-83b8-ce1eac90a92b type ext4 (rw,dirsync,seclabel,nosuid,nodev,noatime)
/mnt/expand/beb7cb3c-0c09-43cf-83b8-ce1eac90a92b/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid)
/mnt/expand/beb7cb3c-0c09-43cf-83b8-ce1eac90a92b/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid)
/mnt/expand/beb7cb3c-0c09-43cf-83b8-ce1eac90a92b/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid)
/mnt/expand/beb7cb3c-0c09-43cf-83b8-ce1eac90a92b/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid)
bbb100:/ $

and this appears when the new card is inserted:
bbb100:/ $ mount 
[...]
/dev/block/dm-3 on /mnt/expand/49d563a3-0905-4173-a1b3-8c29e3917d2c type ext4 (rw,dirsync,seclabel,nosuid,nodev,noatime,data=ordered)
bbb100:/ $

So it seems the new card is not initialized correctly and/or several directories do not get mounted for whatever reason.
Things I tried to no avail:

re-formatting the card
eject, mount
reboot the device
ran sm partition disk:179,64 private in adb shell just to see if there are any errors on the console (via) - there is no error
tried with different SD card (also brand new) - same behavior
copied device- and partition UUIDs (PTUUID, PARTUUID) from old SD card to new card using gdisk, hoping that Android would recognize the new card as &quot;known&quot; and mount it. It doesn't.

What's going on here and what else can I do to make the card work?
Okay, I figured it out (hat tip to @IrfanLatif). What's going on is this:
Android focuses on one single &quot;primary&quot; SD card that can be used to permanently enhance internal storage, e.g. by moving apps to it.
When it is removed, the system remembers that apps and settings are still stored there, and waits that it shows up again. Other SD cards can be formatted for internal use, but they won't actually be usable until all ties with the known SD card are broken.
This means the card must be explicitly forgotten. The option to Forget a card is available from the Storage menu when that card is not currently inserted.

Be sure to backup everything you need before doing that.
Eject the card via the menu and remove it from the slot.
Tap the card's name in the storage menu and then &quot;Forget&quot;.
Confirm the warning that all data on that card will be lost forever, since the card is encrypted and Android is about to delete the encryption keys.

Only after that, Android will accept a different SD card as its primary storage and make it available to the rest of the system.