Differences between revisions 18 and 28 (spanning 10 versions)
Revision 18 as of 2018-01-03 10:52:16
Size: 2026
Comment:
Revision 28 as of 2021-02-04 20:26:24
Size: 2193
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
This disk layout has several layers. It uses btrfs, on top of LVM, on top of luks encryption, on top of raid, on top of the disks partitions. This disk layout has several layers. It uses btrfs, on top of LVM, on top of luks encryption, on top of raid, on top of the disk partitions.
Line 9: Line 9:
Line 18: Line 17:
sda2 15360M sda2 15616M
Line 22: Line 21:
sdb2 15360M sdb2 15616M
Line 48: Line 47:
vg_system root 2G (/dev/vg_system/root) vg_system root 2G   (/dev/vg_system/root)
Line 53: Line 52:
I use btrfs myself, and has not had any problems with it. btrfs is chosen for its flexibility, but any modern filesystem should be sufficient.
Line 55: Line 56:
/dev/md0 /boot (btrfs) /dev/md0       /boot (btrfs)
Line 64: Line 65:
sdc 2T
sdc1 1856G
sdc 6T
sdc1 5588G
Line 67: Line 68:
sdd 2T
sdd1 1856G
sdd 6T
sdd1 5588G
Line 93: Line 94:
vg_storage swap 4G (swap) vg_storage swap 4G (/dev/vg_storage/swap)

KVM Host Disk Layout

This disk layout has several layers. It uses btrfs, on top of LVM, on top of luks encryption, on top of raid, on top of the disk partitions.

Hardware

Two 16G SSD disks are used for the KVM Host. Two 2T SATA disks are used for the KVM Guests filesystem images.

Mark your disks! Spend time finding your disks S/N. Put a physical sticker on the disk. In the future this will help you identify a failing disk.

KVM Host Disks

Physical Disks and Partitions

sda     16G
sda1   256M
sda2 15616M

sdb     16G
sdb1   256M
sdb2 15616M

Raid

md0 raid1 (sda1, sdb1)
md1 raid1 (sda2, sdb2)

Luks

md1 luks (md1_crypt)

LVM

md1_crypt lvm (vg_system)

LVM Volumes

Initially the swap partition was 512M, but it ran full and was increased to 1G. That ran full as well, so a swap partition on the second volume was added too. It seems the KVM host happily swaps and will use many gigabytes of swap if the swap partition is there. The consequence is that the guests are slower to respond. So I recommend only swapping if you are really running out of memory.

vg_system root 2G   (/dev/vg_system/root)
vg_system swap 512M (/dev/vg_system/swap)

Filesystems and Mountpoints

I use btrfs myself, and has not had any problems with it. btrfs is chosen for its flexibility, but any modern filesystem should be sufficient.

/dev/vg_system/root /     (btrfs)
/dev/md0            /boot (btrfs)
/dev/vg_system/swap       (swap)

KVM Host Disks for Guest Filesystem Images

Physical Disks and Partitions

sdc     6T
sdc1 5588G

sdd     6T
sdd1 5588G

Raid

md2 raid1 (sdc1, sdd1)

Luks

md2 luks (md2_crypt)

LVM

md2_crypt lvm (vg_storage)

LVM Volumes

vg_storage media 4G (/dev/vg_storage/media)
vg_storage swap  4G (/dev/vg_storage/swap)

Filesystems and Mountpoints

/dev/vg_storage/swap             (swap)
/dev/vg_storage/media /mnt/media (btrfs)

None: KVM Host Disk Layout (last edited 2024-01-29 20:16:56 by Kristian Kallenberg)