diff --git a/_posts/sysadm/2023-08-28-setting-up-fresh-disk-for-lvm.tl b/_posts/sysadm/2023-08-28-setting-up-fresh-disk-for-lvm.tl index 5c1b461..9a2741c 100644 --- a/_posts/sysadm/2023-08-28-setting-up-fresh-disk-for-lvm.tl +++ b/_posts/sysadm/2023-08-28-setting-up-fresh-disk-for-lvm.tl @@ -93,7 +93,7 @@ Create LV, optionally add redundancy/integrity layer ("details":https://blog.michalczyk.pro/2023/06/24/directly-attache-storage-with-redundancy-and-integrity-using-lvm-lvmraid.html). {% highlight bash %} -# lvcreate -L 2T -n backup vgdev +# lvcreate -L 2T -n backup --type raid1 --mirrors 1 vgdev # lvconvert --raidintegrity y --raidintegrityblocksize 4096 --raidintegritymode bitmap /dev/vgdev/backup {% endhighlight %} @@ -126,4 +126,13 @@ sure you're using _anacron_ on desktop): h2. Monitoring -TODO: monitoring smartd and RAID status with cron task. +h3. LV RAID health status + +Make sure that cron messages are received, e.g. sent to proper e-mail address. + +{% highlight bash caption=/etc/cron.hourly/lv-health-status %} +#!/bin/sh +lvs -o full_name,lv_health_status --separator ':' | tail -n+2 | egrep -v ':[[:space:]]*$' +{% endhighlight %} + +TODO: monitoring smartd with cron task.