Ok i have a 5TB usb hard drive that is mostly used for weekly backups of my system. It is hooked to a raspberry pi and has an exfat file system and used as a samba share.

But i need to occasionally unplug it and connect it directly to some other machines for 2 reasons.

  1. For use with steam on linux (i store my games on it)

  2. For use with obs on windows (i do some screen recording and need to be able to save the output to the drive)

Here’s the dilemma. Games that require proton will not launch from an exfat drive (trust me i’ve tried all the “hacks” and cant make it happen). So i plan to reformat the drive as an ext4 file system.

However, windows does not support ext4 natively. I do have WSL and could probably mount it there but here are the issues.

Another user in my house will be primarily the one using obs and they are not technically inclined (or at least not linux inclined) i want them to be able to plug this device in and just press record and have it output to the drive, this was working fine with exfat but obviously once i reformat it could be an issue.

I have a few options and wanted to run it by here first before committing to the reformat.

Option 1) reformat drive to ext4. Keep it as a samba drive at all times, except when gaming, and have obs output the video to the drive over the network

-is obs capable of doing this reliably?

Option 2) reformat to ext4 and unplug drive when gaming or needing to use obs. Rig up a script to automount the drive with wsl when detected.

-will the mounted drive show up in the windows file explorer natively? Or could i at least pin its location to quick access?
-can i actually create some way for it to automount the drive with no user input required?
-ooh but the distro is on the drive to conserve the laptop's space, could present an issue

Option 3) reformat the drive as part ntfs part ext4 and then plug it in for gaming and obs?

-i believe in linux i could just add the part-uuid to fstab so it only mounts the ext4 portion or maybe i could mount both?
-would windows automatically just mount the ntfs portion?

Imo, option 1 is the best but i would like to have a fail safe in case i ever need to plug it directly to the windows machine. So realistically a hybrid of option 1 and 2 is best. Is there a better way to do this? Will any of these methods work?

  • @d3Xt3rM
    link
    565 months ago

    Just use NTFS for the whole drive. The new NTFS3 kernel driver in Linux has fairly decent performance (waay better than the old ntfs-3g driver), and has been pretty stable since kernel 6.2.

    The key thing you’d want to do though is to use the mount options nocase and windows_names in your fstab.

    • nocase enables case-insensitive file/folder support similar to the default behavior under Windows with NTFS volumes.

    • windows_names prevents the creation of files or directories with names not allowed under Windows. This checks for forbidden characters in the name like /, , :, *, ?, <, >, |, " or ending with a space or a period. There are also other checks for matching the behavior of Windows with this mount option for rejecting file/folder names that may be valid on Linux systems but not under Windows.

    These two mount options should solve most of the issues Linux NTFS users may face. Do note that to use the above mount options, you’ll need to be on at least kernel 6.2.

    • @[email protected]OP
      link
      fedilink
      75 months ago

      I got 2 questions. How do permissions work with ntfs on linux. I use rsync a lot to backup to the drive and i’ve read how exfat doesnt really save all the linux permissions. Likewise from my research in order to run a proton game on a ntfs drive would require symlinking rhe compat directory to my home folder. And i use the home folder for smaller games. I have heard that it may or may not work with ntfs

      • @d3Xt3rM
        link
        65 months ago

        The permissions should be mapped to your Linux user account (whilst maintaining any existing NTFS permissions). So by default the drive would be mounted with uid=1000, gid=1000 and umask=0022 - which should result in 0755 for directories and 0644 for files. In plain English, that means you shouldn’t have any permission issues.

        But yeah I believe the compatdata symlink is still required as wine/proton creates files with :, which won’t be allowed if you mount the drive with windows_names.

    • @[email protected]
      link
      fedilink
      55 months ago

      Yeah, I’d probably go with NTFS in OP’s situation, provided the steam games work with that setup. Back when I needed compatibility between windows and Linux I did it that way, but performance wasn’t really a consideration then.

    • 0xCAFe
      link
      fedilink
      English
      45 months ago

      I second the recommendation to use NTFS. I don’t have the same use cases as OP, but in my experience it works really well. Back in the days when I was using Windows, I had a system and a data partition (i.e. personal files, pictures, videos… you get it). When I switched to Linux, I kept my data partition and just mounted it on my Linux system. I started with dual boot and didn’t have any issues. No need to manually install a NTFS driver these days.

      That’s a couple of years ago and my secondary SSD’s still that same old NTFS partition. Thought about moving to a Linux native filesystem, since I don’t use Windows anymore, but never had an actual reason to do it.

      • yianiris
        link
        fedilink
        15 months ago

        I can not see what it is you are responding to, it is becoming common lately, but NTFS then and now is about 3 different filesystems with the same brand name. I don’t get how linux file security would work translated to ntfs peculiarities. Or maybe how windows uses file rights make it tough for linux to cope with.

        MS was one of the few that signed the UEFI agreement and accepted fat32 as a universal supported efi partition, then goes on and makes ntfs its own default.

        @0xCAFE @d3Xt3r