1

I'm currently digitizing my DVD collection, converting files on my main PC, and moving them to an external hard drive that is then connected to my movie PC (Intel Compute Stick).

I have lost a lot of work and files twice now, because I think Windows saves a snapshot of the drive and reverts to it, without checking for changed files/folders.

I think it can be reproduced this way:

  1. Shut down computer 1 (C1) with the external drive connected
  2. Move it to computer 2 (C2) and copy files to it
  3. Reconnect it to C1 and start the computer up

The files copied from C2 are now missing.

Is this some kind of Windows error, or is there a setting I can check to avoid it happening again? I just lost a lot of work from the last three days, without any means to restore it, aside from a file restore program (which up until now, has only found files I lost the last time this happened).

3
  • Please test some more, with files that don't matter, and confirm the behavior. Why is shutting down / starting part of the process? Commented Apr 24, 2017 at 15:25
  • Info to edit into question: details about external drive, including filesystem & connecting interface; any relevant events from Windows Event Log when drive is connected. Commented Apr 24, 2017 at 17:05
  • I'm currently restoring deleted files, but will test, when everything is back in order.
    – LongInt
    Commented Apr 24, 2017 at 17:22

1 Answer 1

3

Quick answer: To fix your problem, don't plug the external HDD back into C1 until the PC has been fully rebooted.

Long answer: Since Windows 8.1, by default, most shutdowns are actually hibernates. This means that components such as the filesystem are still loaded into memory in the same state that they were in when you shut down your PC. However while C1 was turned off, you changed the state of the external HDD when you copied files to it from C2. When you restart C1, Windows checks if the HDD is present, finds it (since you plugged it back into C1 before turning on your system), and then Windows assumes that nothing has changed and re-uses the same memory it had saved during the hibernate to "restore" the state of the HDD. As soon as you try to write a file to the HDD on C1, you'll corrupt the data saved to the HDD.

The way to avoid this scenario is to remount the HDD before trying to write to it. Windows could automatically do this while rebooting, but remounting the HDD would be a fairly expensive operation. Since you do want to trigger a re-mount, you can do any of the following:

  • plug the HDD in after C1 has fully booted
  • have Windows "safely remove hardware" before turning off C1
  • plug the HDD into a different USB port than when you powered-off C1
1
  • That makes perfect sense! Thank you. Last time it happened, I unplugged the hard drive while C1 was sleeping, so I knew it was my own fault there. But this time I actively shut down the computer to avoid doing the same thing, so I was quite surprised when it happened again. This answer explains why - I need to be very careful moving harddisks between windows installations then.
    – LongInt
    Commented Apr 25, 2017 at 6:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .