|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
ext2fs -o sync
How is ext2fs mounted in OpenBSD? I would like to mount it with the sync option, but I get this error message:
Code:
mount_ext2fs: -o sync: option not supported Quote:
Also, Linux mounts ext2 as async by default, while FreeBSD mounts ext2 as sync by default. It's therefore tempting to believe that the default for ext2 on OpenBSD is sync because there is no journaling. The OpenBSD FAQ supports this reasoning in general terms: Quote:
|
|
|||
Makes sense, but where did you find that? I haven't found any documentation about it.
|
|
||||
I searched the misc@ archives, where I found henning@'s comments in 2001, and Jan Stary's comments in 2009. Searching more generally, I found what appears to be confirmation in comments from Don Allen to the NetBSD tech-kern@ list in 2011. It may be applicable, as OpenBSD's ext2fs driver is based on NetBSD's.
And then to try to confirm, I looked at file allocation code in src/sys/ufs/ext2fs/ext2fs_balloc.c -- where it appears that some indirect writes are done synchronously, the rest of the allocations are done aysnc. Of course, that is only true if I understood what I was reading; I may have misunderstood the code. I haven't been a programmer in decades and I was never a C programmer. Last edited by jggimi; 26th November 2014 at 07:15 PM. Reason: typo |
|
||||
And, poking around further just now:
I found http://wiki.osdev.org/Ext2 -- which shows that ext2fs inodes have a synchronous update flag, to permit sync for individual files. Edited to add: this flag is identified in src/sys/ufs/ext2fs/ext2fs_dinode.h but is not referenced by any of the driver's modules. I found https://wiki.freebsd.org/Ext2fs -- which states that the filesystem supports "the faster async mode" and "compensates with a robust fsck". ---- I only use ext2fs if I need to either multiboot with or move drives between OpenBSD and another Unix-like system. If a network is involved, I prefer to use NFS for file sharing. Last edited by jggimi; 26th November 2014 at 08:50 PM. Reason: Noted the EXT2_SYNC flag in source code. |
|
|||
Ah, I never searched that mailing list or the source code. Thank you for doing all that work.
Quote:
A network is not involved but I will look into NFS anyway; it feels like there must be a better way to do it than what I'm doing now. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing fstype in disklabel (ext2fs -> 4.2BSD) | soderlund | OpenBSD General | 8 | 10th November 2014 07:05 AM |
how fast do mirror servers sync to main server for -current ? | daemonfowl | OpenBSD Installation and Upgrading | 3 | 3rd September 2012 02:58 AM |
How to know if the system is in sync | sepuku | OpenBSD Installation and Upgrading | 29 | 8th September 2011 12:24 PM |
Best Way to sync web sites | roundkat | OpenBSD General | 2 | 14th September 2008 01:48 PM |
How to sync files over ftp | graudeejs | FreeBSD General | 4 | 4th August 2008 10:18 PM |