Bug #611

check that the partition is actually a mountpoint before enabling it for greyhole

Added by gboudreau almost 12 years ago. Updated over 11 years ago.

Target version:
Start date:
Due date:
% Done:



When I made a change to my shares, to re-generate the greyhole.conf and the smb.conf (see #610), Amahi created a .greyhole_uses_this file on my / partition, in /mnt/hdd7/gh/

This path (/mnt/hdd7) normally has a drive mounted there, but it wasn't mounted at this time, because I was fsck'ing it.

Before Amahi creates .greyhole_uses_this and the gh folder, it should make sure that it's doing it in the root of a mount point...

i.e. if / is a mount point, it's ok to create a /gh folder, and the /gh/.greyhole_uses_this file, if / was selected in the Storage Pool page.
Same if I have a drive mounted in /mnt/hdd7, and it's selected in the Storage Pool page: mkdir /mnt/hdd7/gh && touch /mnt/hdd7/gh/.greyhole_uses_this
But if the Amahi DB says I have /mnt/hdd7 selected, but nothing is mounted there (i.e. it's in fact the root partition), it shouldn't create the gh folder, and .greyhole_uses_this file!

Because it did, my root partition has been filled to capacity, and my server crashed hard.


#1 Updated by cpg almost 12 years ago

doing the check is a good thing.

so ... it created the dot file inside some other disk (the one where things were mounted), deep in the file structure (not in the root).

How, or more to the point, why, would that affect GH operation??
Or why would that cause bad operations?

Wouldn't it only matter when the dot file is in the root of the partition?
i.e. not in this case?

What am I missing?

#2 Updated by gboudreau almost 12 years ago

It matters because it makes Greyhole use a partition I might not have included in my pool, for good reasons.
In this particular case, /mnt/hdd7 is inside the root partition, when nothing is mounted in /mnt/hdd7 like it should.
So that makes Greyhole use the root partition in the pool, which most likely will fill it to capacity.

When my drive is correctly mounted, /mnt/hdd7 is the root of that partition, and it's fine to create gh folder in there, and the .greyhole_uses_this file in that folder.

#3 Updated by cpg over 11 years ago

  • Subject changed from Filled root partition by Greyhole to check that the partition is actually a mountpoint before enabling it for greyhole
  • Status changed from New to Assigned

#4 Updated by Anonymous over 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:"182102e7a31bcaa4c75a0eda0576328e3b0e0f87".

#5 Updated by cpg over 11 years ago

test rpm (FOR F14 ONLY!!!) at:

#6 Updated by cpg over 11 years ago

is this the way to test? ... basically, try to add a partition that is not a mount point:

  • visit with web interface to add to the pool, then
  • behind the scenes unmount the partition you are about to add to the pool
  • add the partition to the pool through the previously opened web interface
it should not:
  • barf
  • add the partition to the pool

#7 Updated by gboudreau over 11 years ago

Yes, the above test procedure would work.
This test can be closed. It seems to work fine now.

Also available in: Atom