Skip to content

Instantly share code, notes, and snippets.

@dbiesecke
Created September 27, 2021 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbiesecke/0f0b0b3ca0263aa22dc50a0c950b1cf8 to your computer and use it in GitHub Desktop.
Save dbiesecke/0f0b0b3ca0263aa22dc50a0c950b1cf8 to your computer and use it in GitHub Desktop.
Filesystem from a single file with fixed size

Filesystem from a single file with fixed size

  • Usefull if you have no lvm

  1. fallocate -l 1G /mnt/downloads.img

  2. mkfs.xfs -f /mnt/test.img

  3. /etc/fstab

UUID=81588ae5-0fd5-4010-a4c3-2d001fdb5372 /boot ext3 defaults 0 0
# /dev/md/2
UUID=e8a30b22-8adb-442e-9ef6-6833e9bb9537 / ext4 defaults 0 0
/mnt/downloads.img /mnt/downloads xfs loop 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment