PDA

View Full Version : File system check failing to run on HDD in my Zgemma H7S.



BrianG61UK
23-12-22, 18:27
I think the HDD may be slightly corrupt. This happened before, a long time ago, and I never found a way to fix the error. I had to reformat.

It seems daft that a hard drive error stops you running e2fsck (or whatever is used) to fix the error.

This is the error:
64571

Joe_90
23-12-22, 18:39
If the resource is busy, then you may have timeshift running or you are logging to the HDD maybe? If you can telnet to the box, maybe stop enigma with "init 4" and then "umount /dev/sda1", then "fsck.ext4 -f /dev/sda1"

CRMS
23-12-22, 18:55
Possibly HDD too full for any file shuffling??

Joe_90
23-12-22, 19:16
I don't know why there would be file shuffling going on. a "df -h" command would show how much free space is available.

BrianG61UK
23-12-22, 20:30
login as: root
root@zgemmah7.lan's password:
root@Zgemmah7:~#
root@Zgemmah7:~#
root@Zgemmah7:~#
root@Zgemmah7:~#
root@Zgemmah7:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/mmcblk0p8 2.2G 435.9M 1.7G 20% /
devtmpfs 145.7M 4.0K 145.7M 0% /dev
tmpfs 64.0K 0 64.0K 0% /media
/dev/mmcblk0p1 3.0M 18.0K 3.0M 1% /boot
tmpfs 501.8M 168.0K 501.7M 0% /var/volatile
/dev/sda1 930.4G 788.7G 141.7G 85% /media/hdd
root@Zgemmah7:~#
root@Zgemmah7:~# umount /dev/sda1
umount: can't unmount /media/hdd: Device or resource busy
root@Zgemmah7:~# umount -f /dev/sda1
umount: can't unmount /media/hdd: Device or resource busy
root@Zgemmah7:~# umount -fl /dev/sda1
root@Zgemmah7:~#
root@Zgemmah7:~# ls /media/hdd
root@Zgemmah7:~#
root@Zgemmah7:~# fsck.ext4 /dev/sda1
e2fsck 1.46.5 (30-Dec-2021)
/dev/sda1 is in use.
e2fsck: Cannot continue, aborting.


root@Zgemmah7:~# fsck.ext4 -f /dev/sda1
e2fsck 1.46.5 (30-Dec-2021)
/dev/sda1 is in use.
e2fsck: Cannot continue, aborting.


root@Zgemmah7:~# fsck.ext4 -fv /dev/sda1
e2fsck 1.46.5 (30-Dec-2021)
/dev/sda1 is in use.
e2fsck: Cannot continue, aborting.


root@Zgemmah7:~# fsck.ext4 -v /dev/sda1
/dev/sda1 is in use.
e2fsck: Cannot continue, aborting.



root@Zgemmah7:/# fsck.ext4 -vn /dev/sda1
e2fsck 1.46.5 (30-Dec-2021)
Warning! /dev/sda1 is in use.
Warning: skipping journal recovery because doing a read-only filesystem check.
/dev/sda1 has been mounted 236 times without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (37145051, counted=37141905).
Fix? no


3596 inodes used (1.01%, out of 357744)
651 non-contiguous files (18.1%)
3 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 2598/989
207045157 blocks used (84.79%, out of 244190208)
0 bad blocks
126 large files

3578 regular files
9 directories
0 character device files
0 block device files
0 fifos
0 links
0 symbolic links (0 fast symbolic links)
0 sockets
------------
3587 files
root@Zgemmah7:/#
root@Zgemmah7:/#

he only way I can seem to get fsck running is with -n and as I understand it that means the result is largely meaning less.

BrianG61UK
23-12-22, 21:05
Oops. I had already done init 4 before all that. But accidentally deleted it from capture along with various typos.

Later: Should also add that so far everything seems to still be working.

Joe_90
23-12-22, 22:37
Brian,
Are you sure that you have nothing accessing /dev/sda1? Logging or timeshift? I had an issue with my HDD last week and I just stopped timeshift and was able to umount the disk and run fsck.ext4. It found disk errors and fixed them, but obviously needs to be able to write to the partition.

BrianG61UK
24-12-22, 00:33
I am an idiot.
I had a swapfile set up on the HDD.
I remember doing it, but I don't need it and I thought I had removed it. I have now.

Thanks Joe_90 for your efforts to help me.

birdman
24-12-22, 00:38
64571Are you using a swap file? If so you need to disable it temporarily.
Same might apply to running Samba or FTP servers.

Joe_90
24-12-22, 01:09
Think it's the swapfile @birdman - see post #8:)