Error: Read-only file system (/mnt/dietpi_userdata/downloads

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
ssr.karthikeya

Error: Read-only file system (/mnt/dietpi_userdata/downloads

Post by ssr.karthikeya »

Hi all,

The Dietpi Image is a fresh one v148 on a RPi 2 Model B (armv7l).

I used the Dietpi-Drive_Manager tool to mount my 16GB kingston USB 3.0.

From time to time (~1 hour) the USB drive becomes a Read-Only file system. I cannot remount with -rw option since my dietpi_userdata is located on this drive.

I have checked /etc/fstab

Code: Select all

#Internal Drives---------------------------------------------------
proc            /proc           proc    defaults                                                                                        0 0
/dev/mmcblk0p1  /boot           auto    defaults,noatime,discard                                                        0 2
/dev/mmcblk0p2  /               auto    defaults,noatime,discard                                                        0 1
tmpfs                   /tmp                    tmpfs   defaults,noatime,nodev,nosuid,mode=1777                         0 0
tmpfs                   /var/log                tmpfs   defaults,size=20m,noatime,nodev,nosuid,mode=1777        0 0
tmpfs                   /DietPi                 tmpfs   defaults,size=10m,noatime,nodev,nosuid,mode=1777        0 0

#External Drives---------------------------------------------------
#NB: Please use dietpi-drive_manager to setup and control your external drives.

#Samba Client------------------------------------------------------
#/mnt/samba . Please use dietpi-config and the Networking Options: NAS menu to setup this mount

#FTP Client Mount--------------------------------------------------
#/mnt/ftp_client . Please use dietpi-config and the Networking Options: NAS menu to setup this mount

#NFS Client Mount--------------------------------------------------
#/mnt/nfs_client . Please use dietpi-config and the Networking Options: NAS menu to setup this mount
UUID=7b2aed01-97e1-4652-959a-6ab258fa9c86       /mnt/7b2aed01-97e1-4652-959a-6ab258fa9c86      auto     defaults,noatime,nofail,x-systemd.automount,rw  0 0
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
I have specified the rw option in fstab. It doesn'st seem to clear the problem.

For some reason the Drive is mounted under "NFS Client Mount" instead of "External Drives" :?: .

blkid shows:

Code: Select all

/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="64EB-FD02" TYPE="vfat" PARTUUID="ee614650-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="6e11ba37-3d23-4d99-8ad6-b6a7a5fb372d" TYPE="ext4" PARTUUID="ee614650-02"
/dev/sda1: LABEL="downloads" UUID="7b2aed01-97e1-4652-959a-6ab258fa9c86" TYPE="ext4" PARTLABEL="Microsoft Basic Data" PARTUUID="34b8b6dc-6c26-443a-9265-fdc8db500e4f"
/dev/mmcblk0: PTUUID="ee614650" PTTYPE="dos"
dmesg | grep "EXT4" shows the following:

Code: Select all

[    2.050076] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    7.564817] EXT4-fs (mmcblk0p2): re-mounted. Opts: discard
[   10.995473] EXT4-fs (sda1): recovery complete
[   11.000548] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 1095.276873] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 8388608 size 4194304 starting block 172544)
[ 1095.329410] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 8388608 size 4194304 starting block 172800)
[ 1095.381784] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 8388608 size 4194304 starting block 173056)
[ 1095.433674] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 8388608 size 4194304 starting block 173312)
[ 1095.486001] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 83886080 size 4194304 starting block 190976)
[ 1095.538376] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 83886080 size 4194304 starting block 191232)
[ 1095.590818] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 83886080 size 4194304 starting block 191488)
[ 1095.644227] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 83886080 size 4194304 starting block 191744)
[ 1095.697113] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 98566144 size 6291456 starting block 194560)
[ 1095.749296] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 98566144 size 6291456 starting block 194816)
[ 1102.068684] EXT4-fs error (device sda1): ext4_journal_check_start:56: Detected aborted journal
[ 1102.068703] EXT4-fs (sda1): Remounting filesystem read-only
[ 1102.068716] EXT4-fs (sda1): previous I/O error to superblock detected
[ 1102.071533] EXT4-fs (sda1): ext4_writepages: jbd2_start: 6144 pages, ino 130573; err -30
This effects my downloads in Transmission.

The USB drive is fairly new and has been used for a month or so , 24/7.

I found out that rebooting the Pi solves the problem. Also, a little research on Fstab showed that adding errors=remount-rw as a mount option may solve the problem but it didn't.
Last edited by ssr.karthikeya on Sat Apr 22, 2017 4:27 pm, edited 1 time in total.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Error: Read-only file system (/mnt/dietpi_userdata/downl

Post by Fourdee »

From time to time (~1 hour) the USB drive becomes a Read-Only file system.
ext4_end_bio:329: I/O error -121 writing to inode 130573 (offset 8388608 size 4194304 starting block
I/O indicates drive is failing, or, insufficient power (ensure official PSU is used).
For some reason the Drive is mounted under "NFS Client Mount" instead of "External Drives" :?: .
When attaching drives in dietpi-drive_manager, new entries are added to the end of file. Location in file has no bearing of its effect.

You could try formatting the drive again, see if that resolves it.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
ssr.karthikeya

Re: Error: Read-only file system (/mnt/dietpi_userdata/downl

Post by ssr.karthikeya »

I/O indicates drive is failing, or, insufficient power (ensure official PSU is used).
I have been using the official Cannakit micro usb type 2.5A adapter, it must be the USB drive that's failing.
You could try formatting the drive again, see if that resolves it.
After a couple of stress tests on the drive (which resulted in no errors or bad blocks), formatting it to NTFS and changing the mount options with umask i.e

Code: Select all

/dev/sda2 /win ntfs-3g rw,dev,exec,auto,async,users,umask=022,uid=1000,gid=1000,locale=en_GB.utf8,  errors=remount-rw 0 0


The drive is running fine now. Although giving full permissions to a drive is a bad idea, for the time being, its fine by me. I will probably change them after a day or two with no errors in dmesg.
Post Reply