| Summary: | mkdir after rm of regular file of same name fails | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Pavan Vilas Sondur <pavan> |
| Component: | core | Assignee: | Anand Avati <aavati> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | mainline | CC: | chrisw, gluster-bugs, lakshmipathi, vikas |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | RTA | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Pavan Vilas Sondur
2009-08-24 11:52:24 UTC
If a regular file 'x' exists and it is removed and a directory of the same name 'x' is tried to create, it fails, saying File exists. The back-end however does not have the file. I encountered this in a simple AFR config. pavan@dapawz:~/mounts/mnt1/locks$ touch test pavan@dapawz:~/mounts/mnt1/locks$ ls a b file locktests locktests.c locktests.c~ Makefile test pavan@dapawz:~/mounts/mnt1/locks$ rm test pavan@dapawz:~/mounts/mnt1/locks$ ls a b file locktests locktests.c locktests.c~ Makefile pavan@dapawz:~/mounts/mnt1/locks$ mkdir test mkdir: cannot create directory `test': File exists I've moved the log files and spec files to /share/tickets/<bug id> since the file sizes were huge. Infact - the bug does exist. Every mkdir fails and it says that the file exists. If a long name is given for the directory name, it succeeds, but the directory created has a truncated name. I noticed this on a simple AFR config. However, the backend directories are consistent, and have the same exact truncated directory if the mkdir succeeds. [root@management mnt1]# mkdir ggggggg mkdir: cannot create directory `ggggggg': File exists [root@management mnt1]# mkdir ggggggggggg [root@management mnt1]# ls abc ggg [root@management mnt1]# mkdir a mkdir: cannot create directory `a': File exists [root@management mnt1]# mkdir b mkdir: cannot create directory `b': File exists [root@management mnt1]# ls abc ggg Volfiles and log files in /share/tickets/226/ ..<snip> 009-08-25 14:48:14] E [posix.c:814:posix_mkdir] posix: mkdir of / failed: File exists [2009-08-25 14:48:14] T [server-protocol.c:772:server_mkdir_cbk] server: 172: MKDIR / ==> -1 (File exists) [2009-08-25 14:48:14] T [server-protocol.c:4565:server_xattrop_resume] brick: 55: XATTROP '/ (1)' Verified that mkdir always fails even in a simple FUSE->posix setup. $ mkdir blah mkdir: cannot create directory 'blah': File exists $ mkdir 1234567890 $ ls 90 The first eight characters appear to get truncated, and thus for short names an mkdir is attempted on "/", which fails with EEXIST. PATCH: http://patches.gluster.com/patch/1161 in master (fuse: protocol fix: fix bogus parsing of MKDIR message) |