root@Proxmox:~# cat /etc/zfs/zed.d/zed.rc |grep -v "^#"
ZED_EMAIL_ADDR="root"
ZED_EMAIL_PROG="mail"
ZED_EMAIL_OPTS="-s '@SUBJECT@' @ADDRESS@"
ZED_NOTIFY_INTERVAL_SECS=3600
ZED_NOTIFY_VERBOSE=1
ZED_USE_ENCLOSURE_LEDS=1
ZED_SYSLOG_SUBCLASS_INCLUDE="checksum|scrub_*|vdev.*"
ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event"
Hello and thank you for replying, but I had modified that file, in fact it has always worked. However, I noticed as written before that since I upgraded to version 7, notifications have not arrived. Can I manually throw scrubs? If so, how do I do it? Thank youIf I'm not mistaken, you need to edit "/etc/zfs/zed.d/zed.rc" to get email notifications about zfs events.
Mine looks like this:
Bash:root@Proxmox:~# cat /etc/zfs/zed.d/zed.rc |grep -v "^#" ZED_EMAIL_ADDR="root" ZED_EMAIL_PROG="mail" ZED_EMAIL_OPTS="-s '@SUBJECT@' @ADDRESS@" ZED_NOTIFY_INTERVAL_SECS=3600 ZED_NOTIFY_VERBOSE=1 ZED_USE_ENCLOSURE_LEDS=1 ZED_SYSLOG_SUBCLASS_INCLUDE="checksum|scrub_*|vdev.*" ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event"
Make sure, that you set the email in "/etc/pve/datacenter.cfg".Hello and thank you for replying, but I had modified that file, in fact it has always worked. However, I noticed as written before that since I upgraded to version 7, notifications have not arrived. Can I manually throw scrubs? If so, how do I do it? Thank you
echo -e "Subject: Test\n\nThis is a test" | /usr/bin/pvemailforward
As far as I know PVE won't do scrubs on its own. You need to manually start scrub (Hello and thank you for replying, but I had modified that file, in fact it has always worked. However, I noticed as written before that since I upgraded to version 7, notifications have not arrived. Can I manually throw scrubs? If so, how do I do it? Thank you
zpool scrub YourPool
) or create a entry in your /etc/crontab so that root will execute that command for example once per month.This is wrong. ZFS utils has cron for scrubs and trims.As far as I know PVE won't do scrubs on its own. You need to manually start scrub (zpool scrub YourPool
) or create a entry in your /etc/crontab so that root will execute that command for example once per month.
It veto, I forgot !!! But if I launch it manually will the same email arrive?Make sure, that you set the email in "/etc/pve/datacenter.cfg".
You should first test, if the host can send any email. Try following:
Bash:echo -e "Subject: Test\n\nThis is a test" | /usr/bin/pvemailforward
For your second question, yes you can of course manually scrub your zpools.
See "zpool-scrub(8)" for details.
Basically you can start scrub with "zpool scrub <zpool>", pause it with "-p" or stop it with "-s".
Is it done using a systemd scipt? Atleat here with PVE ontop of Debian there is no cron entry for ZFS utils.This is wrong. ZFS utils has cron for scrubs and trims.
Although I didn’t get the first part, but yes, you’ll get a email notifications if your scrub jobs finishes, provided the zed.rc and you emailing is configured correctly.B
It veto, I forgot !!! But if I launch it manually will the same email arrive?
I have this:Is it done using a systemd scipt? Atleat here with PVE ontop of Debian there is no cron entry for ZFS utils.
root@Proxmox:~# cat /etc/cron.d/zfsutils-linux
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# TRIM the first Sunday of every month.
24 0 1-7 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/trim ]; then /usr/lib/zfs-linux/trim; fi
# Scrub the second Sunday of every month.
24 0 8-14 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/scrub ]; then /usr/lib/zfs-linux/scrub; fi
root@Proxmox:~#
Your right, just didn't notived that cron file.I have this:
Code:root@Proxmox:~# cat /etc/cron.d/zfsutils-linux PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # TRIM the first Sunday of every month. 24 0 1-7 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/trim ]; then /usr/lib/zfs-linux/trim; fi # Scrub the second Sunday of every month. 24 0 8-14 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/scrub ]; then /usr/lib/zfs-linux/scrub; fi root@Proxmox:~#