Project

General

Profile

Actions

Bug #46273

closed

mds: deleting a large number of files in a directory causes the file system to read only

Added by wei qiaomiao almost 4 years ago. Updated over 3 years ago.

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

0%

Source:
Community (dev)
Tags:
Backport:
octopus,nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS, MDSMonitor
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Log as follow:

2020-06-18 15:32:20.706904 7f1fe9f54700  1 mds.2.cache.dir(0x2000255af08.100*) commit error -2 v 1248554
2020-06-18 15:32:20.706914 7f1fe9f54700 -1 log_channel(cluster) log [ERR] : failed to commit dir 0x2000255af08.100* object, errno -2
2020-06-18 15:32:20.706921 7f1fe9f54700 -1 mds.2.334296 unhandled write error (2) No such file or directory, force readonly...
2020-06-18 15:32:20.706929 7f1fe9f54700  1 mds.2.cache force file system read-only

The reason is that deleting files in a directory until it meets the merge condition, the merge operation will merge multiple subfrags into a basefrag, and create basedir for basefrag, then call steal_dentry to moves the dentries under subdir to basedir. When commit the basedir, the dentries under basedir will satisfies the condition: dn->is_dirty() && dn->get_linkage()->is_null(), so the OMAP request type is CEPH_OSD_OP_OMAPRMKEYS, When OSD processes this request, it thinks that the object corresponding to basedir must exist (in fact, it does not exist), and returns error - 2.


Related issues 3 (0 open3 closed)

Related to CephFS - Bug #47201: mds: CDir::_omap_commit(int): Assertion `committed_version == 0' failed.ResolvedZheng Yan

Actions
Copied to CephFS - Backport #46520: octopus: mds: deleting a large number of files in a directory causes the file system to read onlyResolvedNathan CutlerActions
Copied to CephFS - Backport #46521: nautilus: mds: deleting a large number of files in a directory causes the file system to read onlyResolvedNathan CutlerActions
Actions

Also available in: Atom PDF