this post was submitted on 23 Nov 2023
1 points (100.0% liked)

Homelab

371 readers
9 users here now

Rules

founded 1 year ago
MODERATORS
 

Hi, I've been running a Ubuntu on Mac Mini homelab for past couple of weeks (Jellyfin, Transmission, SMB), and I keep hitting NTFS issues - some of which were my own fault, but I'm now seeking advice for the future.

  1. I wanted to unmount the drive. Drive was busy (seems it is as long as smbd is running). So I do umount -f, expecting it will kill the process and unmount similar to Unlocker app - it corrupted the entire drive. Didn't work on Windows or Linux, vcn error... After a few days of painful recovery, I set it all back up...

  2. Went to mv a file to a subfolder, got impatient, cancelled it. Tried to remove the partial file - IO error! Couldn't remove it, not after reboot, not as root, no way. And I couldn't access the entire folder because of that one file.

To fix, I had to plug in the drive to the Windows machine, saw the file for a sec, then file disappeared itself (some self-repair system?)

  1. sometimes the drive doesn't appear at all, takes a few repluggings to get it working? On Windows machine it works okay.

Is there any other FS you could recommend? (needs to be Windows compatible as well)

Thank you.

top 15 comments
sorted by: hot top controversial new old
[–] vasveritas@alien.top 1 points 1 year ago

I would not use NTFS.

Do the reverse. Use ZFS, Ext4, or Btrfs. Those are native Linux file systems.

Then you share the Linux folder with Windows over SMB, which is a Windows file sharing protocol that both Linux and Windows understand well. Voila, copy and paste between both machines without worrying about corruption.

[–] bufandatl@alien.top 1 points 1 year ago

Don’t use NTFS either Linux as 24/7 file system. Use Linux natives like ext4, xfs or zfs. And share the drive via samba. If it’s a drive that needs to travel between systems use EXFat.

[–] DecideUK@alien.top 1 points 1 year ago

Is this some dodgy USB dock problem rather than an NTFS problem?

[–] EtherMan@alien.top 1 points 1 year ago

You're using experimental drivers and force unmounting... And you actually have the gall to then try to pin the blame for errors from that on ntfs? Just no.

ntfs does have many issues which is why ms is developing refs to replace it. But stability or corruption isn't one of those issues. Ntfs is extremely solid in that regard due to the journaling.

Ntfs drivers in linux are however very buggy and generally considered experimental and that you should not write to ntfs drives if there's any data you care about as it could easily destroy all data there.

If you need a common writable data area then use exfat, not ntfs.

[–] ajnozari@alien.top 1 points 1 year ago

EXFat if you need cross compatibility, or just make an NFS/SMB server and have fun with the nightmare that is “why can’t I connect”

[–] ADB-UK@alien.top 1 points 1 year ago (1 children)

Which ntfs software are you using?

IIRC there are three options now (inc one in the kernel that's supposed to be a bit rough still) but the most stable seems to be the older fuse option of ntfs-3g.

I moved to getting none Linux boxes reading Ext4 drives using https://www.paragon-software.com/ drivers.

Have you tried using wsl mount on Windows to access Ext drives (may depend on your Windows version)...

Bit baffled by u/ajnozari comment on share security issues - SMB via SAMBA is well documented as to how to set things up...

[–] marc45ca@alien.top 1 points 1 year ago

Bit baffled by u/ajnozari comment on share security issues - SMB via SAMBA is well documented as to how to set things up...

Not sure they're referring to a security issue as much as sometimes SAMBA can be a bit cantankerous with with permissions and security in order to access ahare or that some users have problems with configuring it.

[–] abotelho-cbn@alien.top 1 points 1 year ago (3 children)
  1. you are literally force stopping writes to the disk...
[–] gihutgishuiruv@alien.top 1 points 1 year ago

“This tree seems really sensitive, I ran a chainsaw through it and it just fell over???”

[–] throwaway_t56@alien.top 1 points 1 year ago (1 children)

I know, it's my own fault, but still, Windows seems to withstand it better?

[–] abotelho-cbn@alien.top 1 points 1 year ago

NTFS is Windows' native filesystem. It writes to the USB much faster.

[–] johnklos@alien.top 1 points 1 year ago

That's not exactly true. You may be stopping file transactions, but the filesystem handler code should still run until it has flushed its state, and if it doesn't, then that's a huge bug and isn't normal.

[–] kY2iB3yH0mN8wI2h@alien.top 1 points 1 year ago

NTFS seems really sensitive?

no its not, NTFS ir rock solid, you are just using it incorrectly, use it with Windows as you are supposed to do..

I have had hundreds if not thousands of NTFS crashes and never lost a single file, but have lost quite a lot with other filesystems.

[–] DimestoreProstitute@alien.top 1 points 1 year ago

Not so much that NTFS is sensitive, rather it isn't prepared for a lot of corner cases it wasn't designed for. I'm curious of the need to share an NTFS volume via Samba that's also used with Windows... permissions alone could go to hell without careful thought about ACLs. If you really need to share a volume that's intended to be mounted in both Windows and Linux via Samba I'd go EXFAT if I didn't have an alternative to the whole situation.

[–] IlTossico@alien.top 1 points 1 year ago

That's a good way to kill a disk. Don't use NTFS and you are fine. Go for Btrfs and similar.