Linux Disk – How ext4 Disk Became Write Protected Despite RW Configuration

diskfstablinuxmountrhel

We have a Redhat 7 machine. And the filesystem for device /dev/sdc is ext4.

When we perform:

mount -o rw,remount /grop/sdc

We get write protected error like:

/dev/sdc read-write, is write-protected 

in spite the /etc/fstab allow read and write and all sub folder under /grop/sdc have full write/read permissions:

/dev/sdc /grop/sdc ext4 defaults,noatime 0 0

Then we do

umount -l  /grop/sdc

and from df -h, we see that the disk is currently not mounted.

Then we perform

 mount /grop/sdc

but we get busy. 🙁

So we do not have a choice and we perform a reboot.

And from history we do not see that someone limited the disk for read only by mount.

This is very strange, how the disk device became write protected?

In order to solve this we perform a full reboot, and now the disk is write/read as it should be.

What happens here, after reboot we check the dmesg and we see the following:

 EXT4-fs warning (device sdc): ext4_clear_journal_err:4698: Marking fs in need of filesystem check.
 EXT4-fs (sdc): warning: mounting fs with errors, running e2fsck is recommended
 EXT4-fs (sdc): recovery complete

can we say that during boot – e2fsck was performed ?

dmesg | grep sdc
[sdc] Disabling DIF Type 2 protection
[sdc] 15628053168 512-byte logical blocks: (8.00 TB/7.27 TiB)
[sdc] 4096-byte physical blocks
[sdc] Write Protect is off
[sdc] Mode Sense: d7 00 10 08
[sdc] Write cache: disabled, read cache: enabled, supports DPO and FUA
sdc: unknown partition table
[sdc] Attached SCSI disk
EXT4-fs warning (device sdc): ext4_clear_journal_err:4697: Filesystem error 
 recorded from previous mount: IO failure
EXT4-fs warning (device sdc): ext4_clear_journal_err:4698: Marking fs in 
need of filesystem check.
EXT4-fs (sdc): warning: mounting fs with errors, running e2fsck is recommended
 EXT4-fs (sdc): recovery complete
 EXT4-fs (sdc): mounted filesystem with ordered data mode. Opts: (null)
 EXT4-fs (sdc): error count since last fsck: 5
 EXT4-fs (sdc): initial error at time 1510277668: ext4_journal_check_start:56
 EXT4-fs (sdc): last error at time 1510496990: ext4_put_super:791

Best Answer

It appears your filesystem has become corrupt somehow. Most filesystems switch to read-only mode once they encounter an error. Please perform the following commands in a terminal:

umount /dev/sdc
e2fsck /dev/sdc
mount /dev/sdc

If /dev/sdc is the harddisk which has your operating system on it, use a startup DVD or usb stick to boot from.

Related Question