Deduplication
jdupes
...
| Code Block |
|---|
#apt install jdupes
jdupes --one-file-system --dedupe --recurse --size /storage/ |
example of processing output
| Code Block |
|---|
[SRC] /storage/docker/nextcloud/html/data/appdata_ocosw7nbi6xb/preview/d/8/4/3/4/0/7/10048/64-64-crop.jpg
====> /storage/docker/nextcloud/html/data/appdata_ocosw7nbi6xb/preview/d/d/5/4/6/e/0/273450/64-64-crop.jpg
[SRC] /storage/docker/nextcloud/html/data/appdata_ocosw7nbi6xb/preview/d/8/4/3/4/0/7/10048/2731-4096-max.jpg
====> /storage/docker/nextcloud/html/data/appdata_ocosw7nbi6xb/preview/d/d/5/4/6/e/0/273450/2731-4096-max.jpg
[SRC] /storage/docker/nextcloud/html/data/appdata_ocosw7nbi6xb/avatar/best/avatar.512.png
====> /storage/docker/nextcloud/html/data/appdata_ocosw7nbi6xb/avatar/best/avatar.png
[SRC] /storage/ |
...
docker/nextcloud/html/data/appdata_ocosw7nbi6xb/avatar/oliutyi/avatar.512.png
====> /storage/docker/nextcloud/html/data/appdata_ocosw7nbi6xb/avatar/oliutyi/avatar.png
[SRC] /storage/docker/nextcloud/html/data/appdata_ocosw7nbi6xb/theming/global/images/favicon
====> /storage/docker/nextcloud/html/data/appdata_ocosw7nbi6xb/theming/global/images/logo
|
duperemove
| Code Block |
|---|
# apt install duperemove
duperemove -r -d -h -v --hashfile=/storage/.dupe_hash /storage |
Check deduplication status
| Code Block |
|---|
btrfs filesystem du --summarize --human-readable /storage/ |
...
| Code Block |
|---|
root@server5:~# btrfs filesystem du --summarize --human-readable /storage/
Total Exclusive Set shared Filename
9.56TiB 6.70TiB 1.37TiB /storage/
root@server5:~# df -h /storage
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 15T 8.1T 6.5T 56% /storage
|
Compression
mount FS with compression enabled
| Code Block |
|---|
root@server5:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/mmcblk0p3 during curtin installation
# eMMC Space
/dev/disk/by-uuid/04b08549-62d1-41eb-818d-bf301872b67e / ext4 defaults 0 1
/dev/disk/by-uuid/dda5b65e-2cb5-4648-9867-1eaa0e717e2e /boot ext4 defaults 0 1
/dev/disk/by-uuid/F557-B88C /boot/efi vfat defaults 0 1
/swap.img none swap sw 0 0
# NVMe btrfs RAID0
UUID=47679023-51c8-4242-9117-f4b6e76dd3b8 /storage btrfs defaults,compress,autodefrag 0 1
|
check compression status
| Code Block |
|---|
compsize /storage |
...
| Code Block |
|---|
root@server5:~# compsize /storage/
Processed 1929919 files, 3560064 regular extents (3764806 refs), 160357 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 99% 8.0T 8.0T 9.5T
none 100% 8.0T 8.0T 9.5T
zlib 31% 7.9G 25G 25G
prealloc 100% 219M 219M 329M
|
other btrfs commands
| Code Block |
|---|
root@server5:~# btrfs fi show /storage/
Label: 'storage' uuid: 47679023-51c8-4242-9117-f4b6e76dd3b8
Total devices 4 FS bytes used 8.07TiB
devid 1 size 3.64TiB used 2.32TiB path /dev/nvme0n1p1
devid 2 size 3.64TiB used 2.32TiB path /dev/nvme1n1p1
devid 3 size 3.64TiB used 2.31TiB path /dev/nvme2n1p1
devid 4 size 3.64TiB used 2.31TiB path /dev/nvme3n1p1
|
...