Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've created an encrypted volume with TrueCrypt that is currently mounted on Mac OS X (v10.6.6). I have moved both MySQL and Postgres (v8.4) data to my encrypted volume and created symlinks to them. When the MySQL daemon is running and I eject the volume, it will eject without an issue. However, when the Postgres daemon is running and I attempt to eject the volume, a notice pops up saying,

The disk wasn't ejected because one or more programs may be using it.

Are there any work arounds for this?

share|improve this question

closed as not a real question by Chris S, Scott Pack, Chopper3 Feb 7 '11 at 17:15

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer

Stop the daemon so it closes out the files?

I guess I'm not fully understanding...you put the database files on the volume that you're trying to eject while the database is running? That really won't work well. You'd have to stop the database first so there's no open file handles referencing the volume.

share|improve this answer
    
I have the database files on the volume. And I'm trying to eject it while it is running, yes. My goal is to have this encryption work intuitively so it disrupts my workflow as little as possible. It works with MySQL and my guess is, instead of symlinking the entire data directory like I did with Postgres, I just symlinked the databases which allows me to eject the drive with MySQL running without complaint. Perhaps I will experiment with symlinking directly to the Postgres databases instead of the entire data directory, and see if that works out. –  AnomalousThought Feb 7 '11 at 16:53
    
Forcing a dismount usually works still, but it wont end well for the DB. +1 Best to stop the daemon first. –  Chris S Feb 7 '11 at 16:54
2  
You can't eject it while the files are open unless you want corrupted databases. It won't work properly if the volume is yanked out from under the application. –  Bart Silverstrim Feb 7 '11 at 16:55
1  
@Zoredache - maybe he's a data-corruption-pro –  Chopper3 Feb 7 '11 at 17:03
1  
Never before has the phrase "You're doing it wrong" been so accurate. –  Tom O'Connor Feb 8 '11 at 1:28
show 4 more comments

Not the answer you're looking for? Browse other questions tagged or ask your own question.