Repeatedly Losing File Systems

  • Hi,


    I've set up a Raspberry Pi 4 with OMV. I've lost access to several file systems now.


    The file systems I've lost are all EXT4, some with Luks, some without. It's happened on different drives, one USB powered and one wall powered. It seems to happen when a drive is in use and power is cut, either through unplugging or through an OMV GUI initiated shutdown.


    I've scoured the forums and haven't been able to find a solution. I know I can reformat but I'm hoping to find a solution that allows the system to be turned off without risking loss of a filesystem and in the event of a filesystem loss find a way to recover the data.


    The drive didn't mount with:

    sudo partprobe /dev/sdb

    sudo mount -a


    Here's the output of

    lsblk


    This is the output of

    cat /etc/fstab


    I'm not sure what other info would help to solve this.

  • What charger are you using? The official one?

    You say you have 1 USB powered drive and 1 wall powered but then you show up with 3 drives?

    one USB powered and one wall powered

    Care to explain where the 3rd one comes from???

    And if you keep unplugging drives (while OMV is running) you will have issues (unless it's a USB drive prepared to be used by USB Backup plugin)


    So, you cloned your SD card to a USB drive, correct?

    mmcblk and sdc are clones, remove one of them.

  • Unfortunately not, I'm using a phone charger, but it is 5v 3a. I suspect the issue isn't around the power itself because I have the same issue on the self powered drive and the issue only seems to happen when the Pi is rebooted.


    Yeah, I cloned the SD card to a 3rd usb as a backup of the system. I've tried in the past to access the drives from the backup and that doesn't seem to work.


    For the drives that are used day to day, the ones that keep disappearing, I've only unplugged when shut down.


    From my observation it seems that if there is an active read or write and and the system is rebooted when it's started up again the drive won't mount.


    Weirdly, when I lose the filesystem on the 2.7 TB drive I can't boot until it's unplugged (it's the unencrypted one). That is not an issue with the 456 GB drive (encrypted). I can't access either file system at the moment.

  • I'll try to explain this in a good way:


    See this:

    Code
    sdc 8:32 0 465.8G 0 disk <<<--- This is your USB drive to where you cloned the SD Card
    ├─sdc1 8:33 0 256M 0 part /boot <<<--- This is the /boot part that the Pi booted (From the USB drive)
    └─sdc2 8:34 0 3.4G 0 part <<<--- This is the /root part that needed to be mounted with above
    mmcblk0 179:0 0 3.7G 0 disk <<<--- This is the SD Card
    ├─mmcblk0p1 179:1 0 256M 0 part <<<---This is the original /boot partition that doesn't start due to the above beeing active
    └─mmcblk0p2 179:2 0 3.4G 0 part / <<<--- And this is the original /root partition that is mounted and beeing used

    RPi4 is now able to boot straight from USB and having both attached, the Pi will mount the one that it reads first.

    You are only getting problems by having 2 systems fighting for boot.


    Not only that, but if the Pi boot like it did when you run those commands, and you change whatever on the OS, when you reboot/restart and the OS mounts the other /root, ALL previous changes are not there. They where made on the other /rootfs.


    If you want to start solving your issues, start by either remove the SDcard and you'll only boot from the USB drive, or remove the USB drive so you have a complete boot from the SDcard.


    It's up to you.


    [EDIT]

    Only an addendum: 3.4Gb for the /root partition of the OS/OMV is also inviting to problems since is almost full (prolly)

  • Thanks for the help! That seems to have solved the issue. Ever since I disconnected the backup USB I haven't had any issues with Filesystems.


    I was following a video from Technodadlife.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!