Forum

Full Version: Mounting USB EXT4 Partition Fails
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Software
XBian version: XBian 1.0 (knockout) (kernel: Linux 4.14.58+)
XBMC/Kodi version: Kodi 17.6 Git:2017-11-18-433b93a
Overclock settings: default

Hardware
Device type and model (e.g. Raspberry Pi Model A/B 256/512 MB, CuBox-i i4Pro, ...): Raspberry Pi 3
Power supply rating: Stontronics DSA-13PFC-05 FCA Output 2.5A, Raspberry Pi branded
SD card size and make/type: LG Micro SD Class 6 8GB
Network (Ethernet or wireless): both
Connected devices (TV, USB, network storage, ...): Seagate BUP 4TB drive connected through powered USB hub.

Log files
Link to logfile(s): -

Problem description:
USB drive permanently connected to Pi over powered USB hub. Drive has 2 Partitions:
- /dev/sda1, labelled 'Daten'
- /dev/sda2, labelled 'AntiBackup'
Don't be confused by the labels, sda2 is not a backup of sda1.

All of a sudden, only the sda2 partition is automatically mounted.
Trying to manually mount sda1 gives message 'mount: mount /dev/sda1 on /home/xbian/mnt failed: Structure needs cleaning'
Unmounting sda2 and mounting it to /home/xbian/mnt is working, btw.
After some googling, I ran e2fsck on both of the partitions.
It also fixed something in the first run (I don't know what it did exactly, as I did not save the log, sorry :/ ).
But error message stays the same.

I connected the USB drive to my laptop and booted PartedMagic, to see if it can mount the partitions, and it does, without any messages or else.
Ran the 'Check Partition' feature of PartedMagic on both partitions, which is also a e2fsck, but still, sda1 cannot be mounted in xbian.

Any idea, what else I can check or do?

It was working normal until a few days ago, no big changes since then, as far as I have in mind.
I am using the Pi for playing music from sda1, for doing a backup of sda1 over SSH with Borg, and for accessing sda1 via SMB.

Also, if you need any log files, please let me know...
Thanks in advance.
1) anything in the kernel log? (dmesg)
2) Both partitions are ext4?
3) Can you mount /dev/sda1 manually on your Pi3? (sudo mount -t ext4 /dev/sda1 /mnt)
Oh, you already did it, hmmm Confused
(16th Aug, 2018 04:59 AM)Nachteule Wrote: [ -> ]1) anything in the kernel log? (dmesg)
2) Both partitions are ext4?
3) Can you mount /dev/sda1 manually on your Pi3? (sudo mount -t ext4 /dev/sda1 /mnt)
Oh, you already did it, hmmm Confused

Thx Nachteule,
yes, both partitions are ext4 and I did try to mount it manually, which gave me the 'structure needs cleaning' message.
But we might be onto something with your dmesg hint, because it says:
Quote:[ 358.756005] EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 0 overlaps block group descriptors
[ 358.756013] EXT4-fs (sda1): group descriptors corrupted!
[ 395.164635] EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 0 overlaps block group descriptors
[ 395.164642] EXT4-fs (sda1): group descriptors corrupted!
so there still seems to be something wrong with the FS of SDA1. But e2fsck seems not to see it. Do you know an option that can see or fix it? I have a backup of the most important data on the partition, but I would really like to try to fix this somehow...
Also, I don't know how it even got corrupted...
(16th Aug, 2018 06:35 PM)slimjim69 Wrote: [ -> ]yes, both partitions are ext4 and I did try to mount it manually, which gave me the 'structure needs cleaning' message.
But we might be onto something with your dmesg hint, because it says:
Quote:[ 358.756005] EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 0 overlaps block group descriptors
[ 358.756013] EXT4-fs (sda1): group descriptors corrupted!
[ 395.164635] EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 0 overlaps block group descriptors
[ 395.164642] EXT4-fs (sda1): group descriptors corrupted!
so there still seems to be something wrong with the FS of SDA1. But e2fsck seems not to see it. Do you know an option that can see or fix it? I have a backup of the most important data on the partition, but I would really like to try to fix this somehow...
Also, I don't know how it even got corrupted...

Hmmm, that's a good question. Can you narrow down when mounting sda1 fails. Perhaps after a kernel upgrade? Maybe the kernel you're running now (4.14.58+) can not mount this partition, but prior version does

Can you run e2fsck with parameter -f again, to force check again and see what happens?
There is one ext4 patch commited Jul 9 which may be responsible for your issue

So the question is, what was your kernel version before 4.14.58+? Kernel 4.14.52+ (built Jul 2) is still available for download, but that makes no difference: seems your fs on sda1 is broken and needs to be fixed (but unfortunately don't know how to do it, you could play with -f and -b option when running e2fsck)
WEIRD!
Today I booted the Pi to start playing with e2fsck options and guess what: SDA1 is mounted and working :O
I didn't do nothing...

What I see is, that in Kodi it is showing a newer Kernel now: 4.14.62+
Is it possible that this was really some strange Kernel bug and Xbian updated itself overnight to a newer Kernel version?

Anyway I am making an SD card Image and a full SDA1 backup right away...

Setting this thread to solved... Thx for your assistance Nachteule!
(17th Aug, 2018 08:28 PM)slimjim69 Wrote: [ -> ]WEIRD!
Today I booted the Pi to start playing with e2fsck options and guess what: SDA1 is mounted and working :O
I didn't do nothing...

The most given answer Big GrinTongue ...

but good to hear that sda1 is working again

Quote:What I see is, that in Kodi it is showing a newer Kernel now: 4.14.62+
Is it possible that this was really some strange Kernel bug and Xbian updated itself overnight to a newer Kernel version?

Could be, if you have XBian configured for auto-update, system is updated usually in early morning

Quote:Anyway I am making an SD card Image and a full SDA1 backup right away...

Good decision Smile

Quote:Setting this thread to solved... Thx for your assistance Nachteule!

You're welcome
Reference URL's