Re: sharing ffs filesystems between NetBSD and OpenBSD
In message [EMAIL PROTECTED], Pedro Martelletto writes: On Tue, Sep 05, 2006 at 07:24:55PM +0200, Igor Sobrado wrote: Indeed, it is a BSD disklabel related problem not a ffs's one. It *is* a FFS problem. The superblocks are different. The BSD disklabel provides information not only about the disk partitions but also about the geometry of the disk--these parameters clearly differ between NetBSD and OpenBSD. (Certainly I do not think that it is a BIOS issue in this case.) If the geometry of the disk differs in NetBSD and OpenBSD any command that uses this information can damage the filesystem. I do not know if you are right, but certainly diverging disklabels can explain the problem I outlined in the first message to this thread; even worse, diverging disklabels are an excellent foundation for my fear about future damages to the files stored in the media. It would be nice making the disklabels (and superblocks if different) compatible again. Don't know the advantages of diverging disklabels (but I guess that BSD developers have not changed the disklabels in incompatible ways without good reasons to do it) but, certainly, the ffs/ffs2 filesystems should strictly follow the model proposed by McKusick for ffs and soft updates in the papers published at ACM TOCS. Cheers, Igor.
Re: sharing ffs filesystems between NetBSD and OpenBSD
How could I possibly have missed that question... On Tue, Sep 05, 2006 at 11:13:06AM +0200, Igor Sobrado wrote: By the way, when will ffs2 be available in OpenBSD? From the changelogs I see that there is some work being done in preparation for ffs2, these are excellent news. Kernel support is near completion, 4.1 is likely to ship with it. However, that's not enough. There's still a lot of work to do. Basically, it's an equation of very few people hacking on stuff and a lot of whine-only slackers who, for some obscure reason, prefer to ignore and not test file system diffs. -p.
Re: sharing ffs filesystems between NetBSD and OpenBSD
On Wed, Sep 06, 2006 at 09:53:43AM +0200, Igor Sobrado wrote: but certainly diverging disklabels can explain the problem I outlined in the first message to this thread Uh, yes, maybe. I didn't read it, to be honest. I just looked at the Ted mail you were pointed at. That's definitely talking about different superblocks. :-) -p.
Re: sharing ffs filesystems between NetBSD and OpenBSD
Ops! I did not added the -group switch to repl(1)!!! Sorry, this message should be directed to the mailing list too. --- Forwarded Message Date:Wed, 06 Sep 2006 16:09:18 +0200 From:Igor Sobrado [EMAIL PROTECTED] To: Pedro Martelletto [EMAIL PROTECTED] Subject: Re: sharing ffs filesystems between NetBSD and OpenBSD In message [EMAIL PROTECTED], Pedro Martelletto writes: How could I possibly have missed that question... On Tue, Sep 05, 2006 at 11:13:06AM +0200, Igor Sobrado wrote: By the way, when will ffs2 be available in OpenBSD? From the changelogs I see that there is some work being done in preparation for ffs2, these are excellent news. Kernel support is near completion, 4.1 is likely to ship with it. However, that's not enough. There's still a lot of work to do. Will it be available in one or two years? Wow! It is excellent!!! Certainly ffs2 should not be released until it is working (a filesystem is a critical component when speaking about OS stability!); availability in one or two years are excellent news. Basically, it's an equation of very few people hacking on stuff and a lot of whine-only slackers who, for some obscure reason, prefer to ignore and not test file system diffs. There are probably more important problems to be fixed. :-) Perhaps ffs2 advantages are not obvious yet. Apart of lazy initialization (perhaps the feature easiest to see from a users point of view) its expandability will be great. Adding some fine grained permissions should not be difficult once ffs2 is working. I think that it is an excellent filesystem but, to be honest, I was thinking on ffs2 as a way to support interchangeable external drives in both NetBSD and OpenBSD. As there are other issues that should be fixed before making these drives portable (e.g., the BSD disk label incompatibilities) there is not a strong reason for asking for ffs2 now. I was thinking on ffs2 as a way to share the same (ffs2) filesystem between both OSes. Now, it seems that there is no reason for downgrading the filesystem on the disks attached to NetBSD. It is certainly better not sharing drives between both OSes. Cheers, Igor. --- End of Forwarded Message
Re: sharing ffs filesystems between NetBSD and OpenBSD
In message [EMAIL PROTECTED], Pedro Martelletto writes: On Wed, Sep 06, 2006 at 09:53:43AM +0200, Igor Sobrado wrote: but certainly diverging disklabels can explain the problem I outlined in the first message to this thread Uh, yes, maybe. I didn't read it, to be honest. I just looked at the Ted mail you were pointed at. That's definitely talking about different superblocks. :-) There are a lot of differences in both the disk label and the filesystem structure, indeed. Well, it is time to decide what OS will manage each drive. I will probably set up one flash drive as FAT32 (for compatibility purposes with other OSes), other for NetBSD and the last one for OpenBSD. About the 80 GB HDD... don't know... I will need to carefully think on this issue next weekend. Best regards, Igor.
Re: sharing ffs filesystems between NetBSD and OpenBSD
On 9/5/06, Igor Sobrado [EMAIL PROTECTED] wrote: Hello! I am trying to understand an odd behaviour in the Berkeley Fast File System as implemented in both NetBSD and OpenBSD. My main concern [...] Can it be a problem when sharing these drives with non-i386 architectures? Guessing that you are sharing files between big-endian and non-endian machines? You can't do that with ffs. NetBSD apears to have the option FFS_EI. That may help. A quick search indicates that nfs vnd trickery may be required. Good luck.
Re: sharing ffs filesystems between NetBSD and OpenBSD
On Tuesday 05 September 2006 11:13, Igor Sobrado wrote: Hello! I am trying to understand an odd behaviour in the Berkeley Fast File System as implemented in both NetBSD and OpenBSD. My main concern is not getting a workaround for this problem (hopefully, I found one) but understanding if there are hidden issues than can damage files stored in these shared filesystems in the future. The scenario is the next one: I have three USB flash memory drives and an external USB HDD (a Plextor PX-PH08U). I want to make ffs filesystems on at least two of the flash memory drives and the HDD to share data between my laptop (running NetBSD) and three computers (running OpenBSD). These machines are running the latest stable releases of NetBSD and OpenBSD. All software is relatively updated (but I am not tracking -stable in either NetBSD or OpenBSD). https://marc.theaimsgroup.com/?l=openbsd-miscm=115007748827114w=2 Conclusion from that thread seems to be that sharing FFS partitions between BSDs is a Bad Idea. Maybe you should consider using for example ext2 partition? I have that to share data between all 3 major families of systems ;) cut information I can't comment on -- viq
Re: sharing ffs filesystems between NetBSD and OpenBSD
In message [EMAIL PROTECTED], Jeff Quast writes: On 9/5/06, Igor Sobrado [EMAIL PROTECTED] wrote: Hello! I am trying to understand an odd behaviour in the Berkeley Fast File System as implemented in both NetBSD and OpenBSD. My main concern [...] Can it be a problem when sharing these drives with non-i386 architectures? Guessing that you are sharing files between big-endian and non-endian machines? Quite sure! I am certainly worried about big-endian and little-endian architectures. Sometimes a fix appears that allows a driver (usually written for i386 architectures) working on big-endian architectures. It works for drivers but, obviously, a filesystem is very different. We cannot make a filesystem endianess independent as it will make the new version of the filesystem incompatible with some architectures. You can't do that with ffs. These are bad news, but at least I hope that sharing filesystems between NetBSD and OpenBSD *on the same architecture* will be possible. Something like the Berkeley sockets API functions to convert integers to network byte order would be too expensive for a filesystem, though. Ok, then the second question remains. Why a ffs filesystem created on a HDD added to an OpenBSD system cannot be mounted on NetBSD? To be more precise, I cannot assure that a ffs filesystem created on OpenBSD cannot be mounted on NetBSD, I am guessing that the problem is in the BSD disklabel instead. Is making the BSD disklabel and filesystem on NetBSD the right answer to this problem? (it is the workaround I found when looking at the problem some days ago.) Can we expect other problems related with sharing these storage devices between both operating systems? I think that these external drives (mainly the 80 GB HDD) are not only an excellent way to share data -I certainly prefer using a local network for these purposes, it is faster and more reliable- but excellent media for storing data. But, to be *really* useful, I will need to share these filesystems between both operating systems. FAT32 is not the right answer to this problem. NetBSD apears to have the option FFS_EI. That may help. A quick search indicates that nfs vnd trickery may be required. Excellent advice! Certainly nfs has not endianess issues and the useful vnode driver can help in this matter in the same way it helps when mounting disk images (the first time I used vnd was mounting a disk image stored in a local disk... in few minutes I discovered that vnd is elegant and powerful, as the BSD operating system themselves.) But it is perhaps too complex, better staying at a single architecture. Certainly restricting ffs mounts to a single architecture is not a problem at all, but I would greatly appreciate some advice on the second question: why a disk created on OpenBSD cannot be mounted on NetBSD, if it is a known problem -or not a problem at all but an expected behaviour- and if we can safety share a filesystem created in NetBSD with OpenBSD. If it is a known behaviour of two different ffs implementations, I will need to make two sets of USB drives: one for NetBSD and other for OpenBSD and sharing files using scp. If it is a problem and it is currently not documented, I will do my best to provide as accurate information as possible in a problem report. Best regards! Igor.
Re: sharing ffs filesystems between NetBSD and OpenBSD
On Tuesday 05 September 2006 19:24, Igor Sobrado wrote: Hi viq! Sorry, I have read your message right now (...I am not subscribed to this mailing list, I was looking at MARC as it seems the most up to date archive, and found your answer.) Thanks a lot for the excellent reference you provided in your email. Indeed, it is a BSD disklabel related problem not a ffs's one. And it seems a serious one! I was about to just mention it, but then thought I'll fish out the link, so there you are ;) Better thinking on using each drive on a single operating system from now... Again, thanks a lot for your feedback. Now I see that there are some issues, not related with ffs itself, that can make information in real risk if I continue sharing these filesystems between both OSes. Ok, I think that it is all clear now. I must decide what OS will have access to each drive. Or reformat the drives to be shared with a different file system. Common solution to that is FAT32, but also pretty much everything (including windows! http://www.fs-driver.org/ ) can read ext2/3 disks - though I had some problems with fsck of an ext2 disk after it was mounted (or formatted) with linux. So, that's some other solution too ;) Though, no, I have NO idea how that is to the endianness of a machine. Thanks! Igor. -- viq
Re: sharing ffs filesystems between NetBSD and OpenBSD
In message [EMAIL PROTECTED], viq writes: On Tuesday 05 September 2006 19:24, Igor Sobrado wrote: Thanks a lot for the excellent reference you provided in your email. Indeed, it is a BSD disklabel related problem not a ffs's one. And it seems a serious one! I was about to just mention it, but then thought I'll fish out the link, so there you are ;) Thanks again for that link. An excellent reference, indeed! Ok, I think that it is all clear now. I must decide what OS will have access to each drive. Or reformat the drives to be shared with a different file system. Common solution to that is FAT32, but also pretty much everything (including windows! http://www.fs-driver.org/ ) can read ext2/3 disks - though I had some problems with fsck of an ext2 disk after it was mounted (or formatted) with linux. So, that's some other solution too ;) Though, no, I have NO idea how that is to the endianness of a machine. I prefer staying away of FAT32... there are a lot of nice features on Unix filesystems (e.g., soft and hard links) I certainly want to use. Don't trust me a lot, but I believe that ext2/3 do not depend on the endianness of the machine. Perhaps it is me, but I prefer avoiding ext2/3 filesystems too. I had some serious challenges recovering data from ext filesystems after power outages in the past. These filesystems do not seem as robust as ffs with softdep. Have a nice day! Igor.
Re: sharing ffs filesystems between NetBSD and OpenBSD
On Tue, Sep 05, 2006 at 07:24:55PM +0200, Igor Sobrado wrote: Indeed, it is a BSD disklabel related problem not a ffs's one. It *is* a FFS problem. The superblocks are different. -p.