Differences between revisions 10 and 36 (spanning 26 versions)
Revision 10 as of 2017-10-10 22:41:56
Size: 1348
Editor: shran
Comment:
Revision 36 as of 2024-01-28 16:03:08
Size: 2166
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 6: Line 6:
Two 16G SSD disks are used for the KVM Host. Two 2T SATA disks are used for the KVM Guests filesystem images. Two 16G SSD disks are used for the KVM Host. Four 6T SATA disks are used for the KVM Guests filesystem images.
Line 8: Line 8:
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.
Line 15: Line 16:
sda1 256M
sda2 15360M
sda1 512M
sda2   512M
sda3
15360M
Line 19: Line 21:
sdb1 256M
sdb2 15360M
sdb1 512M
sdb2   512M
sdb3
15360M
Line 27: Line 30:
md1 raid1 (sda2, sdb2) md1 raid1 (sda3, sdb3)
Line 39: Line 42:
md1_crypt lvm (vg1) md1_crypt lvm (vg_system)
Line 42: Line 45:
==== LVM volumes ==== ==== LVM Volumes ====
Initially the swap partition was 256MM, 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.
Line 45: Line 49:
vg1 root 2G (/dev/vg1/root)
vg1 swap 512M (/dev/vg1/swap)
vg_system root 4G (/dev/vg_system/root)
vg_system swap 256M (/dev/vg_system/swap)
Line 50: Line 54:
I use btrfs myself, and have chosen this for its stability, but any modern filesystem should be sufficient.
Line 51: Line 57:
/dev/vg1/root / (btrfs)
/dev/md0 /boot (btrfs)
/dev/vg1/swap (swap)
/dev/vg_system/root / (btrfs)
/dev/md0       /boot (btrfs)
/dev/vg_system/swap (swap)
Line 61: Line 67:
sdc 2T
sdc1 1856G
sdc 6T
sdc1 5588G
Line 64: Line 70:
sdd 2T
sdd1 1856G
sdd 6T
sdd1 5588G

sde 6T
sde1 5588G

sdf 6T
sdf1 5588G
Line 71: Line 83:
md2 raid1 (sdc1, sdd1) md2 raid10 (sdc1, sdd1, sde1, sdf1)
Line 83: Line 95:
md2_crypt lvm (vg2) md2_crypt lvm (vg_storage)
Line 86: Line 98:
==== LVM volumes ==== ==== LVM Volumes ====
Line 89: Line 101:
vg2 media 4G (/dev/vg2/media) vg_storage media 4G (/dev/vg_storage/media)
Line 94: Line 106:
/dev/vg2/media /mnt/media (btrfs) /dev/vg_storage/media /mnt/media (btrfs)

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. Four 6T 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   512M
sda2   512M
sda3 15360M

sdb     16G
sdb1   512M
sdb2   512M
sdb3 15360M

Raid

md0 raid1 (sda1, sdb1)
md1 raid1 (sda3, sdb3)

Luks

md1 luks (md1_crypt)

LVM

md1_crypt lvm (vg_system)

LVM Volumes

Initially the swap partition was 256MM, 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 4G   (/dev/vg_system/root)
vg_system swap 256M (/dev/vg_system/swap)

Filesystems and Mountpoints

I use btrfs myself, and have chosen this for its stability, 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

sde     6T
sde1 5588G

sdf     6T
sdf1 5588G

Raid

md2 raid10 (sdc1, sdd1, sde1, sdf1)

Luks

md2 luks (md2_crypt)

LVM

md2_crypt lvm (vg_storage)

LVM Volumes

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

Filesystems and Mountpoints

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

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