NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rsync to ext2 filesystem issues
On 7/09/2026 3:53 pm, Ramiro Aceves wrote:
Thanks so much for your comments regarding this subject.
I have fsck the ext2 filesystem using Linux and repeated the rsync.
Now rsync stopped into another file among the Mozilla firefox
directory that owns trillions of files.
I noticed that when I fixed the filesystem with fsck under Linux it
output the following "Invalid HTREE directory" message:
HTREE, according to netbsd, is a hashing in ext2 to speed up searches.
https://github.com/NetBSD/src/blob/55e8a8a44d9e70b9589a9baec5b637d22673df06/sys/ufs/ext2fs/ext2fs_hash.c#L240
sep 06 11:47:53 debian-nuc8i7 systemd-fsck[1293]: /dev/sdb1: Invalid
HTREE directory inode 38723585
(/COPIA_NETBSD_8I7/home/ramiro/.mozilla/firefox/527cpmj0.default-default-2/storage/permanent/chrome/idb/3870112724rsegmnoittet-es.files)
Jeez, is that systemd now running file I/O as well. Magnificent bloatware there...
Do you think it is a bug in NetBSD ext2 filesystem implementation? I
am a total ignorant in this subject, just in case clue persons can
extract information from this finding.
Yes, me too. However, I think your overall challenge is this: ffs is fast has proper buffer lock handling/optimizations, rsync creates a ton of file I/O per second (metadata etc), NetBSD's implementation of the VFS called ext2 cannot handle this.
Anyway, I have excluded from the rsync backup all the offending files
and it seems to finish just fine. All those files are not important
for my backup.
Have you perhaps looked at another file system? ext4 can be run using fuse-ext2. That's far more robust than antique ext2. Geez, maybe even fat32 could be better? Why not try a small partition or another disk if you have spare and test them out?
Cheers
Not a fix, a workaround but if it works....
Regards.
El dom, 6 sept 2026 a las 0:26, beaker (<beaker%sdf.org@localhost>) escribió:
Ramiro Aceves <ea1abz%gmail.com@localhost> wrote:
Hello,
I have an external USB hard disk partitioned with ext2 filesystem
(/dev/sd0e mounted in /mnt/datos for file sharing between NetBSD and
Linux) and I have had recurrent problems when rsync-ing files from the
NetBSD FFS filesystem to the EXT2 filesystem.
<snip
After killing rsync commands I cannot umount sd0e partition. It normally
ends in having to fsck the partition in the next reboot (about 1 hour of
fsck)
Why does it stop and stay for ever? Is it a problem with rsync command?
or is it a problem with ext2 filesystem?
I don't have an answer for you other than to say I've also had system hangs
when trying to rsync *from* an ext2 partition mounted on NetBSD. I generally
make use of the 'log' mount option so no long fscking needed. I regularly
run rsync from NetBSD (FFS) -> Linux (BTRFS) without issue. In my case the
ext2 filesystem is a common area for a dual-boot machine (NetBSD & Debian)
so I just do the rsync with the ext2 mounted on Debian.
I recall a past related thread regarding use of ext2 on NetBSD and I believe
the advice was to create said ext2 filesystem using newfs_ext2fs(8) instead
of from within Linux. I see there is a fsck_ext2fs(8) which you might want
to run to see if there's any issues with your setup.
-B
Home |
Main Index |
Thread Index |
Old Index