Folders randomly disappearing?

Hi,

I'm encountering a very strange issue that I've never seen before on Ubuntu-based distros.

I want to access a folder that is stored on the Windows partition of my SSD, that is being mounted as an external drive. However, that folder has completely disappeared from where it was before.

After looking for it everywhere, I assumed I probably deleted it accidentally and re-created it with the exact same name.

Except this time, the folder was automatically renamed "folder_name 2". And once I backed out of the parent folder and reopened it, the newly created folder was gone.

I tried again and again, creating a new folder with Ctrl + Shift + N in Nautilus, and everytime a new folder would be created with an incremental number added to its name, and then disappear.

I initially thought this could be a Nautilus issue, so I opened a terminal, navigated to the parent folder but the new folders didn't show up with ls either.

Even if I create a new folder with mkdir, it disappears as soon as I cd out of it.

I can create a new folder, navigate into it, even create a file inside it and save it, but as soon as I leave everything is gone.

I checked hidden folders, I checked using disk usage, I tried unmounting and remounting the partition, restarting the computer, nothing changes.

I also have no idea is this is the only folder that disappeared or if there are others, but since everytime I create a new one the number automatically goes up, I assume there's some trace of it somewhere ? Any ideas ?

When it is on Windows, I would suggest to start in Windows and take there directly a Look at this.

From Linux maybe it could be a Permission Thing. I could depend where these Folders are - I mean the Path.

To be honest I have not started this machine on Windows for at least a year, I'm afraid that some Windows update will ruin the boot partition.

I cd'd into the folder as root and still couldn't see anything, so I don't know if permissions are involved.

If you are worried about booting windows, you might try (replace sdX with the actual device I.D. e.g. sda or nvmeo1p1...)

sudo apt install --reinstall ntfs-3g

sudo ntfsfix /dev/sdX

1 Like

I've had bad sector issues on this partition before, I booted the laptop on a Windows recovery key and ran a chkdsk from it, and then it worked well.

I just ran this, now the entire parent folder is empty. Thankfully I just did a backup of the whole partition.

Now when I try to create a folder again I get a "I/O error" message.

Definitely sounds like a hard drive issue, I am sad to say.
ntfsfix should fix basic journaling issues. It is not as comprehensive as chkdsk and is a quick fix that is included in the ntfs-3g package.
It is unlikely to cause data loss unless the drive itself is damaged or corrupted pretty badly.

To me... This is actually the first time I ever heard or saw a report like you just gave of the drive going empty after running it...
:flushed:

Everything else in that partition works just fine, that's the weird part.
I'll try another chkdsk tonight to see if it helps.

1 Like

Have you run a S.M.A.R.T. test?

I'm not familiar with this tool, does it ship with Zorin ?

I do not actually remember... it can be installed:

sudo apt update && sudo apt install smartmontools

Manpages show you can verify the disk is supported 9replace sdX with actual drive I.D.):
sudo smartctl -i /dev/sdX
Short test ore long test:
sudo smartctl -t short /dev/sdX
sudo smartctl -t long /dev/sdX

1 Like

Looks pretty clean to me :

Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Temperature Sensor 1: 30 Celsius
Temperature Sensor 2: 31 Celsius
Error Information (NVMe Log 0x01, 16 of 256 entries)
No Errors Logged

Since you already made a backup on the partition, you might consider re-format it (using NTFS to retain compatibility with Windows). Check if this makes a difference.

And do you recall having used /etc/fstab to setup the automatic mount of this partition? You may have used Disks (preinstalled in Zorin OS) which is the graphical equivalent.

1 Like

you might consider re-format it

Good point, I'll see if chkdsk helps first but otherwise it's probably safer.

And do you recall having used /etc/fstab to setup the automatic mount of this partition?

This setup is almost three years old so I don't remember exactly, but I'm pretty sure I went through the GUI.

In that case it would be a good idea to make a screenshot of Disks showing this partition before you format it, just to have a reference to how it looks like right now in case there's something funny (unlikely, if it has worked for so long, but might reveal a problem).

1 Like

Just ran chkdsk through a Windows recovery drive and booted on Zorin again.

Now, not only is the missing folder back, but every subsequent folder that I had created and then disappeared are also there !

Never thought bad sector issues could be this insidious, usually the whole partition straight up won't mount, this was definetly a lot more subtle.

Thanks everyone for the help !

1 Like