Some files are not displayed when listing a directory with 'ls', but can be listed directly or accessed with 'stat' in RHEL 5 or 6
Issue
- If I run an
lson my gfs2 filesystem there is one or more files missing in the output. If I runlsagainst the file directly it does appear
# ls -al /mnt/lv1/data/file.txt
-rwxrwxrwx 1 60712 4064 238288 Jul 2 14:49 /mnt/lv1/data/file.txt
# stat /mnt/lv1/data/file.txt
File: `/mnt/lv1/data/file.txt'
Size: 238288 Blocks: 480 IO Block: 4096 regular file
Device: fd0dh/64781d Inode: 2906199 Links: 1
Access: (0777/-rwxrwxrwx) Uid: (60712/ UNKNOWN) Gid: ( 4064/ UNKNOWN)
Access: 2013-07-02 14:49:42.996609713 -0400
Modify: 2013-07-02 14:49:42.996609713 -0400
Change: 2013-07-02 14:49:42.996609713 -0400
# ls /mnt/lv1/data/file*
ls: /mnt/lv1/data/file*: No such file or directory
# ls /mnt/lv1/data/ | grep file
#
Environment
- Red Hat Enterprise Linux (RHEL) 5 or 6 with the Resilient Storage Add On
- GFS2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
