From e65ba8b85b4598adb9aba5d21468a0f4e52fae1e Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sun, 1 Sep 2019 14:47:39 +0200 Subject: [PATCH] Add some tips about LV caching --- input/howto/lvm.creole | 21 +++++++++++++++++++++ input/index.mdwn | 1 + 2 files changed, 22 insertions(+) create mode 100644 input/howto/lvm.creole diff --git a/input/howto/lvm.creole b/input/howto/lvm.creole new file mode 100644 index 0000000..ef201e6 --- /dev/null +++ b/input/howto/lvm.creole @@ -0,0 +1,21 @@ +== Random LVM stuff == + +=== LV caching === + +We use LV caching at least on godard.d.o and smit.d.o. Here are the setup instructions: + +* Make sure that both the HDD and SSD are in the same volume group. + +* Make sure module loading is enabled + +* Run the following command to enable LV caching for the srv LV in the vg0 VG, assuming the SSD is /dev/sda3: + +{{{ + lvcreate --type cache --cachemode writethrough -L 120G -n srv_cachepool vg0/srv /dev/sda3 +}}} + +* It is currently not possible to resize a LV with a LVM cache. The workaround is to disable LV caching, resize the LV and reenable it. LV caching can be disabled with the following command: + +{{{ + lvconvert --uncache vg0/srv +}}} diff --git a/input/index.mdwn b/input/index.mdwn index c5f2624..7397cae 100644 --- a/input/index.mdwn +++ b/input/index.mdwn @@ -65,6 +65,7 @@ ticket. * [[howto/new-dpl]]: What to do when we have a new DPL * [[howto/new-dsa]]: What to do when we have a new DSA member * [[howto/static-mirroring]]: Static mirroring fu +* [[howto/lvm]]: LVM related tips ## ports -- 2.20.1