0

This happened to me twice so far. I have 2 Windows PCs with an external drive attached to one of them (Windows 11 Pro). It is a 3TB HDD that is about 25% full. Yesterday, I switched off the Windows 11 PC, attached the drive to the other PC (Windows 10 Pro), and started the latter.

Everything is normal so far. So, I proceeded to move my Steam library folder (about 240GB) to the drive. It took a while (copying from HDD to another) but it completed without anything obviously not right (I can see the files already moved to the HDD).

I switched off the Windows 10 PC, attached the drive to the Windows 11 PC, and started the latter. When I opened the HDD, I did not see the files that I just copied.

My questions are:

  • Why did this happen?
  • How to prevent something like this from happening in the future (this happened to me twice)?
  • How to restore the "lost files" (not huge importance, it is just Steam library)?

Additional context

I mentioned that this happened to me twice. The first time I actually lost some personal pictures. It happened something like this:

  • I had a 16GB thumb drive that was plugged to a PC that was asleep (not shutdown).
  • I unplugged the thumb drive and plugged it to my laptop.
  • I moved a folder or 2 which contain about 2GB of pictures (between RAW and JPEG) to the thumb drive.
  • I either safely remove the drive or shutdown the laptop (I do not remember; that was more than a year ago).
  • I plugged the thumb drive to the PC and woke it up.
  • The folders are not there.
TheBlueSky
  • 259
  • 1
  • 7
  • 20
  • Why would you back up (or restore) your Steam library folder? You can just download em again. – Gantendo Dec 03 '23 at 08:19
  • 2
    Do you have Fast Startup enabled on either of these PCs? // Also, changing hardware, especially involving filesystems, while a system is suspended or hibernating is a big no-no. – Daniel B Dec 03 '23 at 10:08
  • @Gantendo, thanks for the suggestion, but this beyond the point. My question is about losing data in the scenario I mentioned, not about backing up Steam library. I also lost pictures that I took in the past because of this. – TheBlueSky Dec 03 '23 at 11:01
  • @DanielB, Yes, I had Fast Startup on, but now I turned it off. – TheBlueSky Dec 03 '23 at 11:04
  • 2
    "Why did this happen?" - Begging for speculation and also comparing two seemingly cases that may be very unrelated. USB flash drives are notoriously unreliable for example. I am voting close. Needs focus and less inviting for speculation. – Joep van Steen Dec 03 '23 at 14:16
  • @JoepvanSteen, have you had the chance to read my answer? This is not as speculative as you may think and the 2 cases turned out to be related to the same issue. You have the right to choose to vote for closing this, but your reasoning is a bit weird. Beside, investigating this case help me to understand the issue, recover the data, and be aware not to "fall into this trap in the future". I am sure it can, and most likely will, help other people too. – TheBlueSky Dec 03 '23 at 21:23
  • 2
  • That still doesn't solve the 'focus' issue, plus one could argue since you found the answer elsewhere that this is a duplicate. As it is, it is a bad question. – Joep van Steen Dec 04 '23 at 00:46
  • @music2myear, no it does not. But thanks for the comment. I already answered this question with the solution that worked with me for this specific situation. – TheBlueSky Dec 07 '23 at 18:39

2 Answers2

2

Best guess is the drive was not correctly unmounted, the writes had not been correctly flushed through.
A sleeping machine still has the drives mounted. One shut down should have correctly dismounted them first. Disconnecting whilst still mounted allows for the possibility of this write error. This is also more likely if you used cut & paste, rather than copy/paste/manual delete. It's always safer to test you have two copies, than hope you have one.

Do you use ExFAT for these drives? [That's the format most drives arrive as, when new.] If so, it would be far better to use NTFS, or any properly journaled file system your machine can read & write, as these are designed to try to eliminate this failure on accidental disconnect.

ExFAT may be a portable disk format, but it's a poor one.

Tetsujin
  • 49,589
  • 1
    Thank you for your answer, Tetsujin. My 3TB HDD is NTFS. I also found the problem and the solution. Please, check my answer. – TheBlueSky Dec 03 '23 at 11:33
1

Apparently the issue is with default shutdown behaviour since Window 8 or 8.1. Thanks to user1574981 for their answer here.

Also, thanks to Daniel B for this comment.

More details

Starting with Windows 8, the default behaviour of the shutdown option changed to a hybrid shutdown, which is sometimes referred to as "fast start-up". This feature combines aspects of traditional shutdown and hibernation.

When you select "Shutdown" in Windows 8.1 or newer, the operating system saves the current state of the system into a hibernation file (hiberfil.sys). This allows the system to start up more quickly the next time you power it on. The hybrid shutdown is designed to improve the start-up time by partially hibernating the system instead of performing a complete shutdown and subsequent full boot.

Because of this, the HDD was not unmounted and caused the behaviour I saw. More details on why is that in user1574981's answer that I referred to earlier.

What about the data?

The data was not visible even when connecting the HDD back to the Windows 10 PC. So, I performed disk checking and repairing on the Windows 10 PC and I was able to get the data back.

I then did "safe removal" for the HDD and connected it to the Windows 11 PC. Now I can see the data there as well.

One more thing

I also disabled "fast start-up" (Control Panel\Hardware and Sound\Power Options\System Settings).

TheBlueSky
  • 259
  • 1
  • 7
  • 20