NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rsync to ext2 filesystem issues
El sáb, 12 sept 2026 a las 1:59, RVP (<rvp%sdf.org@localhost>) escribió:
>
> On Fri, 11 Sep 2026, Ramiro Aceves wrote:
>
> > El vie, 11 sept 2026 a las 9:29, RVP (<rvp%sdf.org@localhost>) escribió:
> >>
> >> How much longer? I check my ext{2,4} data partitions using e2fsck on both
> >> FreeBSD and NetBSD, and have seen no appreciable difference in speeds.
> >>
> >
> > On Linux, fsck took about 1 hour.
> > On NetBSD, using fsck from e2fsprogs, it took about 4.85 hours.
> >
>
> External USB drive, you said, right? That would explain it. For some reason,
> NetBSD is considerably slower than Linux in this. Even a simple dd(1) read
> test'll show this. (My ext* partitions are all on an NVMe drive.)
>
> -RVP
Hello RVP
After several days playing with this issue, I have no conclusions but
the crash. I do not appreciate that Linux is faster enough to explain
that difference in fsck performance. Perhaps NetBSD fsck ext2
implementation is slower than the Linux one. I do not know.
I am about getting crazy with this ;-) It surpases me.
I have found this on the NetBSD page, I do not know if it is valid
nowadays or not:
https://wiki.netbsd.org/tutorials/how_to_share_an_ext2_partition_with_linux/
"The best way to share a partition with Linux is to create an EXT2
filesystem and use revision 0 (aka GOOD_OLD_REV) as the filesystem
format. By using the GOOD_OLD_REV (revision 0) format you can avoid
the dir_index and large_file issues encountered with DYNAMIC_REV
(revision 1)."
Example
Here is an example of how you can create, format and check an EXT2
filesystem using the Linux native tools:
# mkfs -t ext2 -r 0 /dev/hda3
...
...
Perhaps it would be a good idea to create a new ext2 filesystem using
that GOOD_OLD_REV conservative format and see what happens in the long
run.
Now, as is, (with the filesystem crated from Linux using the
defaults), I did an rsync with a clear destination directory and it
worked fine. I rsynced again after two days and worked but....I think
that the problem will arise again cause I have not changed anything.
I also have found an strange thing. If I create three 1 GB file like this:
dd if=/dev/zero of=/mnt/datos/testfile1 bs=1m count=1024
dd if=/dev/zero of=/mnt/datos/testfile2 bs=1m count=1024
dd if=/dev/zero of=/mnt/datos/testfile3 bs=1m count=1024
I umount and mount the filesystem again.
It turns out that the first one is read very slow using dd:
dd if=/mnt/datos/testfile1 of=/dev/null bs=1m about 1.4 MB/s
dd if=/mnt/datos/testfile1 of=/dev/null bs=1m about 49 MB/s
dd if=/mnt/datos/testfile1 of=/dev/null bs=1m about 30 MB/s
using filefrag (filefrag says it does not work in NetBSD) from Linux
shows that the first one is more fragmented than the other 2.
# filefrag /mnt/datos/testfile1 /mnt/datos/testfile1: 24089 extents found
# filefrag /mnt/datos/testfile2 /mnt/datos/testfile2: 415 extents found
# filefrag /mnt/datos/testfile3 /mnt/datos/testfile3: 815 extents found
Regards.
Ramiro.
Home |
Main Index |
Thread Index |
Old Index