Please do not post a support request without first reading and following the advice in

Fix slow filesystem with logs of Roms/images/videos.

  • Hey all, I was having a lot of trouble after copying all my roms,images,videos etc over to the Pi. It would take forever to read/write to the filesystem because of the amount of files.

    After copying all my roms/images/videos, apt-get update would take about 20 minutes, and forget apt-get upgrade (166mb of updates took about an hour, and it only got to the 7th update).

    So i've come up with a solution that makes it as quick as a new install! :D

    (for my 128gb card)

    set reserved space to 0% on root ;

    sudo tune2fs -m 0 /dev/mmcblk0p2 )

    Shrink root to ~9gb. (Use other Linux system (Gparted LiveCD) to shrink it, Keep it EXT4)
    create a new partition in the rest of the space (~119gb)
    format new partition in BTRFS
    mount new BTRFS partition as /home/pi/btrfsDrive in FSTAB;

    /dev/mmcblk0p3 /home/pi/btrfsDrive btrfs defaults 0 1

    chown it to pi:pi

    sudo chown pi:pi -R /home/pi/btrfsDrive

    copy all roms/images/videos to /home/pi/btrfsDrive

    then BIND mount all the folders in /home/pi/btrfsDrive in FSTAB

    /home/pi/btrfsDrive/BIOS /home/pi/RetroPie/BIOS none bind 0 0
    /home/pi/btrfsDrive/downloaded_images /opt/retropie/configs/all/emulationstation/downloaded_images none bind 0 0
    /home/pi/btrfsDrive/roms /home/pi/RetroPie/roms none bind 0 0

    Then either restart or;

    sudo mount -a

    Now I don't get any Filesystem slowdown/lag with a nearly full 128gb card with the same amount of files as my previous EXT4 setup.

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.