nixers
How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - Printable Version
+- nixers (https://nixers.net)
+-- Forum: Operating Systems & Administration (https://nixers.net/Forum-Operating-Systems-Administration)
+--- Forum: BSD (https://nixers.net/Forum-BSD)
+--- Thread: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? (/Thread-How-do-I-go-about-sharing-an-external-HDD-between-GNU-Linux-FreeBSD-and-OpenBSD)


How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - Nagase Iori - 16-08-2017

The external HDD is 1TB and it will mostly contain media.
What file system would be best to use?
The best one that comes to mind is ext2, since all three support it.
Is using ext2 a good idea, because the HDD might contain some important stuff too, besides anime.
Are there any better options?


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - evbo - 16-08-2017

Is this sitting on your internal network? If so I'd use either samba or NFS to setup a network file share


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - Nagase Iori - 16-08-2017

That would work if I only used my computers inside of my house, which would defeat the purpose of having an external drive.
I'll be going to a college in a different city and I'll have one computer at home, one computer in my rented apartment and a laptop to carry around.
I could set up a file server at home, but why would I want to be downloading files if I can have immediate access to them?
Besides, I won't have unlimited bandwidth in my rented apartment.

I just need the best way to have rw access to my external drive across those three operating systems.


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - venam - 16-08-2017

FAT32 seems to be supported almost everywhere.
But you'll have a maximum file size limitation of 4GB and a limited number of files too.


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - Nagase Iori - 16-08-2017

Why would I use FAT32 if I can use ext2?
(if ext2 support on the BSD's is stable enough)


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - pizzaroll1 - 16-08-2017

Ext2 on OpenBSD is good enough, in my opinion. Although it's not really battle-tested by a lot of users, I've been sharing /home between OpenBSD and Debian for >1 year on ext2 with no problems (lots and lots of reads and writes of many files), but OpenBSD's fsck_ext2fs is dodgy, don't use it. If the other BSDs ship with ext2 tools, they're probably similarly untested and generally unused. I wrote an article about it too, but that's the general idea.

The support on Net and FreeBSD must be better or at least as good, but I don't really know, someone else would have to chime in on that.

If you involve Windows in this, every ext2 driver I tried required a long e2fsck session from Debian to fix it after a write from Windows, so that's likely worse than useless. But you didn't mention Windows, so this is perhaps not relevant.


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - josuah - 17-08-2017

[EDIT]: sorry, I missed one message. :S What I say is that you could have a portable server solution no much bigger than an external hard drive itself with good read/write performances with an Ethernet switch, at the higher cost of having to setup a lot of (fun) things and a few money, and more hardware to carry around.


Another approach woud be another machine dedicated to distribute a networked filesystem (NFS, 9P...). This woud then be a SAN. This is also suited for storing the operating system files (/bin, /lib...).

If it is for storage, you could also go for a NAS, and use a protocol such as FTP, BitTorrent (once libgbt will be ready ;)), rsync...

Or you could also use a server with protocol dedicated to every kind of media: a streaming platform (or plain static HTTP website), fileserver, and if "important things" are code and mostly plain text, a git server would make it quite safe.

The you will have freedom in the kind of filesystem to use.

This would involve having another computer. A RaspberryPi or other ARM board, an old laptop (broken screen/keyboard/soundspeakers, a one too slow for daily use...). A 1GB or 10GB switch would allow direct, fast connection with the storage computer, and eventually connection to a network.


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - kyberkhrime - 17-08-2017

FAT32 is really your best bet, as much as I hate it. Using ext2 on OpenBSD is like using Windows ME - you can do it, but nobody will pity you when you lose all your data.

What about using a cheap VPS or one of the cloud services out there (yes, even Dropbox is acceptable, given some precautions are taken)?


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - josuah - 17-08-2017

An all in one solution could be a NAS adapter: http://addonics.com/products/nas40esu.php

But I hate when solutions involve money.

It is a bit sad that not so many filesystems have an
explicit support for both Linux and BSD.

ZFS has great features and a lot of attention,
but its license is not compatible with Linux's
so it is not bundled with it. You have to install
it first.

I carry a FAT fulesystem between Linux and FreeBSD for SSH keys without issue so far.
Code:
mount            /dev/sdb /mnt/ssh  # on Linux
mount -t msdisfs /dev/da0 /mnt/ssh  # on FreeBSD



RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - 1Byte - 17-08-2017

Is this a file system question, or a server question? If you have a USB 1TB drive that weighs about 20oz, sounds like a file system question.
If you are wanting to access the disk remotely without carrying it around, that's different....


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - josuah - 17-08-2017

(17-08-2017, 07:48 AM)1Byte Wrote: Is this a file system question, or a server question?

Originally a filesystem question:

(16-08-2017, 02:04 PM)Nagase Iori Wrote: What file system would be best to use?

And the problem is:

(16-08-2017, 03:27 PM)Nagase Iori Wrote: the best way to have rw access to my external drive across those three operating systems.

And it is possible to carry the gears, avoiding intermediates (such as going through internet) for not slowing the traffic down.

Though, carrying HDD often may reduce their lifespan...


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - tudurom - 17-08-2017

You can use ntfs-3g, which is a FUSE filesystem for NTFS. It even supports writing. I've been using it for quite some time to share a disk with Windows and Linux and it works beautifully, very fast too. It should work on any OS that supports FUSE and has it installed.

Bonus benefit: you can use the external HDD with windows PCs.


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - Nagase Iori - 17-08-2017

(17-08-2017, 02:21 AM)josuah Wrote: portable server solution
>another machine dedicated to distribute a networked filesystem
That doesn't seem very practical/portable.
>no much bigger than an external hard drive
You said it yourself
>This would involve having another computer. A RaspberryPi or other ARM board, an old laptop
Carrying two laptops in my backpack doesn't seem very portable.
An rpi is indeed small, but if I'm going to use it outside of my home/apartment, I'd need a battery and at that point stops being practical.
>But I hate when solutions involve money.
Yeah, I really don't feel like spending money on something as trivial as this.
Having, for example, a GNU/Linux VM on *BSD to which I'd pass the external drive and access it's, let's say ext4 partition from *BSD via nfs seems a bit more practical and less bothersome than what you're suggesting and it'd cost no money at all.
But I'd rather just trust pizzaroll1 and use ext2.
>ZFS has great features and a lot of attention, but its license is not compatible with Linux's so it is not bundled with it.
I could just give up on OpenBSD and use zfs.
But I'd still be interested in the best way to use the external drive under all 3 OS's, just for the sake of it.

(16-08-2017, 09:26 PM)pizzaroll1 Wrote: Ext2 on OpenBSD is good enough, in my opinion.
I hope so, I feel like it may be my best option if for some reason I can't use ext4 through FUSE on OpenBSD.
>you didn't mention Windows, so this is perhaps not relevant
True.

(17-08-2017, 02:57 AM)kyberkhrime Wrote: FAT32 is really your best bet, as much as I hate it
I'd really hate it..
>Using ext2 on OpenBSD is like using Windows ME - you can do it, but nobody will pity you when you lose all your data.
ext2 seems like my best hope right now.
Did you hear of anything bad happening to someone just reading and writing to an ext2 partition under OpenBSD?
>What about using a cheap VPS or one of the cloud services out there (yes, even Dropbox is acceptable, given some precautions are taken)?
I already have an external drive, and I'll only have like 3 GB of bandwidth (from my phone) and going to places that have wifi would really be time consuming and bothersome.

(17-08-2017, 07:48 AM)1Byte Wrote: Is this a file system question, or a server question?
It's a "best way to share an external HDD between GNU/Linux, FreeBSD and OpenBSD" question, and when you take into account my circumstances, it almost comes down to a file system question (almost, because maybe there are some ways to go about that and not yet make it a file system question, like what josuah proposed (although that probably takes the external HDD out of account) and the VM thing I mentioned, or using FUSE like tudurom suggested).

(17-08-2017, 06:05 PM)tudurom Wrote: You can use ntfs-3g, which is a FUSE filesystem
FUSE seems promising.
>Bonus benefit: you can use the external HDD with windows PCs.
I don't really care about windows.
I'd prefer a better file system, like ext4.

Apparently I can use this
https://github.com/gerard/ext4fuse
to access an ext4 file system with FUSE on FreeBSD.
Should I expect this to also work fine on OpenBSD, since it does support FUSE?
It'd be nice if I could just use zfs and access it on GNU/Linux and FreeBSD normally and on OpenBSD through FUSE.
I found GNU/Linux packages like https://packages.ubuntu.com/trusty/otherosfs/zfs-fuse
but I didn't find the source code, the upstream homepage seems to be gone and even if I did find the code, idk if it'd work on OpenBSD.
Thoughts?


RE: How do I go about sharing an external HDD between GNU/Linux, FreeBSD and OpenBSD? - Nagase Iori - 20-08-2017

I'm an idiot; I didn't see that ext4fuse has read-only support.
I guess I'll just use ext2.