[Bug 238663] [UFS] Corrupted files since migration to FreeBSD11

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jun 17 12:20:31 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238663

            Bug ID: 238663
           Summary: [UFS] Corrupted files since migration to FreeBSD11
           Product: Base System
           Version: 11.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: nicolas.masse at stormshield.eu

Since we migrated from FreeBSD-10 to FreeBSD11, we see that some files get
corrupted.
We were able to reproduce the issue by running a script with the following
scenario:

- mount the filesystem read-write with the -async flag
- decompress some archives
- unmount the filesystem
- remount the filesystem readonly

Once we do that, we generally see one or two files being corrupted.

Note that this only happens when using some recents SSD.
Also note that unmounting the filesystem is necessary to see the problem. When
accessing the files before the umount command, they all seems ok.

AFAICS, this looks like as if one page was loaded in memory, but wasn't written
physically on the disk.

Here is a shortned version of the script I am using:

#!/bin/sh
mount -o async $PARTITION /mnt/disk
tar --no-same-owner -C /mnt/disk/new_dir -zxUf archive1.tgz
7zr x -y -bd -o/mnt/disk ./archive2.7z
7zr x -y -bd -o/mnt/disk ./archive3.7z
mv /mnt/disk/dir /mnt/disk/old_dir
mv /mnt/disk/new_dir /mnt/disk/dir
rm -rf /mnt/disk/old_dir
umount $MAJ_PARTITION /mnt/disk/
mount -o ro $MAJ_PARTITION /mnt/disk/
check_integrity # here we check the md5 of the decompressed files


The filesystem use the following tunings:
SNI40A16C0818A9>tunefs -p /dev/ufs/disk
tunefs: POSIX.1e ACLs: (-a)                                disabled
tunefs: NFSv4 ACLs: (-N)                                   disabled
tunefs: MAC multilabel: (-l)                               disabled
tunefs: soft updates: (-n)                                 disabled
tunefs: soft update journaling: (-j)                       disabled
tunefs: gjournal: (-J)                                     disabled
tunefs: trim: (-t)                                         enabled
tunefs: maximum blocks per file in a cylinder group: (-e)  4096
tunefs: average file size: (-f)                            16384
tunefs: average number of files in a directory: (-s)       64
tunefs: minimum percentage of free space: (-m)             8%
tunefs: space to hold for metadata blocks: (-k)            2616
tunefs: optimization preference: (-o)                      time
tunefs: volume label: (-L)                                 main

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list