How can I prevent my media library from disappearing when I unmount the SD card? I have a rooted stock HTC Rezound and frequently connect it to the computer as a USB mass storage device.   After each time I do this, once I'm disconnected and my SD card is mounted, my media library disappears and I have to rescan my card. This appears to be related to the mounting and unmounting of the card. This has never happened under the same circumstances with other phones. Having to rescan the card is not a big deal but I have several alarms set to use mp3s and I have to rest then every time and that is a pain.

Why is this happening and how can I fix it?
It doesn't know it's different - the scanning process is how it actually checks that.  I have to say on all the Android devices I have come across (Sony Ericsson Xperia X10i, HTC Explorer, Samsung Galaxy Tab, HTC Desire, HTC Desire S, T-Mobile Rapport, Acer E210 - all with either stock ROM or the T-Mobile UK one) this process is automatic - provided you use the handset to "Turn Off USB Storage" and don't just yank the USB cable.  As it's been used in USB mass storage mode potentially any, all, or no files on the card could have been changed.

For my alarms and notifications I have created some lower quality Ogg files (e.g. making sure they are mono and at low bit rate) and added those to internal storage so they are always available while using the minimal amount of storage space on the internal memory of the device.

The rescanning does annoy me a bit though as I listen to music on my handset, so I tend to use SWIFTP (in the Android Market) which runs an FTP server on my phone - this means I can transfer files to/from my handset without having to unmount and mount the storage card and wait ten minutes while it performs a rescan.  For most purposes this is fast enough.