Sunday, April 13, 2014

bonnie++ Can't open file


While running bonnie++ , you may face this error :


# ./bonnie++ -d /mnt -s 8056M -n 0 -m TEST_IO -f -b -u username
Using uid:1000, gid:1000.
Can't open file ./Bonnie.3497.000

You need to add -u root:root , to the command line like :

./bonnie++ -d /mnt -s 8056M -n 0 -m TEST_IO -f -b -u root:root



Caveat:
Please note running as root is not recommended. So, ensure you try this only on a test system.

As per man page:

       -u     user-id to use.  When running as root specify the UID to use for
              the  tests.   It is not recommended to use root (since the occa‐
              sion when a Bonnie++ bug wiped out someone's system), so if  you
              really  want  to run as root then use -u root.  Also if you want
              to specify the group to run as then use the  user:group  format.
              If  you  specify  a  user  by name but no group then the primary
              group of that user will be chosen.  If you  specify  a  user  by
              number and no group then the group will be nogroup.



7 comments:

  1. THANK YOU!!!!!!!!!!!!!!

    ReplyDelete
  2. You probably shouldn't run bonnie++ as root. The man pages don't recommend it as a bug in the pas has wiped out someones system. Better to change the permissions of the directory

    ReplyDelete