0

I'm having a small problem and I want to avoid an embarrassing situation if I screw up solving it.

My employer provides a customized ownCloud for shared storage. In my team, I am responsible for the administration of our portion of this shared drive. I set the local storage in my Linux system into a separate partition, and for a stupid reason, I formatted this as exFAT. Basically, for dual boot with Windows, I wanted to avoid Windows to block my shared partition, and exFAT was the recommended solution. This is no longer relevant, as I rarely boot into Windows and I know how to shut it down without locking any partition.

Fast-forward several months of usage and about 40GB of data is stored there. Now, my usage needs have changed, and I need to create a python virtual environment, so we can all share the same versions of python packages, and with the python to be deployed into VMs (not yet implemented). The issue is that exFAT does not support symbolic links. I know I can use --always-copy in the creation of the venv, but I kinda need symbolic links (Actually, I think I should use --always-copy to make the venv totally portable, but that's another story). I have some Python code that's also on that partition, and I use a symlink to the local package directory of Python (~/.local/lib/python3.x/site-package), so I can import them easily, and use autoreload in iPython. The exFAT put a constraint into this last functionality, which has become basic for me.

So, I decided to use NTFS instead of exFAT (I still need access to these partition during the infrequent Windows boots). Thus, for reformatting my shared partition, I wanted to copy the files to another location, reformat the exFAT into NTFS, and copy the files back. But that will change some fingerprint of the files, and might force updates into ALL the other users of the shared drive, including my manager/boss.

What's the best course of action? Of course, I don't want to lose any files, and I would like to reduce unnecessary traffic to the server and to the other users.

Any magic cp, mv, rsync, ... magic that might do the trick?

All advice are welcomed

EDIT: I reread my post and the best option is to delete to change the partition, and download the files from the server on my partition. That way, the files permissions are preserved, and I don't need to push any updates.

EDIT #2: What are the best option to mount a NTFS partition on /etc/fstab? I tried to set it with ntfs-3g but I get an error NTFS signature is missing.
Failed to mount '/dev/nvme0n1p6': Invalid argument
The device '/dev/nvme0n1p6' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

If I set the auto option, it uses FUSE and everything is owned by root and the permissions are 777

2
  • 1
    True conversion of exFAT to NTFS is impossible, so formatting is required with total data-loss. But it seems that you have found a good solution, so you don't need an answer from us.
    – harrymc
    Nov 19 '21 at 10:34
  • Actually, I do. What are the best options to mount using ntfs-3g? I manage to mount using the auto option on fstab, which apparently defaults to FUSE, but I get all files owned by root and file permissions are 777
    – phollox
    Nov 19 '21 at 11:07
0

exFAT does not support user permissions, so the uid and gid are whatever you specify in the mount command. When mounted from fstab with the auto option, the device gets automatically mounted with root-permissions.

The Proper options for exfat are described in the mount.exfat manpage. An /etc/fstab entry could be similar to:

/dev/sdb1 /media/maria/Lexfat exfat defaults,uid=1000,gid=1000 0 0

The defaults options (rw, suid, dev, exec, auto, nouser, and async) are good enough. Your uid and gid can be obtained by the command id yourusername.

2
  • Thanks, but I want to get rid of exFAT and use either NTFS-3G or the internal kernel support
    – phollox
    Nov 19 '21 at 11:27
  • 1
    I think your question could be simplified. As it's written, it's somewhat misleading.
    – harrymc
    Nov 19 '21 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.