this post was submitted on 05 Aug 2024
38 points (97.5% liked)

Linux

48182 readers
1268 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by AlpΓ‘r-Etele MΓ©der, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I know, I know. I really shouldn't use NTFS with Linux if I plan to write to it, especially not my only backup drive, which is my external media drive for libreELEC as well.

So I was moving/copying/renaming stuff through SMB on my libreELEC machine. And then suddenly I noticed 50 episodes of old-school Sonic animated series just... disappeared. Strange, but I continued renaming files, and those too poof nonexistent anymore.

Okay, maybe a Dolphin bug - I thought, since I was using Dolphin for SMB. But same from Android (I'm using Solid Explorer)

Then, Ghost In The Shell Stand Alone Complex too disappeared. Then some episode of Serial Experiments Lain.

Star Trek Discovery? Fucking gone, tho I didn't mind that one. All of the files are 0B. Then Regular Show.

Now, this was the point where I needed to step in. Linux just didn't see the files.

Oh well, I have a Windows 10 PC I use for work so it was a time for bringing the drive "home" and give it some chkdsk, in the meantime I was really hoping it wouldn't just destroy my 4TB backup drive. Wasn't sure it would work, but that was pretty much my only hope and idea. Trying to access those folders and files from Windows gave me error messages before the check.

The check and fix dialog of chkdsk was also kinda fucked, the progressbar jumped around, didn't make any sense BUT it restored my files. Hooray!

Except SAC, it was still unreadable from Windows, but! Linux does see all the episodes so I guess it's a win... of some sort. It sill bothers me there is some - from Windows's point of view - invalid files and folders on my BACKUP disk, but this will be another story.

It turned out, libreELEC is using ntfs-3 (and not 3g), which is famous for this kind of errors - files disappearing and the filesystem becoming funky.

So, I ordered a drive just for my media and media PC, tho no idea how to format it (to be readable from anywhere else - maybe exFAT?)

But this scared me like hell πŸ˜…

Just wanted to share this with you guys, there's no moral of the story, except do not use ntfs heavily under Linux, or at least do not write it a lot, which is a known thing since forever, I was just a lazy ass, don't be like me, please, unless you have a Windows machine around and some luck. But relying on these two, well...

Cheers!

Update: I formatted my new media drive to ext4. In the end, it'll be a fixed disk under my TV in a linux box, this seemed to be the best choice. I don't think I'll pick it out and use it elsewhere that much or at all.

top 25 comments
sorted by: hot top controversial new old
[–] some_guy@lemmy.sdf.org 10 points 3 months ago (1 children)

Everyone needs at least two backups: one local and one remote in case of natural catastrophe. Glad you came out ok.

[–] kuneho@lemmy.world 3 points 3 months ago* (last edited 3 months ago) (1 children)

yeah, well, I really need a better backup system, I almost lost my stuff countless times now. TestDisk saved my ass everytime on more major fuckups, but sooner or later I'll burn myself...

[–] some_guy@lemmy.sdf.org 3 points 3 months ago (1 children)
[–] Zanathos@lemmy.world 1 points 3 months ago* (last edited 3 months ago) (1 children)

I'll raise you one and attach a mount point over iscsi!

[–] some_guy@lemmy.sdf.org 2 points 3 months ago

Don't you threaten me! πŸ˜†

[–] lupec@lemm.ee 6 points 3 months ago (4 children)

Ah, now that's a scare! Glad you mostly managed to recover at any rate.

As for the fs to use, exfat is probably a safer bet but btrfs is also an option. I've used winbtrfs in the past and it works surprisingly well.

[–] ProgrammingSocks@pawb.social 6 points 3 months ago (2 children)

DO NOT USE WIN BTRFS. Recently I used a current version and it fucked up my btrfs filesystem in a way that was almost impossible to diagnose and fix.

[–] lupec@lemm.ee 2 points 3 months ago

Right, thanks for the input. I used to use it for unimportant stuff like game storage so it's entirely possible errors just went unnoticed πŸ˜…

[–] possiblylinux127@lemmy.zip 1 points 3 months ago

It is in Alpha

[–] GolfNovemberUniform@lemmy.ml 1 points 3 months ago (1 children)

But I don't think BTRFS can be used on a backup drive because it often needs backups lol

[–] lupec@lemm.ee 2 points 3 months ago

Said drive is a new one for media and regular everyday usage, not the existing backup drive according to the OP. Btrfs is more than stable enough barring specific RAID configurations, at any rate.

[–] kuneho@lemmy.world 1 points 3 months ago (1 children)

Thanks for the tip. Though I wouldn't mind if it would work on almost anything - even like Android or some older systems. Not a real need, just would be nice if I could plug mymedia drive into anything and watxh stuff from it (maybe even from older, not smart TVs if it's possible)

[–] lupec@lemm.ee 3 points 3 months ago* (last edited 3 months ago)

Yeah I guess exfat is the way to go then, it's how I handle my external SSD rn as well

Edit: Also, I'm not sure how well btrfs handles external drives. Didn't realize that when I suggested it.

[–] GolfNovemberUniform@lemmy.ml 1 points 3 months ago

But I don't think BTRFS can be used on a backup drive because it often needs backups lol

[–] possiblylinux127@lemmy.zip 4 points 3 months ago (1 children)

Don't use ext4 for that data. Use btrfs

Also one copy of the data is zero copies and 2 copies is one copy.

[–] kuneho@lemmy.world 6 points 3 months ago

Also one copy of the data is zero copies and 2 copies is one copy.

ah, just like with beer

[–] yeeliberto@lemmy.ml 2 points 3 months ago (1 children)

Something happened to me like that but I was not able to recover the data. I will thy to do as you did.

[–] kuneho@lemmy.world 1 points 3 months ago
[–] rem26_art@fedia.io 2 points 3 months ago

Just another thing to consider with exFAT is that it doesn't support having symlinks written on it. (for example, if your exFAT drive is located at /mnt/exfat, doing ln -s ~/Documents/cool-document.txt /mnt/exfat/ will fail) Idk if that's a problem for your use case, but just so you're aware.

I do have a drive that is formatted with exFAT that I made with the intention of having it be readable by both Linux and Windows, but I ended up not really using windows ever lmao. It should be fine if you're just using it to store media

[–] schizo@forum.uncomfortable.business 0 points 3 months ago (2 children)

IIRC, exFAT is still a fuse module, but FAT32 is kernel native, if that's a thing that matters (in case you're ever on a Linux where you can't install fuse+exFAT).

[–] chameleon@fedia.io 4 points 3 months ago (1 children)

There's been an exFAT driver in the kernel for a couple of years now (merged after Microsoft's patent pact added ExFAT), it works fine. Same driver gets used on Android for SD card support.

Ah cool, I knew there was patent problems keeping it out, but I also haven't used a USB drive of any meaningful size in a while (I went NAS over removable storage) but that's nice that there's a "universal" file system.

[–] kuneho@lemmy.world 2 points 3 months ago (1 children)

will FAT32 work on 2TB volume?

[–] mr_right@lemmy.dbzer0.com 4 points 3 months ago (1 children)

Yes it will but it wont be able to handle +4 GB files

[–] kuneho@lemmy.world 2 points 3 months ago* (last edited 3 months ago)

noice!

edit: oh, it WON'T work >4GB, misread that at first. Then not really noice in the end :/ Movies could be larger than 4GB (tho kinda rarely, I never go above full hd)