1

It seems that recently my SSD began to get corrupted almost every time I shut my Pi 3B+ down, and on boot I get:

[    4.503731]  sda: sda1 sda2
[    4.511049] sd 0:0:0:0: [sda] Attached SCSI disk
[    4.535157] EXT4-fs (sda2): INFO: recovery required on readonly filesystem
[    4.540448] EXT4-fs (sda2): write access will be enabled during recovery
[    4.648339] EXT4-fs (sda2): recovery complete
[    4.654438] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    4.659839] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
[    4.671015] devtmpfs: mounted
...

I'm running my Pi 3b+ 100% of an external SSD, connected via USB. I tried mounting my SSD in another linux machine and running fsck on it, but the problem seems to recur.

I've been running it for almost a year now, without problems, and I have no reason to suspect it's a problem with the SSD itself.

Edit:

$ cat /etc/fstab
proc            /proc           proc    defaults          0       0
PARTUUID=af115a56-01  /boot           vfat    defaults          0       2
PARTUUID=af115a56-02  /               ext4    defaults,noatime  0       1
 a swapfile is not a swap partition, no line here
   use  dphys-swapfile swap[on|off]  for that
##RAMDISK##
none /tmp tmpfs defaults 0 0
$ mount
/dev/sda2 on / type ext4 (rw,noatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=342320k,nr_inodes=85580,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
configfs on /sys/kernel/config type configfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
none on /tmp type tmpfs (rw,relatime)
/dev/sda1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=94780k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       110G  6.7G   99G   7% /
devtmpfs        335M     0  335M   0% /dev
tmpfs           463M   49M  415M  11% /dev/shm
tmpfs           463M   13M  451M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           463M     0  463M   0% /sys/fs/cgroup
none            463M   56K  463M   1% /tmp
/dev/sda1        44M   23M   21M  53% /boot
tmpfs            93M     0   93M   0% /run/user/1000
  • 2
    how are you shutting your pi down? – Jaromanda X Jan 17 '20 at 4:25
  • 1
    From the terminal, shutdown now. I wait until the screen goes black before pulling the power. – user96931 Jan 17 '20 at 15:20
2

After I shutdown now, and wait for the process to finish, the power to the USB drive goes off (for a couple seconds), and if I unplug it before the USB power comes back on again, there's no corruption. For some reason, USB power comes back on again (after a couple seconds) and if I wait until that happens (the USB power coming back on) to unplug my SSD (or even to unplug the Pi), it gets corrupted.

  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Jan 20 '20 at 13:14
  • Ooops, sorry for not doing that. I forgot to :) – user96931 Feb 18 '20 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.