I'm running Raspbian Lite on an RPi3B+. It's powered with a bench power supply capable of sourcing over 3A. I never see an "under-voltage" warning.
My application requires an USB pen drive always inserted - I mean it's cannot be plugged/unplugged with the system running. The end-user as to shutdown the system before disconnect it. This is by-design and I cannot change this behavior.
proc /proc proc defaults 0 0 PARTUUID=7ee80803-01 /boot vfat defaults,ro 0 2 PARTUUID=7ee80803-02 / ext4 defaults,noatime,ro 0 1 PARTUUID=7ee80803-03 /home ext4 defaults,noatime 0 2 tmpfs /tmp tmpfs nosuid,nodev 0 0 tmpfs /var/log tmpfs nosuid,nodev 0 0 tmpfs /var/tmp tmpfs nosuid,nodev 0 0 /dev/sda1 /home/pi/extusb vfat user,rw,umask=111,dmask=000,gid=1000,uid=1000 0 3
but after a couple of reboots during startup the system mounts the pen in read-only:
[ 4.560207] usb-storage 1-1.2:1.0: USB Mass Storage device detected [ 4.566705] scsi host0: usb-storage 1-1.2:1.0 [ 5.593586] scsi 0:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 4 [ 5.597571] sd 0:0:0:0: [sda] 15728640 512-byte logical blocks: (8.05 GB/7.50 GiB) [ 5.598365] sd 0:0:0:0: [sda] Write Protect is off [ 5.598379] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00 [ 5.599085] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 5.609056] sda: sda1 [ 5.611895] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 5.612191] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 5.890426] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. [ 52.418004] FAT-fs (sda1): error, fat_free_clusters: deleting FAT entry beyond EOF [ 52.418019] FAT-fs (sda1): Filesystem has been set read-only
the messages might change, but at the end it mounts in ro mode. To find the cause I did the following tests:
- changed power supply (even I'm using a good one)
- changed RPi
- changed USB pens
I'm wondering if there's something wrong in my approach.
Please note the user will cut the power to "shutdown" the system. This is also by-design. For this reason I mount the filesystem
/ in ro, but as you can see I have my
/home partition on the sd-card mounted in rw and I never had a problem in 5-6 years and hundreds of systems out there.
My application writes on both partitions (
/home/pi/extusb) rarely. Anyway the issue I'm talking now happens even if I don't write anything to the USB pen. Just reboot few times and the device will corrupt.