NTFS read & write

gfngfn256

Renowned Member
Mar 29, 2023
1,553
423
88
I am trying to write to an external USB hdd that contains an old Windows drive (Boot & Data Drive "c:"), and even after mounting it correctly within Proxmox it only loads as read-only. I tried with another (non-boot) NTFS disk, and still I got read-only.

Does PVE support either ntfs-3g or ntfs3 ?

Many other Linux OS's already support read & write NTFS support, out of the box.

I would rather not want to do an unnecessary install on my PVE host.
 
Seems to work fine for me, have you checked the log to see if your disk is "dirty" and r/o mount is forced?

Code:
root@pve7demo1:~# fdisk /dev/sdc

Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-1953124, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-1953124, default 1953124):

Created a new partition 1 of type 'Linux' and of size 952.7 MiB.

Command (m for help): t
Selected partition 1
Hex code or alias (type L to list all): 7
Changed type of partition 'Linux' to 'HPFS/NTFS/exFAT'.

Command (m for help): p
Disk /dev/sdc: 953.67 MiB, 1000000000 bytes, 1953125 sectors
Disk model: SECURE DRIVE   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 131072 bytes
Disklabel type: dos
Disk identifier: 0x9c3deb28

Device     Boot Start     End Sectors   Size Id Type
/dev/sdc1        2048 1953124 1951077 952.7M  7 HPFS/NTFS/exFAT

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

root@pve7demo1:~# mkfs -t ntfs /dev/sdc1
Cluster size has been automatically set to 4096 bytes.
Initializing device with zeroes: 100% - Done.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.

root@pve7demo1:~# mkdir /tmp/ntfs

root@pve7demo1:~# mount /dev/sdc1 /tmp/ntfs

root@pve7demo1:~# touch /tmp/ntfs/myfile

root@pve7demo1:~# ls -al /tmp/ntfs/myfile
-rwxrwxrwx 1 root root 0 Feb 21 10:32 /tmp/ntfs/myfile
root@pve7demo1:~#



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
have you checked the log to see if your disk is "dirty" and r/o mount is forced?
Mounted disk on another computer using Gparted OS - worked perfectly
Checked in a windows 11 machine with chkdsk etc. - no errors.
Not sure where/what to look for in logs concerning dirty or r/o mount is forced.
 
Not sure where/what to look for in logs concerning dirty or r/o mount is forced.
I'd imagine there would be very clear "can't mount sdX partition is corrupted" or similar if in the second terminal you execute "journalctl -f" and then run mount in the first.

But since you did not present any command outputs, logs or other information except the end result observation, anything anyone comments on here is a speculation.

You can check if ntfs-3g is installed on your system "dpkg -s ntfs-3g" and if its not, install it "apt install ntfs-3g". Its not on my PVE8 system, but was on PVE7. I cant think of a reason the Hypervisor would need ntfs-3g by default, so perhaps it was pulled in for something in the past.



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Its not on my PVE8 system, but was on PVE7
On which system did you conduct the above test?

Edit: Now looking at your output "root@pve7demo1" I guess I now know!
Therefore, I think I can conclude that its hardly surprising it worked for you.
Maybe you try it on your PVE8 (like mine) and see if it works.
As I stated I'd rather not install additional software - as much as possible - on my host.

Code:
root@MINS-PRXMX:~# dpkg -s ntfs-3g
dpkg-query: package 'ntfs-3g' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
root@MINS-PRXMX:~# dpkg -s ntfs3
dpkg-query: package 'ntfs3' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
 
Last edited:
On which system did you conduct the above test?

If the package was installed in the past inadvertently or on purpose, its there. Original test was run here:
root@pve7demo1:~# pveversion
pve-manager/8.1.3/b46aac3b42da5d15 (running kernel: 6.5.11-7-pve)
root@pve7demo1:~# dpkg -s ntfs-3g
Package: ntfs-3g
Status: install ok installed
Priority: optional
Section: otherosfs
Installed-Size: 1470
Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Architecture: amd64
Source: ntfs-3g (1:2022.10.3-1)
Version: 1:2022.10.3-1+b1
Depends: libc6 (>= 2.34), libgcrypt20 (>= 1.10.0), libgnutls30 (>= 3.7.2), libntfs-3g89 (= 1:2022.10.3-1+b1)
Pre-Depends: fuse3
Description: read/write NTFS driver for FUSE
NTFS-3G uses FUSE (Filesystem in Userspace) to provide support for the NTFS
filesystem used by Microsoft Windows.
Homepage: https://github.com/tuxera/ntfs-3g/wiki

It has been upgraded from 7 to 8. An existing 7 has the package, a brand new 8 doesnt. Just check if you have the proper package on the system and if you dont - install it. Accessing NTFS disk on hypervisor is not a daily task that most people do.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Thanks for your help.
While I agree with your - "Accessing NTFS disk on hypervisor is not a daily task that most people do" - I still think it should be there.
From what I gathered while googling: ntfs3 is preferable to ntfs-3g.
Anyway, as I said, I'd rather not install additional software on PVE host, so I'll probably reboot into gparted and take it from there.

Some food for thought, concerning Proxmox decision (maybe Debian's) to stop inclusion of full (out of the box) ntfs support:
https://www.system-rescue.org/manual/Mounting_ntfs_filesystems/
 
As I stated I'd rather not install additional software - as much as possible - on my host.
I am not sure I see a difference between a package being preinstalled with distribution or added manually. Especially if the package dependencies are not sprawling around, ie X system. Especially in a home-lab.

If you dont want to install anything - try to pass-through the usb to a VM and read it there.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Some food for thought, concerning Proxmox decision (maybe Debian's) to stop inclusion of full (out of the box) ntfs support:
https://www.system-rescue.org/manual/Mounting_ntfs_filesystems/
Proxmox comes with a carefully curated Debian Kernel. It does seem prudent to me not to include unnecessary Kernel modules that would affect everyone and rather encourage users to install packages that only they would need.

PS if you prefer this functionality as Kernel module - you can always compile your own.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
  • Like
Reactions: gfngfn256
But obviously some decision change has happened, as on PVE 7.* this was the case. I believe I also did it in an old PVE of mine - without installing any additional software.
Anyway thanks again for your time & attention.

Edit: Found this for anyone following:
https://wiki.debian.org/NTFS
 
Last edited:
  • Like
Reactions: bbgeek17
Ok so now things are looking more interesting.
Checked and both Ubuntu 18.04 & 23.10 have NTFS read & write capability "out of the box" (kernel). I haven't checked the above kernel mentioned.
Is this a Proxmox decision to remove in-house NTFS write access? Maybe I am barking up the wrong tree.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!