Can a NAS drive be mounted via USB to Linux server?

4

I have a qnap ts-412, and ideally I'd like to connect the NAS through a USB cable to my Debian server (no GUI) -- can I mount the NAS drive to this Linux server as a regular USB drive? Like for example:

mount -t ext3 /dev/sdb2 /mnt/usb

I have just bought the NAS, and literally only powered on to initialize the disks. Wanted to check before I proceed, in case I did something wrong or impossible.

Thanks.

Anthony Aykut

Posted 2012-02-15T13:49:12.193

Reputation: 43

Answers

2

As others already pointed out, your NAS most certainly cannot be used in USB slave mode.

However, if you would like full access to it, you can SSh into it.

Or you can mount it in your Debian server using sshfs.

apt-get install sshfs
mkdir /mnt/nas
sshfs admin@your.nas.name.or.ip:/ /mnt/nas

I do that so I can use a comfortable file manager (MC) and my usual shell configuration instead of what I would get in the NAS shell.

mivk

Posted 2012-02-15T13:49:12.193

Reputation: 2 270

This really helped; works perfectly - thank you! – Anthony Aykut – 2012-02-16T18:48:53.570

2

I have yet to see any NAS that support USB "slave mode". The information found when looking up the "qnap ts-412" doesn't suggest that this should be supported by the device.

If you want fast access to the storage from one or multiple machines I suggest that you invest in some networking hardware (cables, switch eg.) that support the highest transfer speed supported by the device.

When mounting the shares (using linux) you might also want to look into what protocol gives you the highest transfer speed for your typical scenario. Many devices support SMB/NFS/FTP/SFTP/AFP - and they may give different results.

Michael Banzon

Posted 2012-02-15T13:49:12.193

Reputation: 117

1

Depends on the NAS, I suppose, as most NAS devices I've used are independent computers meant to just share data out. The way to mount it is to see what protocol(s) it supports and connect that way.

Most NAS devices are Windows-compatible. So you create the share(s) you want and connect using samba to mount it on the Linux devices.

EDIT in looking up the device, it looks like it's targeted for home users to store information for home media (http://www.qnap.com/pro_detail_feature.asp?p_id=193) and it supports a lot of connection options. Your best bet is to use the SAMBA connection after configuring your shares and mounting it like that.

Bart Silverstrim

Posted 2012-02-15T13:49:12.193

Reputation: 1 755

Agreed. The purpose of a NAS is to make the data available over the network. The mount utility in linux should allow you to mount the shares using a number of protocols. For example, we have a Windows Server 2008 based NAS and to mount the shares on any of our Linux servers, I use the mount -t cifs command. – Safado – 2012-02-15T14:03:21.020