On Wed, Dec 4, 2013, at 05:00 PM, Jeff Ross wrote: > Hi all, > > I have a small server (5.4-current, more or less, dmesg and other > pertinent details follow) in an office acting as firewall/samba server. > We are trying to use an external USB hard drive as a backup. Because > these are windows folk and because this is a server with 512M of ram and > their backup needs aren't that great, that 1TB external drive has one > 50GB ms-dos partion at i, the rest of the drive is unused. Hotplugd is > setup to automagically mount the drive, when it is inserted. But since > I have no way (that I know of anyway) to cleanly umount the drive if it > is just yanked out while mounted, when the backup script starts if it > doesn't find the drive mounted it tries to fsck-msdos's it first and > then mount it. > > What I'm finding is that when the server tries to fsck_msdos the msdos > partition, it will more often that not bring the server down. It doesn't > panic but it gets so resource starved that it is, for all intents and > purposes, locked up--I can't even ssh into it.
I have noticed that regular FAT/msdos filesystem access to a USB thumb drive has abysmal throughput, worse than a comparable Windows machine by a factor of at least 2. I'd be willing to contribute towards a bounty fund to get the FAT/msdos filesystem code improved (my programming skills are limited, but I'll have a small surplus of money in about a month). A good start to fix your problem would be to profile fsck_msdos and see exactly what functions are eating up the most CPU time and RAM, and go from there. I have access to a computer with 512M RAM running OpenBSD and can run tests using a similarly sized filesystem and see if it's reproducible. > Does an ms-dos file system require far more than the 1MB of ram per 1 GB > of disk space that http://openbsd.org/faq/faq14.html#LargeDrive suggests? I don't think 1MB RAM per 1GB disk space applies to fsck_msdos, only the fsck for FFS. -- Shawn K. Quinn skqu...@rushpost.com