Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an external hard-drive which has only one, truecrypted partition (I am not sure if it is important). If I have the drive connected and then hibernate my notebook, is it safe to disconnect that drive and, later, connect it back before waking up from the hibernation?

The system which I use is Windows 7.

Edit: Just to assure, I am talking about a situation, where the hibernation will be completed, so the computer will be turned off by that moment.

share|improve this question
1  
You should always unmount a drive before you disconnect it. –  Ramhound May 1 '13 at 10:59
    
I would hope so, but I have no idea how TrueCrypt may work inside. –  Daniel R Hicks May 1 '13 at 11:05
    
I think it would be OK as long as you meanwhile didn't connect the external drive up to some other machine and mounted the same truecrypted partition on it. FWIW, I've done this with a mounted truecrypt volume which resides on an always-on NAS file server with no ill effects -- of course I consider the volume as still in use and don't try to mount it from other systems on while it's in this state. –  martineau May 1 '13 at 16:10
add comment

5 Answers 5

When you sleep or hibernate a system any on-going I/O is quiesced. A well-behaved device driver will assure that there are no on-going operations -- eg, any file move operations will be stopped in such a way that overall consistency is maintained, and file directories and free-space tables will be completely written.

Of course, there's no guarantee that the TrueCrypt drivers are "well-behaved", but one would expect that they are.

share|improve this answer
    
You're talking about file operations and file system consistency and seem to be suggesting that TrueCrypt's driver is responsible for these. Now I don't know the inner workings of TC, but isn't the driver's job simply to mount the virtual disk/loopmounted device and leave the actual FS operations to be performed by the OS as usual? Or are you saying that (on Windows) the TC driver takes over responsibility for maintaining the FAT/NTFS data structures/metadata/change journal and so on for all container files/encrypted partitions? Somehow this theory sounds iffy to me. –  Karan May 2 '13 at 0:28
    
@Karan - I'm saying I don't know. The TC drivers need to inject themselves in the file I/O process somewhere, and it's perfectly plausible that this would result in some additional latency between the logical file I/O request and the transmission of the commands to the drive. Having things work right requires both that the TC folks do their job correctly and that the MS folks provide the necessary controls to permit the job to be done. Eg, the MS drivers should not shut down the port until the TC driver has given its OK. –  Daniel R Hicks May 2 '13 at 1:36
add comment

Yes it is, because when you hibernate your system your usb connectors have no electricity and a complete image of your memory is inside your HDD.

share|improve this answer
    
Not always true. My laptop has all 4 USB ports live even when powered off. –  Kruug May 1 '13 at 16:52
add comment

Here is one case (you can find many more) that didn't end well: http://www.computerhope.com/forum/index.php?topic=122400.0 (Not exactly the same case, but it illustrates the point).

While it sounds safe enough to do when the computer is hybernating, it puts a lot of faith that all the various software and drivers are 100% working together correctly.

It may have worked out OK for you or others to do this 1000's of times, but it only takes one time, at just the right (wrong) time, and your data is gone, or at least requires involved recovery processes.

share|improve this answer
1  
But I am talking about situation where the computer has completely hibernated (ergo is turned off), not during the hibernation process. –  Maurycy Zarzycki May 1 '13 at 16:40
add comment

I don't believe you should have any problems whatsoever disconnecting and reconnecting the drive while your PC's hibernated. Since the drive is encrypted using TrueCrypt, for further peace of mind you can ensure that under Settings / Preferences / Auto-Dismount you have the "Dismount all when" User logs off and especially Entering power saving mode options selected:

1

This will ensure that TrueCrypt automatically and safely dismounts your encrypted volume when you hibernate your system, which is good from a security perspective as well.

share|improve this answer
add comment

You can disconnect that drive without any problem. People will never use filesystems (or encrypted drives) if this may be dangerous in case of accidentally power loss or disconnect.

share|improve this answer
3  
removing a filesystem that is still in a mounted state is dangerous, regardless of whether the system is hibernated or not at the time. Disk write caching is a disk level phenomena, not a filesystem one, so all the same reasons that you should not just unplug your pc instead of shutting down gracefully apply. –  Frank Thomas May 1 '13 at 12:55
1  
Please, write how dangerous is removing filesystem before unmounting based on YOUR experience, because I'm talking about my and thousand other people experience with disconnecting drives without any problems. You just scare people about possible danger like many people do. Maurycy ask about disconnect hdd while computer is hibernated, so please tell me exactly what Maurycy can expect if he disconnect his hard drive? I say that is nothing to worry about, you start scarry guy with some myths. –  Franciszek Baranowski May 1 '13 at 13:10
3  
Actually I had a situation once where I've disconnected an external drive without dismounting it and the computer was still on - probably it happened during writing, the end result was that the partition "definitions" got lost and I had to use recovery software to get back all files. But the computer was still on, and hibernation is pretty much shutting down the computer and storing RAM dump on the HD. –  Maurycy Zarzycki May 1 '13 at 16:42
1  
As you see - completely different situation. Of course that everyone knows that unplug HDD during writing is not a good idea and sometimes may causes problems, BUT I really try to read carefully what people wrote and you wrote about hibernate state; sorry that some guys vote "-" for my answer just because is not like everyone think it should be, but there are facts - lot of people was some problems with hdd if they unplug them or if they have power loss during save, but it is not standard situation - it's accidental. If you know that nothing is saving - HDD unplug is safe. –  Franciszek Baranowski May 1 '13 at 22:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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