I have the following devices with Linux Mint 18.1 on laptops and GNU/Linux Debian 9 on the server.
(All are 64-bit and with Cinnamon desktop.)
All drive devices are formatted with ext4 filesystem; RAID 1 is done utilizing mdadm.
Laptop with 1 SSHD (not to be confused with HDD).
Laptop with 3 drives: 2 x consumer HDDs in RAID 1 and 1 x SSD.
Server with 5 drives: 4 x enterprise HDDs in two times RAID 1 and 1 x SSD.
I have the system on those SSDs and I would never defragment an SSD.
The question is about HHDs and an SSHD.
I found an old PDF outlining a few more features to e4defrag.
Why the filesystem must be mounted, as per this error message when trying to defragment an unmounted filesystem? I want to understand why that is:
Filesystem is not mountedI would like to have implemented free space defragmentation. AFAIK it is now under review. Is it possible for me to e.g. compile
e4defragfrom source with these options available or anyhow?e4defrag -f /deviceOrDirectoryI would also like to use relevant data feature:
e4defrag -r /deviceOrDirectory
I have many relevant reasons to believe the fragmentation on these machines is slowing down the read speed, example:
Taken from the server with RAID 1 HDDs:
[2556/30987]/raid1a/bitcoind/blocks/rev00820.dat: 100% extents: 16 -> 1 [ OK ]Taken from the laptop with RAID 1 HDDs:
[29405/50810]/raid1/movies/SGA-HEVC/S04E01 - Adrift.mp4: 100% extents: 31 -> 6 [ OK ]
As you can see, the defragmentation was not even able to put the 31 blocks file into 1 piece. Of course you might argue it is a movie file, so it does not matter. True, but only in this case.
The command I use to start the defragmentation:
On the server:
sudo e4defrag -v /dev/md1On the laptop:
sudo e4defrag -v /raid1/
It does not seem to matter, whether I invoke the command using device name or a directory.
Can you point me to the right direction?