How to remount a disk that goes into read-only mode without rebooting?
7,161
Solution 1
From Linux, how to change HDD state from ReadOnly after temporarly crash? the accepted answer (with 12 upvotes, at the time of this writing) states:
try with
blockdev --setrw
orhdparm -r 0
Solution 2
Can you please try this:
mount -o remount,rw /dev/nvme0n1p2
It works fine for me.
If you find anything please let me know.
-Karmdip Joshi
Related videos on Youtube
Author by
Guerlando OCs
Updated on September 18, 2022Comments
-
Guerlando OCs over 1 year
I have a kernel bug that makes my SSD go into read-only mode. To fix this I have to reboot the system, do
fsck /dev/nvme0n1p2
, and then reboot again to make everything work.Instead of doing the reboot, I tried to just do
sudo fsck /dev/nvme0n1p2
but how can I mount the
nvme0n1p2
disk without rebooting? I want to work on my machine without needing to reboot.I tried:
lz@blade:~$ sudo mount /dev/nvme0n1p2 mount: /: /dev/nvme0n1p2 already mounted on /.
So I tried:
lz@blade:~$ sudo umount /dev/nvme0n1p2 lz@blade:~$ sudo mount /dev/nvme0n1p2 mount: /: /dev/nvme0n1p2 already mounted on /.
Can somebody help me?
-
tudor -Reinstate Monica- almost 5 yearsAlso, disks go read-only for a reason. You should definitely look into why that's happening. syslog is your friend.
-
Pablo Bianchi almost 5 years
-
Dr_Bunsen almost 5 yearsAre you sure it is not the SSD going into the "I am dying" mode, making it read only so you can rescue stuff?
-
Guerlando OCs almost 5 years@Dr_Bunsen I tried another brand new SSD and the same problem happens, and also other people have this problem
-
-
Guerlando OCs almost 5 yearssudo mount -o remount,rw /dev/nvme0n1p2 mount: /: cannot remount /dev/nvme0n1p2 read-write, is write-protected.