# USB Over LAN - Has Anyone Set This Up?

## fredbear5150

I have a Gentoo server at home that acts as both a SAMBA and NFS server to various Gentoo & Windows XP client machines with no real issues.

I've a number of USB external drives that I would like to plug into the server and to share over the network. Having experimented with NTFS formatted USB disks with varying degrees of success using NTFS-3G, I decided in the end to format them all to the "lowest common denominator" with FAT32 - using udev rules I can mount them where I like, allow users to mount the drives and everything works great.

However, what I'd now like to do is share the USB drives over the LAN and to do so cleanly. At the moment, I'm testing with NFS mounting them and this works provided that once the drives are plugged in, you leave them alone - even then, there are some strange issues with NFS where directories on a USB drive will "disappear" and sometimes I have to restart nfsmount on the client to get them back. I know this is a very "clunky" way of doing things and would like everything to work a bit more cleanly.

I've also noticed that on some drives, if I create the FAT32 filesystem on the drive as an NFS export, then my server won't reboot properly with the drive plugged in - it stops at the point in runs portmap so I assume that the server doesn't see the USB disk as an export filesystem at that point in the boot process.

I'm therefore trying to find a more elegant solution and the options I've looked at so far are:

1. Running a script from udev when a drive is plugged or unplugged to restart NFS/SAMBA

2. Installing the USB server from http://usb-server.com/ - but there's no ebuild for it.

Is there a nice elegant way of doing this other than using the two options above? I'd like to be able to share the USB drives to both Gentoo and Windows XP clients with NFS and SAMBA if possible.

----------

## Jaglover

Why not use some Linux native filesystem?   :Question:  Do you carry these drives around and plug into random computers?

----------

## fredbear5150

It is useful to be able to plug them into Windows machines occasionally - hence the FAT32 lowest common denominator.

However, although I've not used it in a while, I guess I could try Ext2 for Windows as an option.

After I posted the first message here, I came across http://usbip.sourceforge.net/ and did have a play around with that - it seems to do what I want to on Linux and whilst there is an early-stage Windows client, I couldn't get it to work properly.

----------

