Making external hard drives SMB shares

sharedfolders
storage
v7

(David Gordon) #1

When I first asked about NethServer here Hardware advice for new user Danb35 talked about mounting drives. I want to see if I can set this up. This will prove whether NethServer can replace my Mac OS X Server.

Quote…

Of those the second is probibly best, I’ve already installed and ZFS is for another day. I already have hard drives full of data. In my perfect world I just want to attach these to my NethServer and start sharing over SMB.

So all I need to do is have NethServer’s Shared Folders point at my hard drives.

Best way to go about that is… ?

Thanks


(Markus Neuberger) #2

Shared folders are located in /var/lib/nethserver/ibay so you may just mount your external drive, here’s a thread:


(David Gordon) #3

Many thanks @mrmarkuz. I’ve been searching to try and learn how to mount drives in Linux, if you know of a good resource, point me in its direction.

I have two problems, I don’t know Linux (I’m a Mac user but know how to use the command line a little) and I’m not sure if my setup will let me do what I want.

I have NethServer running on VirtualBox on a Mac mini. There are FireWire and USB drives physically connected and they show up in the macOS’s DIsk Utility.

But I don’t see them when I look via NethServer and I don’t know if I should

[root@neth /]# lsblk -p
NAME                             MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
/dev/sda                           8:0    0    8G  0 disk 
├─/dev/sda1                        8:1    0    1G  0 part /boot
└─/dev/sda2                        8:2    0    7G  0 part 
  ├─/dev/mapper/VolGroup-lv_root 253:0    0  6.2G  0 lvm  /
  └─/dev/mapper/VolGroup-lv_swap 253:1    0  820M  0 lvm  [SWAP]
/dev/sr0                          11:0    1 1024M  0 rom  

At a guess I’m going to say I need to be able to list the hard drives I want to access before I can mount them? Should I expect to see them listed somewhere?

Thanks


(Marc) #4

Yon can share USB drives from the host machine to the virtual guest. On the “VirtualBox Settings -> USB” you can add them through USB filters or, when a guest is running, attach it through the USB icon on the status bar.
The host machine might require to have VirtualBox Extension Pack to support additional functions (like support for USB 3.0).

Another option is to add a virtual USB controller with a virtual disk:
“Settings -> Storage -> Add new storage controller… -> Add USB controller”; then create a new virtual disk for this controller.

I didn’t try the first option with nethserver but used it for other desktop operating systems. I’ve used the second option (virtual USB controller) with Nethserver and had no problems.

For more information take a look at USB support on the Virtualbox Manual.


(David Gordon) #5

Yes, thanks. I decided to RTFM and have installed the VB Extension Pack (with help from this page https://www.megajason.com/2017/06/10/install-virtualbox-guest-additions-on-centos-7/ )

I think I’m progressing, I’m currently trying to mount the shared folder but…

[root@neth /]# mount -t auto Server_4TB /var/lib/nethserver/ibay/test
mount: special device Server_4TB does not exist

I think I’m close, just need to work out the correct name of my USB drive and/or its type for the -t option if auto is wrong.


(David Gordon) #6

Not just me having this trouble, how to fix https://stackoverflow.com/questions/28328775/virtualbox-mount-vboxsf-mounting-failed-with-the-error-no-such-device#29456128


(Marc) #7

VB Guest Additions are different than VB Extension Pack (VB downloads page). VB Extension Pack is to be installed on the host machine (Mac OS).
Check if some of this links help:


(Marc) #8

OK, glad you fixed it.