Project

General

Profile

Actions

Bug #24900

closed

fs: ceph.file.layout.stripe_count changed after modification

Added by yuanli zhu almost 6 years ago. Updated over 5 years ago.

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

0%

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

Description

first i touch en empty file.

touch /nas/cephfs/zyli.txt

then

setfattr -n ceph.file.layout.stripe_count -v 4 /nas/cephfs/zyli.txt

[root@node1 ~]# getfattr -n ceph.file.layout.stripe_count /nas/cephfs/zyli.txt
getfattr: Removing leading '/' from absolute path names
  1. file: nas/cephfs/zyli.txt
    ceph.file.layout.stripe_count="4"

then
vi /nas/cephfs/zyli.txt and save some words

after that i found ceph.file.layout.stripe_count is changed to 1

[root@node1 ~]# getfattr -n ceph.file.layout.stripe_count /nas/cephfs/zyli.txt
getfattr: Removing leading '/' from absolute path names
  1. file: nas/cephfs/zyli.txt
    ceph.file.layout.stripe_count="1"
Actions #1

Updated by Patrick Donnelly over 5 years ago

  • Project changed from Ceph to CephFS
  • Subject changed from ceph.file.layout.stripe_count changed when i vi the file to fs: ceph.file.layout.stripe_count changed after modification
  • Status changed from New to Rejected
  • Backport set to mimic,luminous
  • ceph-qa-suite deleted (fs)

vi/vim will create a new file anytime you save. From strace:

stat("foo~", 0x7ffe8283b8a0)            = -1 ENOENT (No such file or directory)
stat("foo", {st_dev=makedev(0, 80), st_ino=1099511627784, st_mode=S_IFREG|0640, st_nlink=1, st_uid=1163, st_gid=1163, st_blksize=4194304, st_blocks=0, st_size=0, st_atime=2018/07/23-12:58:13.225430222, st_mtime=2018/07/23-12:58:13.225430222, st_ctime=2018/07/23-12:58:13.228900554}) = 0
stat("foo~", 0x7ffe8283a870)            = -1 ENOENT (No such file or directory)
unlink("foo~")                          = -1 ENOENT (No such file or directory)
rename("foo", "foo~")                   = 0
open("foo", O_WRONLY|O_CREAT|O_TRUNC, 0640) = 3
write(3, "fhi\n", 4)                    = 4
fsync(3)                                = 0
stat("foo", {st_dev=makedev(0, 80), st_ino=1099511627790, st_mode=S_IFREG|0640, st_nlink=1, st_uid=1163, st_gid=1163, st_blksize=4194304, st_blocks=1, st_size=4, st_atime=2018/07/23-12:58:24.952586078, st_mtime=2018/07/23-12:58:24.956797225, st_ctime=2018/07/23-12:58:24.956797225}) = 0
stat("foo", {st_dev=makedev(0, 80), st_ino=1099511627790, st_mode=S_IFREG|0640, st_nlink=1, st_uid=1163, st_gid=1163, st_blksize=4194304, st_blocks=1, st_size=4, st_atime=2018/07/23-12:58:24.952586078, st_mtime=2018/07/23-12:58:24.956797225, st_ctime=2018/07/23-12:58:24.956797225}) = 0
close(3)                                = 0
chmod("foo", 0100640)                   = 0
write(1, " 1L, 4C written", 15)         = 15

CephFS can't fix this for you.

A workaround would be that you could set a layout on the containing directory instead which would be inherited by new files.

Actions

Also available in: Atom PDF