Project

General

Profile

Bug #2687

FileStore crashes when "osd_journal_size" is larger than the filesystem

Added by Greg Farnum over 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
OSD
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

See: http://permalink.gmane.org/gmane.comp.file-systems.ceph.devel/7282
If a user (on tmpfs, in this case) specifies a journal size which is larger than the available space, the OSD will crash when it runs out of space.

There are checks in the FileJournal to detect if the block device is smaller than the set journal size (and bail out), but I don't see any for files. We should add them.

History

#1 Updated by Sage Weil over 11 years ago

for files, i think the right approach is to fallocate(), which will reserve the space. we shouldn't have to look at e.g. statfs(2), which isn't reliable for this sort of thing anyway.

#2 Updated by Sage Weil about 11 years ago

  • Tracker changed from Feature to Bug

#3 Updated by Sage Weil about 11 years ago

  • Status changed from New to Resolved

this has called fallocate(2) for a while now.

Also available in: Atom PDF