Reply to topic

Filelight: Incorrect results using hard links

davidone
Registered Member
Posts
1
Karma
0
Hi. Filelight is great! Accessible by default at the bottom of Dolphin by clicking the bar to the left of the drive freespace.

I'm showing incorrect results from Filelight. By default, it scans the filesize for every file on the filesystem. It does ignore symlinks, but not hardlinks.

There's 3 issues that I see.
  1. Slows down scans
  2. May cause user to incorrectly delete/move data based on filelight results
  3. May cause user to unnecessarily expand filesystems/storage

I doubt this is a big issue with a default system (I'm unsure how many hard links are in a default install.) But with a backup strategy such as below, this may eventually result in a case where the total size reported by filelight exceeds the capacity of the filesystem. I executed the backup script below every hour, and from 15 backups + one symlink Filelight says I have 2.4TB in /bak, 188.7GB in /. Yet `zfs list` states /bak is 227GB

Code: Select all
#!/bin/bash
set -o nounset
set -o pipefail
readonly BIN_DIR="${HOME}/bin"
readonly SOURCE_DIR="/"
readonly BACKUP_DIR="/bak"
readonly DATETIME="$(date '+%Y-%m-%d_%H:%M:%S')"
readonly BACKUP_PATH="${BACKUP_DIR}/${DATETIME}"
readonly LATEST_LINK="${BACKUP_DIR}/latest"
readonly EXCLUDE_LIST="${BIN_DIR}/exclude.list"
readonly LOG_FILE="${BIN_DIR}/bak.log"
while [ `pgrep -n rsync` ]
do
  sleep 1
done

rsync -aAXv --delete "${SOURCE_DIR}/" --link-dest "${LATEST_LINK}" --exclude-from="${EXCLUDE_LIST}" "${BACKUP_PATH}" > "${LOG_FILE}" 2>&1
rm -rf "${LATEST_LINK}"
ln -s "${BACKUP_PATH}" "${LATEST_LINK}"
echo `date` >> "${LOG_FILE}"

Reply to topic

Bookmarks



Who is online

Registered users: apfelpfluecker, Baidu [Spider], Bing [Bot], blue_bullet, buddyt, dbergstein, drzetein, dvz, funix, Google [Bot], JesusM, koffeinfriedhof, mediamogul, notspongbob, ocroquette, ssanderson, Yahoo [Bot]