Article ID: 119737, created on Jan 21, 2014, last review on May 3, 2014

  • Applies to:
  • Virtuozzo

Symptoms

ext4 errors are registered in /var/log/messages for the pfcache ploop device:

[233080.729202] EXT4-fs error (device ploop46148p1): ext4_add_entry: bad entry in directory #393291: rec_len is smaller than minimal - block=1581114offset=0(0), inode=0, rec_len=0, name_len=0
[233080.729582] EXT4-fs error (device ploop46148p1): ext4_add_entry: bad entry in directory #393354: rec_len is smaller than minimal - block=1581127offset=0(0), inode=0, rec_len=0, name_len=0
[233080.729993] EXT4-fs error (device ploop46148p1): ext4_add_entry: bad entry in directory #393291: rec_len is smaller than minimal - block=1581114offset=0(0), inode=0, rec_len=0, name_len=0

# cat /proc/mounts | grep ploop46148p1
/dev/ploop46148p1 /vz/pfcache ext4 rw,relatime,barrier=1,data=ordered,balloon_ino=12 0 0

Resolution

Follow these steps to perform ext4 file system check on the pfcache partition:

  1. Stop pfcache service:

    # service pfcached stop
    
  2. Remount all ploop devices without pfcache option:

    # cat /proc/mounts | grep pfcache=
    /dev/ploop57184p1 /vz/root/103 ext4 rw,relatime,barrier=1,data=ordered,balloon_ino=12,pfcache_csum,pfcache=/vz/pfcache 0 0
    /dev/ploop24447p1 /vz/root/104 ext4 rw,relatime,barrier=1,data=ordered,balloon_ino=12,pfcache_csum,pfcache=/vz/pfcache 0 0
    
    
    # cat /proc/mounts | grep pfcache= | awk '{print $1" "$2}' | while read ploop mpoint ; do mount -t ext4 -o remount,nopfcache $ploop $mpoint ; done
    
    
    # cat /proc/mounts | grep pfcache=
    ...there should be no output here...
    
  3. Get the exact ID of the pfcache ploop device partition:

    # cat /proc/mounts | grep /vz/pfcache
    /dev/ploop46148p1 /vz/pfcache ext4 rw,relatime,barrier=1,data=ordered,balloon_ino=12 0 0
    
  4. Unmount the partition:

    # umount /vz/pfcache
    
  5. Perform the file system check:

    # e2fsck /dev/ploop46148p1
    
  6. Mount the partition back:

    # mount /dev/ploop46148p1 /vz/pfcache
    
  7. Remount all ploop devices with pfcache:

    # cat /proc/mounts | grep ploop | grep -v '/vz/pfcache'
    /dev/ploop57184p1 /vz/root/103 ext4 rw,relatime,barrier=1,data=ordered,balloon_ino=12,pfcache_csum 0 0
    /dev/ploop24447p1 /vz/root/104 ext4 rw,relatime,barrier=1,data=ordered,balloon_ino=12,pfcache_csum 0 0
    
    
    # cat /proc/mounts | grep ploop | grep -v '/vz/pfcache' | awk '{print $1" "$2}' | while read ploop mpoint ; do mount -t ext4 -o remount,pfcache=/vz/pfcache $ploop $mpoint ; done
    
    
    # cat /proc/mounts | grep pfcache=
    /dev/ploop57184p1 /vz/root/103 ext4 rw,relatime,barrier=1,data=ordered,balloon_ino=12,pfcache_csum,pfcache=/vz/pfcache 0 0
    /dev/ploop24447p1 /vz/root/104 ext4 rw,relatime,barrier=1,data=ordered,balloon_ino=12,pfcache_csum,pfcache=/vz/pfcache 0 0
    
  8. Start pfcache service:

    # service pfcached start
    

Search Words

ext4-fs error device ploop bad entry in directory

dmesg ext4 error ploop

0dd5b9380c7d4884d77587f3eb0fa8ef 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF