ioprio_set: Operation not permitted openVZ ubuntu template

Petrus4

Member
Feb 18, 2009
249
0
16
I keep getting the following error emails from Cron:

Code:
/etc/cron.daily/mlocate:
ioprio_set: Operation not permitted
run-parts: /etc/cron.daily/mlocate exited with return code 1

This occurs on both of my Ubuntu templates (downloaded from proxmox)

I am running Proxmox-ve 1.1

Does this error have something to do with running as an openVZ container?

Is there any fix for it?

thanks.
 
You can try to fix the /etc/cron.daily/mlocate script manually (for example debian uses something like):

Code:
...
# See ionice(1)
if [ -x /usr/bin/ionice ] &&
    /usr/bin/ionice -c3 true 2>/dev/null; then
    IONICE="/usr/bin/ionice -c3"
fi
...
 
You can try to fix the /etc/cron.daily/mlocate script manually (for example debian uses something like):

Code:
...
# See ionice(1)
if [ -x /usr/bin/ionice ] &&
    /usr/bin/ionice -c3 true 2>/dev/null; then
    IONICE="/usr/bin/ionice -c3"
fi
...

Thanks adding this part of the code and removing the old code did the trick!:p
 
Did you get this fixed?

Yes, the /etc/cron.daily/mlocate script should look like this:


Code:
#! /bin/sh

set -e

[ -x /usr/bin/updatedb.mlocate ] || exit 0

#---removed code causing ioprio_set error----
# See ionice(1)
#if [ -x /usr/bin/ionice ]; then
#    IONICE="/usr/bin/ionice -c3"
#fi
#---end code removal---

#---new code---

# See ionice(1)
if [ -x /usr/bin/ionice ] &&
    /usr/bin/ionice -c3 true 2>/dev/null; then
    IONICE="/usr/bin/ionice -c3"
fi
#--end new code---

$IONICE /usr/bin/updatedb.mlocate