#4701 0.26: Featue request: don't loop updatedb on drives with input/output errors, skip those instead
Closed: Invalid 4 years ago by probackup. Opened 4 years ago by probackup.

USB thumb drives are prone to fail. Some models tend to still mount, sometimes read-only (ro) other times read-write (rw) with input/output errors when executing a simple ls command.

Exemples in journal for a faulty drive:
kernel: FAT-fs (sdc1): error, fat_get_cluster: invalid cluster
kernel: FAT-fs (sdc1): error, corrupted directory (invalid entries)
kernel: FAT-fs (sdc1): error, fat_get_cluster: invalid start
kernel: FAT-fs (sdc1): error, invalid access to FAT (entry 0x00000001)
FAT-fs (sdc1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
VFS: Lookup of '\xe2\x95\x9a\xcf\x83\xc3\xbccf\xc3\xaf.6z2' in vfat sdc1 would have caused loop

It would be great if updatedb would have got a mechanism to detect these kind of errors during its execution and then skip the faulty disks/partitions instead of reaching an endless loop and filling up all available disk space:

# ls -lh var/lib/mlocate/mlocate.*
-rw-r----- 1 root locate 1.1M Oct 21 00:00 var/lib/mlocate/mlocate.db
-rw------- 1 root root 9.6G Dec 30 20:11 var/lib/mlocate/mlocate.db.PRvfsw

and never ending its process start :
# ps -ef | grep updatedb
root 3249 1 99 Oct22 ? 213573-14:47:11 /usr/bin/updatedb

The current available updatedb.conf options as well as updatedb (mlocate) version 0.26 leave room for improvement to let Linux (in this case Arch) systems stay up and running.


Metadata Update from @probackup:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata