Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
2214
views
Linux can't read and write, but windows can
I have a hard drive with a lot of back up files, that were created by PhotoRec. When mounting it with a windows computer I can read all the files perfectly fine. Under linux I get an error when trying to look at the folder that contains all my backups. The rest of the hard drive is perfectly readabl...
I have a hard drive with a lot of back up files, that were created by PhotoRec. When mounting it with a windows computer I can read all the files perfectly fine. Under linux I get an error when trying to look at the folder that contains all my backups. The rest of the hard drive is perfectly readable but when I try to ls the backup folder I get
ls: reading directory .: Input/output error
In Dolphin I just see a blank directory. I have tried letting arch auto mount and I have tried manually mounting it with -t ntfs-3g
option (only flag used). A strange thing I notice is that if I manually mount it with the 3g option then all permissions are -rwxrwxrwx
but if I let it be automatically mounted I have permissions -rw------- 1 steven steven
(some have 2, but not many. The directories show d
as they should). These are the same for every file and directory on the system.
I don't understand why I can't see these files under Linux, but can under Windows. I even booted up SystemRescueCD again to see if it recognized it, but it couldn't even see the files (even though it was what had originally written the files in the first place). What is so weird to me is that I can read everything on the hard drive except that one folder. It has the exact same permissions as everything else in the hard drive.
Additional info:
This is a fresh install of Arch. As of today.
[steven@serenity ~]$ uname -a
Linux serenity 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64 GNU/Linux
(auto mounted)
[steven@serenity ~]$ sudo fdisk -l
Disk /dev/sdb: 596.2 GiB, 640135028736 bytes, 1250263728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1549f232
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 63 1250258159 1250258097 596.2G 7 HPFS/NTFS/exFAT
MaybeALlama
(533 rep)
Aug 31, 2014, 10:50 PM
• Last activity: Aug 1, 2025, 01:05 PM
0
votes
0
answers
28
views
With NTFS-3G & permission control, how to avoid "Deny" permission being added which overrides permission of file owner?
When a logical NTFS partition is mounted on Linux using NTFS-3g + "permission" mounting option + UserMapping, I often found that "execution" permission of the same file may be different on Windows or Linux. E.g. an binary executed by "Peng Cheng" on Linux will look like this on Windows: [
tribbloid
(63 rep)
Jul 9, 2025, 04:55 PM
• Last activity: Jul 12, 2025, 04:56 AM
0
votes
1
answers
58
views
Why do the sync mount option kill the performance of NTFS partitions?
I have noticed that when I mount my external HDD NTFS partition with the sync option, the write performance is terrible (1MB/s max). But when I use async the system finishes the operation very quickly (yes I know it is filled in the write cache), but according to htop I can see over 100MB/s writes t...
I have noticed that when I mount my external HDD NTFS partition with the sync option, the write performance is terrible (1MB/s max). But when I use async the system finishes the operation very quickly (yes I know it is filled in the write cache), but according to htop I can see over 100MB/s writes to the external HDD. Why is this happening? Isn't sync immediately applying writes instead of caching? Why would it perform so poorly (x100 less than the max speed of the drive)
I am Running Debian unstable (equivalent to 13 - trixie)
td211
(477 rep)
Jun 20, 2025, 04:21 AM
• Last activity: Jun 20, 2025, 04:52 AM
0
votes
2
answers
8498
views
Partition mounted but files not visible
I have following 3 main partitions in my laptop 1. Arch Linux (Release 2019.10.01) EXT4 2. Windows 10 NTFS 3. Common Drive NTFS I backed up my data in external hard disk > formatted > installed windows > installed Arch > transferred data from external hard disk to common ntfs drive when I am still b...
I have following 3 main partitions in my laptop
1. Arch Linux (Release 2019.10.01) EXT4
2. Windows 10 NTFS
3. Common Drive NTFS
I backed up my data in external hard disk > formatted > installed windows > installed Arch > transferred data from external hard disk to common ntfs drive when I am still booted in Arch.
Then I booted in Windows and now I can't see my data in common drive. However, my common drive capacity shows filled drive.
Next I went back in Arch to check what happened to my files and now I can't even see my files in Arch!!! Even though
df
command was showing me that my common drive is filled 91%. I tried to umount and mount again with ntfs-3g
but still I am unable to see my files.
I can see partition is filled in both Arch and Windows but I can't see my files (from both file manager and from terminal).
Following is my fstab file
# /dev/sda5
UUID=055429ea-d5e7 / ext4 rw,relatime 0 1
# /dev/sda2
UUID=9076 /efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda7
UUID=23190878-9e6a none swap defaults 0 0
# Windows OS
/dev/sda6 /mnt/os ntfs-3g defaults 0 0
# Windows OS
/dev/sda4 /mnt/windows ntfs-3g defaults 0 0
Following is result of sudo df -hT
Filesystem Type Size Used Avail Use% Mounted on
dev devtmpfs 5.8G 0 5.8G 0% /dev
run tmpfs 5.8G 1.6M 5.8G 1% /run
/dev/sda5 ext4 91G 11G 76G 13% /
tmpfs tmpfs 5.8G 225M 5.6G 4% /dev/shm
tmpfs tmpfs 5.8G 0 5.8G 0% /sys/fs/cgroup
tmpfs tmpfs 5.8G 60K 5.8G 1% /tmp
/dev/loop1 squashfs 422M 422M 0 100% /var/lib/snapd/snap/pycharm-professional/159
/dev/loop0 squashfs 90M 90M 0 100% /var/lib/snapd/snap/core/7917
/dev/sda2 vfat 95M 27M 69M 28% /efi
tmpfs tmpfs 1.2G 9.1M 1.2G 1% /run/user/1000
/dev/sda4 fuseblk 746G 672G 74G 91% /mnt/windows
/dev/sda6 fuseblk 88G 25G 63G 29% /mnt/os
Following is the result of sudo lsblk -no name,fstype
loop0 squashfs
loop1 squashfs
sda
├─sda1 ntfs
├─sda2 vfat
├─sda3
├─sda4 ntfs
├─sda5 ext4
├─sda6 ntfs
└─sda7 swap
Can anyone tell me what is going on and how can I get access to my files?
Dexter
(197 rep)
Oct 24, 2019, 09:29 AM
• Last activity: Jun 13, 2025, 05:05 AM
2
votes
1
answers
2855
views
ntfs issue with rsync: read errors mapping permission denied (13)
I have an issue when I want to rsync folders from my external backup hard disk to my NAS. I get this error : > read errors mapping permission denied (13) I have root rights; if I want to change the user's right via chmod, nothing changes. With Windows, the owner is changed but the copy doesn't work....
I have an issue when I want to rsync folders from my external backup hard disk to my NAS.
I get this error :
> read errors mapping permission denied (13)
I have root rights; if I want to change the user's right via chmod, nothing changes. With Windows, the owner is changed but the copy doesn't work.
S.M.A.R.T tests is OK.
The ntfsfix tests provide no error.
I tried to made an chdisk from windows with no results.
Do you have any idea for repair or a tricks to recover my files ?
user3588719
(21 rep)
Sep 8, 2015, 02:05 PM
• Last activity: May 6, 2025, 05:01 PM
9
votes
1
answers
59077
views
fstab mount options for umask, fmask, dmask for ntfs with noexec
I have a ntfs partition and when I mount it with default options in fstab I get for files and directories: rwxrwxrwx = 0777 Obviously ntfs does not support "noexec" option and I do not want 'x' flag to the files and directories. So I'd like to ask what values shall I set to fmask, dmask and umask? W...
I have a ntfs partition and when I mount it with default options in fstab I get for files and directories:
rwxrwxrwx = 0777
Obviously ntfs does not support "noexec" option and I do not want 'x' flag to the files and directories. So I'd like to ask what values shall I set to fmask, dmask and umask?
When I set umask=0666
/dev/sda3 /ntfsPartition ntfs-3g defaults,noatime,umask=0666,locale=en_US.utf8,errors=ro 0 0
I get d--x--x--x for the mount directory of the partition. I can go the directory:
cd /ntfsPartition
but I cannot read the content:
ls /ntfsPartition
ls: cannot open directory '.': Permission denied
Thanks in advance!
user252842
Oct 8, 2017, 09:22 PM
• Last activity: May 1, 2025, 06:54 AM
1
votes
2
answers
4095
views
How to mount an NTFS partition writable for a non-root user?
I am using Debian 8.8 and am using ntfs-3g to mount an NTFS partition in `/etc/fstab`. Here is my entry: /dev/sdc1 /mnt/data_backup ntfs-3g rw,uid=1000,gid=1000,dmask=0002,fmask=0003 0 0 It is fine for my account `userA` to read and write the partition. However, my workstation is open to another `us...
I am using Debian 8.8 and am using ntfs-3g to mount an NTFS partition in
/etc/fstab
. Here is my entry:
/dev/sdc1 /mnt/data_backup ntfs-3g rw,uid=1000,gid=1000,dmask=0002,fmask=0003 0 0
It is fine for my account userA
to read and write the partition. However, my workstation is open to another userB
which is not in the root
group. Is there any way to make the partition writable for the non-root userB
? And the best result will be that userB
can only append but cannot remove the files in the partition. An FTP solution is also acceptable. Thanks!
purplezzh
(33 rep)
Jul 10, 2017, 03:09 AM
• Last activity: Apr 14, 2025, 05:05 PM
0
votes
0
answers
126
views
How to mount NTFS3 drives/partitions which I have full access to?
I have two operating systems on my computer: one Arch Linux and one Windows. I use NTFS3 and Kernel 6.10. ``` Operating System: Arch Linux KDE Plasma Version: 6.1.4 KDE Frameworks Version: 6.5.0 Qt Version: 6.7.2 Kernel Version: 6.10.7-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 8 ×...
I have two operating systems on my computer: one Arch Linux and one Windows.
I use NTFS3 and Kernel 6.10.
Operating System: Arch Linux
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: LENOVO
Product Name: 20WKA000CD
System Version: ThinkPad X13 Gen 2i
I want to mount my Windows C: and D: partitions on my Linux OS, and I want them to be visible every time I start my computer.
I edited my fstab as follows:
/dev/nvme0n1p3 /home/firestar/C ntfs3 uid=1000,gid=1000,umask=0000 0 0
/dev/nvme0n1p5 /home/firestar/D ntfs3 uid=1000,gid=1000,umask=0000 0 0
but there are still some directories like C:/User/Firestar/xxxx
is still non-writable:
(base) [firestar@Archlinux Firestar]$ ls -l
total 12648
drwxr-xr-x 1 firestar firestar 0 May 1 03:53 AppData
lrwxrwxrwx 1 firestar firestar 33 May 1 03:53 'Application Data' -> ./../../Users/Firestar/AppData/Roaming
dr-xr-xr-x 1 firestar firestar 0 May 1 11:53 Contacts
lrwxrwxrwx 1 firestar firestar 61 May 1 03:53 Cookies -> ./../../Users/Firestar/AppData/Local/Microsoft/Windows/INetCookies
dr-xr-xr-x 1 firestar firestar 212992 Sep 2 22:21 Desktop
dr-xr-xr-x 1 firestar firestar 8192 Sep 2 22:05 Documents
dr-xr-xr-x 1 firestar firestar 20480 Sep 2 22:19 Downloads
dr-xr-xr-x 1 firestar firestar 0 May 1 11:53 Favorites
-rwxr-xr-x 1 firestar firestar 354240 Jul 6 16:33 hsi_spectrum_20141020_155000.fits
-rwxr-xr-x 1 firestar firestar 48960 Jul 6 16:33 hsi_srm_20141020_155000.fits
drwxr-xr-x 1 firestar firestar 0 Jul 5 22:47 IDLWorkspace
drwxr-xr-x 1 firestar firestar 4096 Sep 4 10:43 IntelGraphicsProfiles
drwxr-xr-x 1 firestar firestar 0 Jul 6 12:13 JHelioviewer-SWHV
dr-xr-xr-x 1 firestar firestar 0 May 1 11:53 Links
lrwxrwxrwx 1 firestar firestar 31 May 1 03:53 'Local Settings' -> ./../../Users/Firestar/AppData/Local
dr-xr-xr-x 1 firestar firestar 0 May 1 11:53 Music
lrwxrwxrwx 1 firestar firestar 27 May 1 03:53 'My Documents' -> ./../../Users/Firestar/Documents
lrwxrwxrwx 1 firestar firestar 69 May 1 03:53 NetHood -> './../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Network Shortcuts'
-rwxr-xr-x 1 firestar firestar 10223616 Sep 4 10:43 NTUSER.DAT
-rwxr-xr-x 1 firestar firestar 65536 May 1 14:36 NTUSER.DAT{a2332f18-cdbf-11ec-8680-002248483d79}.TM.blf
-rwxr-xr-x 1 firestar firestar 524288 May 1 03:53 NTUSER.DAT{a2332f18-cdbf-11ec-8680-002248483d79}.TMContainer00000000000000000001.regtrans-ms
-rwxr-xr-x 1 firestar firestar 524288 May 1 03:53 NTUSER.DAT{a2332f18-cdbf-11ec-8680-002248483d79}.TMContainer00000000000000000002.regtrans-ms
-rwxr-xr-x 1 firestar firestar 0 May 1 03:53 ntuser.dat.LOG1
-rwxr-xr-x 1 firestar firestar 950272 May 1 03:53 ntuser.dat.LOG2
-rwxr-xr-x 1 firestar firestar 20 May 1 03:53 ntuser.ini
dr-xr-xr-x 1 firestar firestar 4096 Sep 4 10:43 OneDrive
drwxr-xr-x 1 firestar firestar 0 Jul 5 22:47 Perforce
dr-xr-xr-x 1 firestar firestar 4096 Sep 2 22:21 Pictures
lrwxrwxrwx 1 firestar firestar 69 May 1 03:53 PrintHood -> './../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Printer Shortcuts'
lrwxrwxrwx 1 firestar firestar 58 May 1 03:53 Recent -> ./../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Recent
dr-xr-xr-x 1 firestar firestar 0 May 1 11:53 'Saved Games'
dr-xr-xr-x 1 firestar firestar 4096 May 1 12:09 Searches
lrwxrwxrwx 1 firestar firestar 58 May 1 03:53 SendTo -> ./../../Users/Firestar/AppData/Roaming/Microsoft/Windows/SendTo
lrwxrwxrwx 1 firestar firestar 61 May 1 03:53 Templates -> ./../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Templates
dr-xr-xr-x 1 firestar firestar 0 Jun 13 22:11 Videos
lrwxrwxrwx 1 firestar firestar 62 May 1 03:53 「开始」菜单 -> './../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Start Menu'
(base) [firestar@Archlinux Firestar]$
Also, I have a NTFS USB drive, and it is not in the fstab, it has also 2 directories which are non-writable and I don't know why:
drwxr-xr-x 1 firestar firestar 4096 May 1 11:55 '$RECYCLE.BIN'
drwxr-xr-x 1 firestar firestar 4096 Apr 21 23:57 Astronomy
drwxr-xr-x 1 firestar firestar 49152 Jun 23 14:48 Books
drwxr-xr-x 1 firestar firestar 4096 May 1 10:38 Documents
dr-xr-xr-x 1 firestar firestar 4096 Jul 12 2023 Games
drwxr-xr-x 1 firestar firestar 4096 Dec 8 2022 Hannah
drwxr-xr-x 1 firestar firestar 8192 Jan 19 2021 HF
drwxr-xr-x 1 firestar firestar 4096 Feb 3 2024 Installers
drwxr-xr-x 1 firestar firestar 8192 Aug 26 2023 PKU
drwxr-xr-x 1 firestar firestar 4096 Jan 31 2024 'PKU Courses'
drwxr-xr-x 1 firestar firestar 4096 Jun 18 2020 SS
drwxr-xr-x 1 firestar firestar 4096 Feb 20 2024 'System Volume Information'
drwxr-xr-x 1 firestar firestar 0 Jan 16 2022 Treasures
drwxr-xr-x 1 firestar firestar 4096 Jul 14 2022 Wallpapers
dr-xr-xr-x 1 firestar firestar 20480 Feb 3 2024 小提琴谱
drwxr-xr-x 1 firestar firestar 4096 May 1 00:54 照片
drwxr-xr-x 1 firestar firestar 16384 Dec 21 2023 电影和视频
drwxr-xr-x 1 firestar firestar 655360 Oct 22 2022 音乐
How to mount NTFS3 drives/partitions which I have full access to?
Like, how to write my fstab
or default mount options?
I have no fast-boot nor bitlocker.
Firestar-Reimu
(181 rep)
Sep 5, 2024, 02:31 PM
• Last activity: Mar 25, 2025, 04:15 PM
1
votes
3
answers
3302
views
Mount NTFS partition as /home with fstab
I am currently installing Arch Linux on a machine which has Windows 10 already installed on it, and I want to use a NTFS partition as /home (because that way, I can easily access my Linux-files from within Windows). I've tried to install it this way two times by now, but both times it failed (it wou...
I am currently installing Arch Linux on a machine which has Windows 10 already installed on it, and I want to use a NTFS partition as /home (because that way, I can easily access my Linux-files from within Windows).
I've tried to install it this way two times by now, but both times it failed (it would boot in recovery mode, with logs saying that the ntfs-drive couldn't be read).
My question is now, what is the correct way to put this drive in
/etc/fstab
? I created the current fstab with genfstab -U -p /mnt >> /mnt/etc/fstab
and now I have the following entry for the ntfs-drive:
# /dev/sda2 LABEL=LinuxData
UUID=... /home ntfs-3g rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
I want every user on the system to be able to read, write and execute to /home.
Rien
(121 rep)
Jun 27, 2015, 01:07 PM
• Last activity: Mar 6, 2025, 08:06 PM
2
votes
1
answers
5282
views
How to optimize NTFS performance on Linux?
I am running Ubuntu 22.04.2 on a laptop with the following specifications: **SSD:** HP S700 SSD **CPU:** Intel Core i7 7700HQ **RAM:** 16GB **Kernel:** 5.19.0-32-generic All system packages are updated to the latest versions as of 25/02/2023. Ubuntu is installed on an Ext4 partition, while my data i...
I am running Ubuntu 22.04.2 on a laptop with the following specifications:
**SSD:** HP S700 SSD
**CPU:** Intel Core i7 7700HQ
**RAM:** 16GB
**Kernel:** 5.19.0-32-generic
All system packages are updated to the latest versions as of 25/02/2023. Ubuntu is installed on an Ext4 partition, while my data is stored on an NTFS partition since it was created when using Windows 10. The SSD is recognized as
/dev/sdb
**Details of the SSD and partitions:**
Output of -I /dev/sdb
:
/dev/sdb:
ATA device, with non-removable media
Model Number: HP SSD S700 1TB
Serial Number: HASA42470101207
Firmware Revision: V0823A0
Media Serial Num:
Media Manufacturer:
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Used: unknown (minor revision code 0x011b)
Supported: 10 9 8 7 6 5
Likely used: 10
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 1953525168
Logical Sector size: 512 bytes
Physical Sector size: 512 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 953869 MBytes
device size with M = 1000*1000: 1000204 MBytes (1000 GB)
cache/buffer size = unknown
Form Factor: 2.5 inch
Nominal Media Rotation Rate: Solid State Device
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 1 Current = 1
Advanced power management level: 254
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
* Advanced Power Management feature set
* 48-bit Address feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* Native Command Queueing (NCQ)
* Phy event counters
* READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
* DMA Setup Auto-Activate optimization
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SANITIZE feature set
* BLOCK_ERASE_EXT command
* DOWNLOAD MICROCODE DMA command
* WRITE BUFFER DMA command
* READ BUFFER DMA command
* Data Set Management TRIM supported (limit 8 blocks)
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
supported: enhanced erase
6min for SECURITY ERASE UNIT. 6min for ENHANCED SECURITY ERASE UNIT.
Checksum: correct
Output of -aTh
:
Filesystem Type Size Used Avail Use% Mounted on
/dev/sdb2 ext4 162G 64G 90G 42% /
/dev/sdb1 fuseblk 760G 383G 378G 51% /mnt/DATA Laptop
Output of --fstab
:
TARGET SOURCE FSTYPE OPTIONS
/ UUID=79debb50-d530-d801-70da-b150d530d801 ext4 errors=remount-ro
/mnt/DATA Laptop UUID=01D94304BCDF47E0 ntfs uid=1000,gid=1000,rw,user,exec,umask=000,x-gvfs-show
**Performance difference between NTFS and Ext4 partitions:**
When I ran a benchmark using [KDiskMark](https://github.com/JonMagon/KDiskMark) on both partitions, I noticed a significant difference in performance between the NTFS and Ext4 partitions, especially for random read writes.
Output for /dev/sdb2
:
KDiskMark (3.1.2): https://github.com/JonMagon/KDiskMark
Flexible I/O Tester (fio-3.28): https://github.com/axboe/fio
--------------------------------------------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes
[Read]
Sequential 1 MiB (Q= 8, T= 1): 517.054 MB/s [ 504.9 IOPS]
Sequential 1 MiB (Q= 1, T= 1): 500.349 MB/s [ 488.6 IOPS]
Random 4 KiB (Q= 32, T= 1): 168.011 MB/s [ 42002.8 IOPS]
Random 4 KiB (Q= 1, T= 1): 28.314 MB/s [ 7078.7 IOPS]
[Write]
Sequential 1 MiB (Q= 8, T= 1): 356.269 MB/s [ 347.9 IOPS]
Sequential 1 MiB (Q= 1, T= 1): 334.044 MB/s [ 326.2 IOPS]
Random 4 KiB (Q= 32, T= 1): 184.879 MB/s [ 46219.8 IOPS]
Random 4 KiB (Q= 1, T= 1): 84.579 MB/s [ 21144.9 IOPS]
Profile: Default
Test: 1 GiB (x5) [Measure: 5 sec / Interval: 5 sec]
Date: 2023-02-25 14:18:20
OS: ubuntu 22.04 [linux 5.19.0-32-generic]
Output for /dev/sdb1
:
KDiskMark (3.1.2): https://github.com/JonMagon/KDiskMark
Flexible I/O Tester (fio-3.28): https://github.com/axboe/fio
--------------------------------------------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes
[Read]
Sequential 1 MiB (Q= 8, T= 1): 484.235 MB/s [ 472.9 IOPS]
Sequential 1 MiB (Q= 1, T= 1): 494.241 MB/s [ 482.7 IOPS]
Random 4 KiB (Q= 32, T= 1): 24.336 MB/s [ 6084.1 IOPS]
Random 4 KiB (Q= 1, T= 1): 24.453 MB/s [ 6113.4 IOPS]
[Write]
Sequential 1 MiB (Q= 8, T= 1): 313.461 MB/s [ 306.1 IOPS]
Sequential 1 MiB (Q= 1, T= 1): 313.816 MB/s [ 306.5 IOPS]
Random 4 KiB (Q= 32, T= 1): 78.391 MB/s [ 19597.8 IOPS]
Random 4 KiB (Q= 1, T= 1): 77.982 MB/s [ 19495.5 IOPS]
Profile: Default
Test: 1 GiB (x5) [Measure: 5 sec / Interval: 5 sec]
Date: 2023-02-25 14:14:16
OS: ubuntu 22.04 [linux 5.19.0-32-generic]
Given that the NTFS partition is being recognized as a
system by
, I assume that the partition is being mounted using -3g
instead of
, which is the new kernel driver. Will changing my fstab FSTYPE to ntfs3 as described [here](https://www.kernel.org/doc/html/next/filesystems/ntfs3.html) improve performance? Are there any other steps I can take to improve NTFS performance on Linux? If not, are there any ways to non-destructively convert an NTFS partition to Ext4?
Thank you in advance for your help and have a nice day.
**Update:**
Setting the FSTYPE to
in /etc/fstab
did indeed improve the performance a lot.
Output of
for /dev/sdb1
:
KDiskMark (3.1.2): https://github.com/JonMagon/KDiskMark
Flexible I/O Tester (fio-3.28): https://github.com/axboe/fio
--------------------------------------------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes
[Read]
Sequential 1 MiB (Q= 8, T= 1): 525.712 MB/s [ 513.4 IOPS]
Sequential 1 MiB (Q= 1, T= 1): 428.302 MB/s [ 418.3 IOPS]
Random 4 KiB (Q= 32, T= 1): 237.324 MB/s [ 59331.2 IOPS]
Random 4 KiB (Q= 1, T= 1): 43.243 MB/s [ 10810.8 IOPS]
[Write]
Sequential 1 MiB (Q= 8, T= 1): 495.466 MB/s [ 483.9 IOPS]
Sequential 1 MiB (Q= 1, T= 1): 372.929 MB/s [ 364.2 IOPS]
Random 4 KiB (Q= 32, T= 1): 299.469 MB/s [ 74867.4 IOPS]
Random 4 KiB (Q= 1, T= 1): 135.961 MB/s [ 33990.3 IOPS]
Profile: Default
Test: 1 GiB (x5) [Measure: 5 sec / Interval: 5 sec]
Date: 2023-02-25 15:45:46
OS: ubuntu 22.04 [linux 5.19.0-32-generic]
However, if I change the mount option to ntfs3, I am unable to play any steam games on the partition which rely on proton. I can only run those games when I use the ntfs mount option which uses ntfs-3g.
**Update 2:**
I found a workaround to use ntfs3 with proton, so I will be keeping that flag in /etc/fstab
. Any other suggestions for NTFS performance improvements or filesystem conversions from NTFS which are both non-destructive and compatible with both Windows 10 and Linux are welcome.
Kumaresh Balaji Sundararajan
(51 rep)
Feb 25, 2023, 10:09 AM
• Last activity: Aug 22, 2024, 02:04 AM
11
votes
1
answers
5939
views
How do I get the creation date of a file on an NTFS logical volume?
I created an NTFS logical volume on my Linux system for Windows file storage because I want to retain the creation date of my files (I would probably zip them into an archive and then unzip them, though I have no idea if that would work). Does NTFS-3G save the creation date of files on Linux? If so,...
I created an NTFS logical volume on my Linux system for Windows file storage because I want to retain the creation date of my files (I would probably zip them into an archive and then unzip them, though I have no idea if that would work). Does NTFS-3G save the creation date of files on Linux? If so, how do I access it?
Reading this thread , the OP links documentation on NTFS that provides a shell script for finding the creation date. I modified it in an attempt to get the seconds from the hex value, but I believe that I am doing something wrong:
#!/bin/sh
CRTIME=`getfattr -h -e hex -n system.ntfs_times $1 | \
grep '=' | sed -e 's/^.*=\(0x................\).*$/\1/'`
SECONDS=$(($CRTIME / 10000000))
echo
date --date=$SECONDS
NobleUplift
(381 rep)
Aug 18, 2013, 06:41 PM
• Last activity: Jul 28, 2024, 02:48 AM
0
votes
1
answers
455
views
Files created by user in a mounted partition show root as owner
I have a dual boot system (Windows 10/Archlinux) and I have created a NFTS partition which is mounted at startup via /etc/fstab so I can access it from both OS'es. The `fstab` file shows that the partition is mounted with read and write permissions (`rw`) with `user_id=0` and `group=0`, both values...
I have a dual boot system (Windows 10/Archlinux) and I have created a NFTS partition which is mounted at startup via /etc/fstab so I can access it from both OS'es.
The
fstab
file shows that the partition is mounted with read and write permissions (rw
) with user_id=0
and group=0
, both values related to the root user, followed by the option allow_other
which lets my regular user access the mounted file system.
When files or folders are created by the regular user (non root) into the mounted partition those are created as if they were owned/created by root as shown by ls -l
command. Even if I try to use chmod
, the permissions are unaffected and no errors are shown.
I've also tried changing in /etc/fstab both user_id
and group_id
to 1000
, corresponding to the non-root user and reloading entries with sudo mount -av
. After that, I created a file in the mounted partition but it keeps showing the root as the user owner.
I suspect the issue could be the fstab configuration, but I'm not sure. Next I'll share some info related to the configuration of the partition inside the fstab file and the before mentioned commands and its outputs:
/etc/fstab/
UUID=B23A2CB93A2C7C8B /mnt/Contenido ntfs-3g rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096 0 0
$ cd /mnt/Contenido
$ whoami
> joao
$ touch random_file
$ ls -l
> -rwxrwxrwx 1 root root 0 Feb 19 16:45 random_file
$ sudo chmod -v 700 random_file
> mode of 'random_file' changed from 0777 (rwxrwxrwx) to 0700 (rwx------)
$ ls -l
> -rwxrwxrwx 1 root root 0 Feb 19 16:45 random_file
>
JulioOAO
(21 rep)
Feb 20, 2024, 06:09 PM
• Last activity: Feb 23, 2024, 05:47 AM
1
votes
0
answers
105
views
Recovering "invisible" files from external HDD
My external HDD (WD Elements) just went into a strange state and I am asking this question to see if anyone can make sense of this. I was running a long job overnight which reads some large files from this HDD, processes them, and then writes a few smaller files back to the HDD. In the morning, afte...
My external HDD (WD Elements) just went into a strange state and I am asking this question to see if anyone can make sense of this.
I was running a long job overnight which reads some large files from this HDD, processes them, and then writes a few smaller files back to the HDD. In the morning, after the job has finished, it appeared as if most files were deleted from the external drive.
Using dolphin or
ls
only some of the files the job was supposed to write were there, the others weren't. Additionally, all large files, that the job was only supposed to read, were missing.
However, the job should have failed if one of the large files had been deleted. And indeed I can actually read these "non-existent" files if I type in their name from memory (_e.g._ I was able to just cp
them to another location).
The job had finished successfully and all files were written, but tools like ls
just wouldn't show them (I also tried un- and remounting).
I solved this problem by remembering file paths but is there a way to recover if you don't remember these files?
I am on on Ubuntu 22.04 and the external HDD has ntfs3:
$ df -hT
...
/dev/sdb1 ntfs3 1,9T 863G 1001G 47% /media/marc/Elements
**Edit**
The job was a python script that was reading grib files using pupygrib
and nc files using netCDF4
. All grib and nc files were not found by ls
later on (even though they were still there).
For pupygrib
I open(..., "rb")
a filehandle in python, netCDF4
opens a file in C with "r"
mode.
For writing, the python script used pyarrow
to write parquet files. Some of these files "got missing" (even though, as mentioned, they were actually still there).
As far as I can see pyarrow
uses open(..., 'wb')
in python to open a file for writing .
While copying files back around in the HDD I just noticed that some files also seem to disappear after renaming them (using mv
). I don't notice any systematic disappearing though (e.g. that certain names tend to disappear).
All pathnames consist of only characters a-Z, numbers 0-9, _
, /
, .
, -
.
The longest pathname is 110 characters long.
**Smartmontools**
$ sudo smartctl -q noserial -a /dev/sdb
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-6.5.0-10022-tuxedo] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: WDC WD20SDRW-11VUUS0
Firmware Version: 01.01A01
User Capacity: 2.000.365.379.584 bytes [2,00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Form Factor: 2.5 inches
TRIM Command: Available, deterministic
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-3 T13/2161-D revision 5
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat Feb 3 13:07:08 2024 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (14640) seconds.
Offline data collection
capabilities: (0x51) SMART execute Offline immediate.
No Auto Offline data collection support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 298) minutes.
SCT capabilities: (0x7035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 196 190 021 Pre-fail Always - 3158
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 216
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 316
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 51
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 27
193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 2773
194 Temperature_Celsius 0x0022 113 098 000 Old_age Always - 34
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 316 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
mRcSchwering
(111 rep)
Feb 2, 2024, 11:57 AM
• Last activity: Feb 3, 2024, 12:24 PM
2
votes
0
answers
112
views
Can rsync copy all files (including special ones like soft and hard links) from a ntfs partition to another one?
To make backups for my computer, I installed Xubuntu on an external hard disk to boot from and create images in another partition on the external hard disk. This also ensures that the file systems of the system to be backed up are not mounted during the backup. To create *images* of the ntfs Windows...
To make backups for my computer, I installed Xubuntu on an external hard disk to boot from and create images in another partition on the external hard disk. This also ensures that the file systems of the system to be backed up are not mounted during the backup.
To create *images* of the ntfs Windows system and of the ntfs home partition of my computer I use
. For *images* of ext4 partitions I use
. The packages -3g883
and -3g
are installed on my system in order to deal with ntfs partitions.
It is quite useful to have not only an image, but also *snapshots of copies* of the file systems. I have written scripts that essentially execute these commands:
sudo mount -o ro /dev/sdaX /mnt/alt # X varies for the partitions to be backed up
DATE=$(\date -Idate)
mkdir /backup/X_${DATE}
sudo rsync --stats --numeric-ids --quiet -axAhHP /mnt/ /backup/X_${DATE} # the / after mnt matters!
sudo rsync --stats --numeric-ids --quiet -axAhHPc /mnt/ /backup/X_${DATE}
sudo umount /mnt
These scripts work fine for fat, vfat and ext4 partitions, but they fail with thousands of error messages for the ntfs Windows 10 system partition, even when I use a ntfs partition as destination (which seems to be necessary since Windows ACLs and their Linux counterparts in ext4-partitions differ).
Googling around, I found articles that Windows soft and hard links could be the culprit. There are Linux recovery systems that can handle all kinds of partitions and all kinds of files in them, including Windows ones: How do they access the files and how do they do it so that they also copy link files and ACLs 1:1?
**What is the right way to copy all ntfs files of a partition such that they can be used by a Windows system like the original files?**
Adalbert Hanßen
(303 rep)
Jan 16, 2024, 10:34 PM
0
votes
0
answers
96
views
Large files end up corrupted when copying to a compressed NTFS3 win drive
I have two SSDs, one Linux, one Windows 11, and an HDD. I can copy normal-sized files just fine to each other, generally they are under 2GB. Recently, I tried to copy a big file (32GB) from Linux (ext4) over to the Windows (ntfs3) and no matter how many times I tried, it always ended up with a misma...
I have two SSDs, one Linux, one Windows 11, and an HDD. I can copy normal-sized files just fine to each other, generally they are under 2GB.
Recently, I tried to copy a big file (32GB) from Linux (ext4) over to the Windows (ntfs3) and no matter how many times I tried, it always ended up with a mismatching md5sum (but consistent over every try).
I could copy to HDD, then boot into windows, and copy into Windows from the HDD just fine, as well.
After a while, I realized if I disable compression, I can copy directly to the Windows SSD.
I was wondering if this issue rests on the Linux side, e.g. it's not mounting the Windows SSD with proper flags or something, hence why file ends up being corrupted. Thoughts?
d9ngle
(357 rep)
Nov 21, 2023, 07:41 AM
1
votes
2
answers
432
views
Permissions and groups in fstab ignored
I need to read and write to an usb ntfs pendrive through `www-data` group (that has uid 33) so I have added UUID=34A0456D004536A0 /home/mypath ntfs-3g rw,defaults,uid=1000,gid=33,dmode=770,fmode=660,dmask=007,fmask=117,auto 0 0 the disk is mounted but with generic permissions applied to all USB driv...
I need to read and write to an usb ntfs pendrive through
www-data
group (that has uid 33) so I have added
UUID=34A0456D004536A0 /home/mypath ntfs-3g rw,defaults,uid=1000,gid=33,dmode=770,fmode=660,dmask=007,fmask=117,auto 0 0
the disk is mounted but with generic permissions applied to all USB drivers ignoring everything I placed in fstab but mount path that is correct.
I have also used sudo ntfsusermap to generate a mapping file to place in .NTFS-3G folder in the drive.
What could be the reason?
How can solve this problem?
AndreaF
(145 rep)
Oct 20, 2023, 08:38 AM
• Last activity: Oct 22, 2023, 03:39 PM
3
votes
3
answers
2964
views
How to delete a corrupted file on an NTFS partition?
I have an NTFS partition(`/dev/sda3`) mounted via **ntfs-3g** on arch linux. This partition contains a file called `cee431d2730eb5e1697bd57b3bb529` which I want to delete. `ls -la` returns the following output ls: cannot access 'data/cee431d2730eb5e1697bd57b3bb529': Input/output error total 16611578...
I have an NTFS partition(
/dev/sda3
) mounted via **ntfs-3g** on arch linux.
This partition contains a file called cee431d2730eb5e1697bd57b3bb529
which I want to delete.
ls -la
returns the following output
ls: cannot access 'data/cee431d2730eb5e1697bd57b3bb529': Input/output error
total 16611578
#Some other files...
d????????? ? ? ? ? ? cee431d2730eb5e1697bd57b3bb529
Similarly file cee431d2730eb5e1697bd57b3bb529
returns cee431d2730eb5e1697bd57b3bb529: cannot open 'cee431d2730eb5e1697bd57b3bb529' (Input/output error)
ls -i
also returns ? cee431d2730eb5e1697bd57b3bb529
(it can't find the inode)
I tried deleting it with rm -f
which also fails with an input/output error(both as root and normal user).
Running ntfsfix /dev/sda3
also didn't fix the problem.
Nogatco
(41 rep)
Sep 8, 2018, 10:05 AM
• Last activity: Oct 10, 2023, 08:07 PM
4
votes
1
answers
1870
views
What's the difference between ntfs-3g and lowntfs-3g?
I've been having some performance issues with games on my NTFS drive. I share a steam library between Linux and Windows, which resides on a PCIe4 NVME, NTFS formatted. Running e.g Baldur's Gate 3 of it loads very slowly, compared to running it from my ext4, also on a pcie4 NVME. The difference is st...
I've been having some performance issues with games on my NTFS drive. I share a steam library between Linux and Windows, which resides on a PCIe4 NVME, NTFS formatted. Running e.g Baldur's Gate 3 of it loads very slowly, compared to running it from my ext4, also on a pcie4 NVME. The difference is staggering, 15 seconds vs 60. Yet both drives are similar in terms of read specs.
There's also a CPU spike by the ntfs-3g driver while loading.
I tried pretty much everything to up the performance, like noatime, big_writes and the likes, nothing worked. Until I tried lowntfs-3g. I tried it as a last resort and it worked. It's very fast, as fast as the ext4!
So, what am I missing? What is the downside? I failed to find any info of this on the internet or man pages.
I'm using Ubuntu 22.04 (KDE Neon 5.27) with Xanmod kernel 6.4.10.
dekomote
(241 rep)
Aug 20, 2023, 04:24 PM
• Last activity: Aug 20, 2023, 08:33 PM
3
votes
2
answers
3209
views
mount command permissions: ntfs vs. ntfs-3g
I see numerous how-to examples for mounting an `ntfs` partition with either a `mount` command or an entry in `fstab`. In all cases, specifying `ntfs` as the filesystem is associated with also specifying `umask=0222`, and specifying `ntsf-3g` never has a `umask` parameter. Trying to research `umask`,...
I see numerous how-to examples for mounting an
ntfs
partition with either a mount
command or an entry in fstab
. In all cases, specifying ntfs
as the filesystem is associated with also specifying umask=0222
, and specifying ntsf-3g
never has a umask
parameter.
Trying to research umask
, I came across numerous explanations like this one . I can't get from those explanations to understanding "0222", which among other things, has one more digit than the specification seems to describe. I understand that it supposedly reduces permissions from the default definition. That's not much help, either. I'm guessing that it relates to writing, since in Linux, ntfs-3g
supports it and at least as of a few years ago, ntfs
did not.
What are the default permissions (I assume they relate to the directories and files and are independent of the filesystem), and what does "0222" do to that? Why is it needed? Is it just to avoid an error message trying to write to a partition when Linux doesn't support it?
fixer1234
(701 rep)
Oct 16, 2014, 04:57 AM
• Last activity: Jul 30, 2023, 02:30 PM
2
votes
2
answers
1150
views
Cannot change the ownership mounting ntfs drive
Why I cannot change the ownership on mounting ntfs drive? I give `uid=1000,gid=1000,` etc in my `/etc/fstab` file, but found it is not working. So I'm testing it out on command line: ```sh root@host:~# mount | grep /mnt/tmp1 | wc 0 0 0 root@host:~# mount -o uid=1000 /dev/nvme0n1p4 /mnt/tmp1/ root@ho...
Why I cannot change the ownership on mounting ntfs drive?
I give
uid=1000,gid=1000,
etc in my /etc/fstab
file, but found it is not working. So I'm testing it out on command line:
root@host:~# mount | grep /mnt/tmp1 | wc
0 0 0
root@host:~# mount -o uid=1000 /dev/nvme0n1p4 /mnt/tmp1/
root@host:~# mount | grep /mnt/tmp1
/dev/nvme0n1p4 on /mnt/tmp1 type fuseblk (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
root@host:~# umount /mnt/tmp1
root@host:~# mount -o user_id=1000 /dev/nvme0n1p4 /mnt/tmp1/
root@host:~# mount | grep /mnt/tmp1
/dev/nvme0n1p4 on /mnt/tmp1 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish
$ apt-cache policy mount
mount:
Installed: 2.36.1-8ubuntu1
Candidate: 2.36.1-8ubuntu2
Version table:
2.36.1-8ubuntu2 500
500 http://archive.ubuntu.com/ubuntu impish-updates/main amd64 Packages
*** 2.36.1-8ubuntu1 500
500 http://archive.ubuntu.com/ubuntu impish/main amd64 Packages
100 /var/lib/dpkg/status
Am I missing something?
Why I cannot change the ownership on mounting ntfs drive?
xpt
(1858 rep)
Nov 15, 2021, 08:28 PM
• Last activity: Jul 30, 2023, 02:27 PM
Showing page 1 of 20 total questions