1

I have installed OpenNebula following the quickstart guide OpenNebula on CentOS 6 and KVM.

I am using all local hard disks. I have one huge software RAID10 array composed of 4 partitions, no LVM whatsoever. The raid device is /dev/md2 and is mounted on /var/lib/one/datastores.

Here is the disk space as reported by CentOS:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/md2        7.1T  177M  6.8T   1% /var/lib/one/datastores

and here is the disk usage as reported by CentOS:

$ du -shc /var/lib/one/datastores
20K     /var/lib/one/datastores
20K     total

so, the folder seems pretty much empty (although I still don't know why df -h says that 177M are used, but anyway).

and here is the contents of the folder:

$ ls -la /var/lib/one/datastores
total 24
drwxr-xr-x 6 oneadmin oneadmin 4096 Jul 31 18:19 .
drwx------ 8 oneadmin oneadmin 4096 Jul 31 18:33 ..
drwxrwxr-x 2 oneadmin oneadmin 4096 Jul 31 18:20 0
drwxr-xr-x 2 oneadmin oneadmin 4096 Jul 31 18:20 1
drwxr-xr-x 2 oneadmin oneadmin 4096 Jul 31 18:04 2
drwxr-xr-x 2 oneadmin oneadmin 4096 Jul 31 18:13 .isofiles

$ find /var/lib/one/datastores
/var/lib/one/datastores
/var/lib/one/datastores/2
/var/lib/one/datastores/.isofiles
/var/lib/one/datastores/1
/var/lib/one/datastores/0

The problem is that OpenNebula says my datastores are using 367.8GB when they should be empty. See the screen shot.

Update: I have tried stopping OpenNebula, deleting the database /var/lib/one/one.db and starting OpenNebula again with no positive result.

enter image description here

Pavel Tankov
  • 367
  • 3
  • 15

1 Answers1

4

By default 5% of a filesystem is reserved for use of the root user, and not otherwise available. This is visible in your df output as a ~300GB discrepancy between the total space and available space. OpenNebula appears to consider this space as unavailable when performing its calculation.

If you don't want to reserve such space, then turn it off:

tune2fs -m 0 /dev/md2
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Wow, I've been using Linux for about 10 years now and never knew about this thing with filesystems and reserved space. Thank you, it worked! – Pavel Tankov Aug 01 '14 at 09:06
  • Yes, it's meant to ensure that if users fill up a disk, that critical system processes like logging can continue to work for a while. – Michael Hampton Aug 01 '14 at 13:39