You are not logged in.

#1 2025-01-29 19:18:35

seriosk
Member
Registered: 2023-09-24
Posts: 11

My hard drive is mounting as read-only?

Hi all, my secondary internal nvme is being a bit odd with writing to it.

In my fstab I have

/dev/nvme1n1p1 /mnt/storage vfat dmask=000,fmask=0111,rw 0 0

The following works, but is unwritable?

sudo touch /mnt/storage/test

The following produces operation not permitted, even as root:

sudo chown -R $USER:$USER /mnt/storage

fdisk -l reports

Device         Boot Start        End    Sectors   Size Id Type
/dev/nvme1n1p1       2048 1953525167 1953523120 931.5G  c W95 FAT32 (LBA)

I am now running this but its taking a while

sudo dosfsck -w -r -l -a -v -t /dev/nvme1n1p1

Thanks in advance.

Last edited by seriosk (2025-01-29 19:26:58)

Offline

#2 2025-01-29 19:31:09

Nikolai5
Member
From: North West, England, UK
Registered: 2024-01-27
Posts: 272

Re: My hard drive is mounting as read-only?

Are you dualbooting with windows by any chance?

Has this drive interacted with Windows at all?

Consider running fsck on the drive.

Last edited by Nikolai5 (2025-01-29 19:35:03)


Ryzen 7 9850X3D | AMD 7800XT | KDE Plasma

Offline

#3 2025-01-29 19:35:59

seriosk
Member
Registered: 2023-09-24
Posts: 11

Re: My hard drive is mounting as read-only?

Hey I did dual boot, a long time ago but I've had many solo linux distributions only since smile its also been working a few weeks ago

It's a fat32 so I guess I need dosfsck? I'm running that right now.

It gave this

Checking for bad clusters.
Reclaiming unconnected clusters.
Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
 Automatically removing dirty bit.
Checking free cluster summary.
/dev/nvme1n1p1: 153224 files, 9618036/30516345 clusters

But a reboot still results in the same problem.

Last edited by seriosk (2025-01-29 19:45:52)

Offline

#4 2025-01-29 19:57:27

Nikolai5
Member
From: North West, England, UK
Registered: 2024-01-27
Posts: 272

Re: My hard drive is mounting as read-only?

Have you tried removing from fstab and mounting manually? Is that RW?

Could you try replacing dmask=000,fmask=0111 with umask=0000


I asked about windows in relation to fast startup which causes all kinds of issues, but if you're not doing that then fine.


Ryzen 7 9850X3D | AMD 7800XT | KDE Plasma

Offline

#5 2025-01-29 20:33:02

cryptearth
Member
Registered: 2024-02-03
Posts: 2,130

Re: My hard drive is mounting as read-only?

is there a reason you use FAT32 on a 1TB nvme ssd? otherwise I recommend reformatting with ext4 or xfs or even zfs - but at least exfat
as you don't use it to exchange data between linux and windows I struggle to see any point in the chose filesystem

Offline

#6 2025-01-30 19:23:02

seriosk
Member
Registered: 2023-09-24
Posts: 11

Re: My hard drive is mounting as read-only?

Nikolai5 wrote:

Have you tried removing from fstab and mounting manually? Is that RW?

Could you try replacing dmask=000,fmask=0111 with umask=0000


I asked about windows in relation to fast startup which causes all kinds of issues, but if you're not doing that then fine.

Hey I tried this but still having issues.

I've tried mounting manually but still the same issue. It just makes everything read-only.

Last edited by seriosk (2025-01-30 19:24:15)

Offline

#7 2025-01-30 19:23:35

seriosk
Member
Registered: 2023-09-24
Posts: 11

Re: My hard drive is mounting as read-only?

cryptearth wrote:

is there a reason you use FAT32 on a 1TB nvme ssd? otherwise I recommend reformatting with ext4 or xfs or even zfs - but at least exfat
as you don't use it to exchange data between linux and windows I struggle to see any point in the chose filesystem

To be honest its just left over from when I had both. I've just never changed it.

Offline

#8 2025-01-30 21:15:27

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: My hard drive is mounting as read-only?

seriosk wrote:

In my fstab I have

/dev/nvme1n1p1 /mnt/storage vfat dmask=000,fmask=0111,rw 0 0

You should use UUIDs to identify the filesystem if you have multiple NVMe devices, the assignments can change from one boot to the next.

And more importantly: fs_passno (the sixth, final, field) should be set to "2" for non-root partitions (btrfs excepted). Having "0" means the partition won't be checked for errors on booting, which is very important for FAT filesystems.

Once more for clarity: change the last number from "0" to "2" and also change any other non-root, non-btrfs mountpoints in the same way.

seriosk wrote:

The following works, but is unwritable?

sudo touch /mnt/storage/test

I don't understand what you mean by "works, but it is unwritable". Is the test file created or not?

Please share the output of

findmnt /mnt/storage
seriosk wrote:

The following produces operation not permitted, even as root

That is the expected behaviour — FAT filesystems do not support Linux permissions.

EDIT: corrections.

Last edited by Head_on_a_Stick (2025-01-30 21:18:58)


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB