Do SD cards need to be unmounted before removal?


second exodous

Advanced Member
Joined
Sep 27, 2005
Messages
2,974
Location
Utah, USA
Do SD cards need to be unmounted before removing them? I get this error when trying to unmount cards:

Code:
Unable to unmount "SD/MMC Drive":

org.freedesktop.hal.storage.unmount-others no <--(privilege, result)
 
It's a good idea to umount cards before removing them, especially if you've written to them, but a couple of times a lifetime if you need to get a card out without turning off the machine, you'll get away without I've found.

How are you trying to unmount? Using some gui tool it looks like from that error message. Try opening a terminal and doing a 'sudo umount' on the card mount point. That should resolve any gui permission errors, and then we can try to figure out why your gui tool doesn't work.
 
I always had this message when using any of Xfce options.
Works well with Slackware.
 
FWIW, I've always been able to mount and unmount a USB stick using thunar in xfce with user perms. I only ever change SD cards with the unit off, for any time I need to do a full reflash.
 
Can I give myself permission to unmount or do I have to use sudo in a terminal? I'm just right clicking and choosing unmount.
 
It's most likely some process keeping the SD card device busy and not a permission problem, I suspect the PND system may have some part in it. Sometimes unmounting in Thunar works better than the icons on the desktop. However, I'll admit most of the time I just eject them, if I wrote data to it recently I'll run 'sync' on command line as a precautionary before ejecting.
 
I faintly remember reading something about a 2-second write-cache being a thing. So in a way, removing the SD card a few seconds after the activity LED turned off again is supposedly safe.
I've been running the same SD card for 6 years now, being carefully reckless about removing it. Can't say I've lost any data during that time, but hey, please don't blame me if something manages to happen anyways.

Backups don't hurt either way.
 
I've lost a few SD card while removing then when the Pandora is sleeping. So still be careful. If I am unable to unmount, I sudo su and umount it as root (or turn the pandora off before removing the SD card)
 
It's most likely some process keeping the SD card device busy and not a permission problem, I suspect the PND system may have some part in it.

That's a fair point. Normally the devices I eject I've been using to transfer music or other data to my pandora, so they don't contain a pandora folder and nearly no .pnd files.
 
I did an experimental PND years ago to unmount SD, it can find and terminate things still running on it (I suppose it will still work on newer firmwares)

https://pyra-handheld.com/boards/th...r-removing-sd-cards.70611/page-3#post-1207408

Except for some limits to find some complex patterns (where you'll have to find by yourself what is still using the card) it always worked well for me.

Does your experimental PND still work? I tried it last night and it didn't do anything when there were hanging processes preventing me from unmounting.
 
Does your experimental PND still work? I tried it last night and it didn't do anything when there were hanging processes preventing me from unmounting.

I have an older firmware and I can't update, so I'm not sure if it could have issues lately, anyway I remember that it had some limits, sometimes can be very tricky to find out what is running from what... (at some point I'll send my pandora to be repaired...)

Anyway, what do you mean with "it didn't do anything" ?
I'll have to take a look at it, but if I remember well, it should show a list of processes and asking to kill them, then it will try to unmount, and then to force-unmount.
If it wasn't able to find EVERYTHING still running or if it wasn't able to kill them all then the unmount fails.
 
Anyway, what do you mean with "it didn't do anything" ?

Just to make sure, this is what I'm talking about:
http://repo.openpandora.org/?page=detail&app=borkd

Is that yours? If not, could you give me a link to yours?

If it is yours, then:

I mean that nothing happens when I try to launch it. No GUI, nothing.

I'll have to check the logs and maybe examine the code.

I'll keep it around to test later.
 
Just to make sure, this is what I'm talking about:
http://repo.openpandora.org/?page=detail&app=borkd

Is that yours? If not, could you give me a link to yours?

If it is yours, then:

I mean that nothing happens when I try to launch it. No GUI, nothing.

I'll have to check the logs and maybe examine the code.

I'll keep it around to test later.

That's not mine, never used it...

Mine is not on the repo, you can find it attached to the post I linked before:
https://pyra-handheld.com/boards/th...r-removing-sd-cards.70611/page-3#post-1207408

It is called "unmounter.pnd"
 
Back
Top