NFS to external USB drive

Discussion about using NAS on Linux and Unix OS.
Post Reply
Mayhem
Starting out
Posts: 18
Joined: Sat Jul 11, 2015 11:18 pm

NFS to external USB drive

Post by Mayhem »

So far I use my TS-453 only with the internal array that I access from Gentoo with NFS. No complaints about that.

But now I wanted to add an external USB HD and access that also through NFS as a simple fileshare. 2 screenshots of what I see in the control panel (loading as image doesn't work, "cannot determine size")
https://quirinus.one/gentoo/qnap_01.jpg
https://quirinus.one/gentoo/qnap_02.jpg

In the control panel I have done the following:
- the usb drive shows up as usb_wd
- I added my regular user and gave the permissions R/W
On the desktop pc:
- created a /mnt/nas_muziek directory
- made my user owner of the directory and gave it R/W permissions

If I look at the exported /folders for the nas:

Code: Select all

daw ~ # showmount -e x.x.x.x
Export list for x.x.x.x:
/video        
/usb_wd       
/homes        
/fotos        
/bibliotheek  
/Web          
/Recordings   
/Public       
/Multimedia   
/Download 
Now if I want to mount this on the desktop I always get

Code: Select all

daw /mnt # mount -t nfs x.x.x.x:/usb_wd /mnt/nas_muziek
mount.nfs: mounting x.x.x.x:/usb_wd failed, reason given by server: No such file or directory
I tried /usb_wd, /DEV3303_1, /DEV3303_1/usb_wd but always the same error.

What is wrong here? I seems as if I miss some setting somewhere. It does look like an NFS issue because if I use a windows laptop then I do see the directory and have access to it as expected.
User avatar
OneCD
Guru
Posts: 12161
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: NFS to external USB drive

Post by OneCD »

Mayhem wrote: Tue Sep 20, 2022 3:13 pm I tried /usb_wd, /DEV3303_1, /DEV3303_1/usb_wd but always the same error.

What is wrong here? I seems as if I miss some setting somewhere. It does look like an NFS issue because if I use a windows laptop then I do see the directory and have access to it as expected.
Mount your shares without specifying the leading slash, like this:

Code: Select all

mount -t nfs x.x.x.x:usb_wd /mnt/nas_muziek

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
FSC830
Experience counts
Posts: 2043
Joined: Thu Mar 03, 2016 1:11 am

Re: NFS to external USB drive

Post by FSC830 »

Afaik you cant share data from external devices!
The shares are always pointing to an internal data volume of the NAS.

At NAS: which psth is export "usb_wd" pointing to?
You can see this in share properties:
share_properties.png
BTW: masking the internal IPs is useless and complicates troubleshooting. :wink:

Regards
You do not have the required permissions to view the files attached to this post.
Mayhem
Starting out
Posts: 18
Joined: Sat Jul 11, 2015 11:18 pm

Re: NFS to external USB drive

Post by Mayhem »

OneCD wrote: Tue Sep 20, 2022 3:36 pmMount your shares without specifying the leading slash, like this:

Code: Select all

mount -t nfs x.x.x.x:usb_wd /mnt/nas_muziek
I get the same error in that case.
FSC830 wrote: Tue Sep 20, 2022 3:38 pm Afaik you cant share data from external devices!
If that is the case I have an issue... But why would this work when accessing with a windows laptop but not with a linux desktop using NFS?
At NAS: which psth is export "usb_wd" pointing to?
You can see this in share properties:
share_properties.png

BTW: masking the internal IPs is useless and complicates troubleshooting. :wink:
Path is /DEV3303_1 on Volume "USB Disk 1".
FSC830
Experience counts
Posts: 2043
Joined: Thu Mar 03, 2016 1:11 am

Re: NFS to external USB drive

Post by FSC830 »

:'

I cant create a share to an external device!?
If its running at your site with SMB then nfs should work also.
Is in share properties nfs any IP range excluded or allowed that matches IP of your host?

Regards
FSC830
Experience counts
Posts: 2043
Joined: Thu Mar 03, 2016 1:11 am

Re: NFS to external USB drive

Post by FSC830 »

Did some testing here...

I can create a shared folder to the external USB drive by adding the path manually in shared folder tab.
Here is how it looks in CLI:

Code: Select all

[master@TS473-01 ~]$ mount | grep -i sdf
/dev/sdf1 on /share/external/DEV3303_1 type vfat (rw,utf8,dmask=0000,fmask=0111,shortname=mixed)
[master@TS473-01 ~]$
[master@TS473-01 ~]$
[master@TS473-01 ~]$ ls -al /share/external/DEV3303_1
total 144
drwxrwxrwx 10 admin administrators 16384 1970-01-01 01:00 ./
drwxrwxr-x 32 admin administrators   640 2022-09-20 07:20 ../
drwxrwxrwx  3 admin administrators 16384 2021-12-15 03:24 .antivirus/
drwxrwxrwx  4 admin administrators 16384 2022-09-20 12:02 Backup 1.qdff/
drwxrwxrwx  4 admin administrators 16384 2022-09-20 08:05 NASsync/
drwxrwxrwx  2 admin administrators 16384 2021-09-20 19:58 .qsync/
drwxrwxrwx  2 admin administrators 16384 2013-09-13 09:02 $RECYCLE.BIN/
drwxrwxrwx  2 admin administrators 16384 2018-03-21 09:13 .syncing_db/
drwxrwxrwx  2 admin administrators 16384 2021-12-23 10:17 .@__thumb/
drwxrwxrwx  2 admin administrators 16384 2022-09-20 12:02 .@upload_cache/
/dev/sdf1 is the external device, mountet in /share/external/DEV3303_1 at NAS

In shared folder creation I inserted this path:
share_properties_usb.png
I cant mount this share at my raspberryPi:

Code: Select all

root@pi64:/# mount 192.168.1.90:/test_usb /mnt
root@pi64:/# ls -al /mnt
total 12
drwxrwxrwx  3 root root 4096 Sep 20 11:13 .
drwxr-xr-x 26 root root 4096 Apr 28 15:38 ..
drwxr-xr-x  2 root root 4096 Sep 20 11:13 @Recently-Snapshot
But is does NOT show the content of the external device as seen at NAS!? Same in Filestation, the content is not reflected.
My guess is that a share is created but not referring to the USB drive but to an empty directory at Datavol1.

Regards
You do not have the required permissions to view the files attached to this post.
Mayhem
Starting out
Posts: 18
Joined: Sat Jul 11, 2015 11:18 pm

Re: NFS to external USB drive

Post by Mayhem »

I checked the network and security setting and nothing is excluded. I tried to create a shared directory. But I can only create one on the internal volume, not on the external disk.

Think I'll give up. I just don't understand what you can do with those usb ports.
FSC830
Experience counts
Posts: 2043
Joined: Thu Mar 03, 2016 1:11 am

Re: NFS to external USB drive

Post by FSC830 »

There are more options:
connecting external devices for backups
connecting a UPS
connecting ...

I did never try to setup a share at an external device and I am rather sure I missed something, at the other end I would never use an external drive for sharing data from NAS.

Regards

Edit: Got it and found my error, see viewtopic.php?t=154831 as an example.
Wasnt aware that the share is created automatically, no need for creating a new share.
In my case I need only to enable nfs access in share properties and was able to mount and access from raspberryPI:

Code: Select all

root@pi64:/home/pi# mount 192.168.1.90:/VIDEO_DISC /mnt
root@pi64:/home/pi# ls -al /mnt
total 148
drwxrwxrwx 10 root root 16384 Jan  1  1970  .
drwxr-xr-x 26 root root  4096 Apr 28 15:38  ..
drwxrwxrwx  2 root root 16384 Sep 13  2013 '$RECYCLE.BIN'
drwxrwxrwx  3 root root 16384 Dec 15  2021  .antivirus
drwxrwxrwx  4 root root 16384 Sep 20 14:02 'Backup 1.qdff'
drwxrwxrwx  4 root root 16384 Sep 20 08:05  NASsync
drwxrwxrwx  2 root root 16384 Sep 20  2021  .qsync
drwxrwxrwx  2 root root 16384 Mar 21  2018  .syncing_db
drwxrwxrwx  2 root root 16384 Dec 23  2021  .@__thumb
drwxrwxrwx  2 root root 16384 Sep 20 14:02  .@upload_cache
Post Reply

Return to “Linux & Unix (NFS)”