Simscan: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Ramdisk ==") |
|||
Line 1: | Line 1: | ||
== Ramdisk == | == Ramdisk == | ||
Use htop or other program to determine available memory for ramdisk (size=) | |||
# clamgid=$(test -z "$(cat /etc/passwd | grep ^clamav)" && id -g clamscan 2>/dev/null || id -g clamav 2>/dev/null) && echo $clamgid | |||
# qmailctl stop | |||
# mount -t tmpfs -o size=1024m,nodev,noexec,noatime,uid=$clamgid,gid=0,mode=0750 myramdisk /var/qmail/simscan | |||
# ls -ld /var/qmail/simscan | |||
drwxr-x--- 2 clamscan root 6 Aug 17 13:28 /var/qmail/simscan | |||
# qmailctl start | |||
# df -h /var/qmail/simscan | |||
Filesystem Size Used Avail Use% Mounted on | |||
myramdisk 1.0G 0 1.0G 0% /var/qmail/simscan | |||
# cp /etc/fstab /etc/fstab.bak | |||
# echo "myramdisk /var/qmail/simscan tmpfs size=1024m,nodev,noexec,noatime,uid=$clamgid,gid=0,mode=0750 0 0" >> /etc/fstab | |||
Make sure /etc/fstab file is okay before a reboot | |||
# cat /etc/fstab |
Revision as of 13:30, 26 March 2024
Ramdisk
Use htop or other program to determine available memory for ramdisk (size=)
- clamgid=$(test -z "$(cat /etc/passwd | grep ^clamav)" && id -g clamscan 2>/dev/null || id -g clamav 2>/dev/null) && echo $clamgid
- qmailctl stop
- mount -t tmpfs -o size=1024m,nodev,noexec,noatime,uid=$clamgid,gid=0,mode=0750 myramdisk /var/qmail/simscan
- ls -ld /var/qmail/simscan
drwxr-x--- 2 clamscan root 6 Aug 17 13:28 /var/qmail/simscan
- qmailctl start
- df -h /var/qmail/simscan
Filesystem Size Used Avail Use% Mounted on myramdisk 1.0G 0 1.0G 0% /var/qmail/simscan
- cp /etc/fstab /etc/fstab.bak
- echo "myramdisk /var/qmail/simscan tmpfs size=1024m,nodev,noexec,noatime,uid=$clamgid,gid=0,mode=0750 0 0" >> /etc/fstab
Make sure /etc/fstab file is okay before a reboot
- cat /etc/fstab