Properly mount external USB drive to ODroid HC2 running OMV

Moderators: odroid, mdrjr

Properly mount external USB drive to ODroid HC2 running OMV

Unread postby RossenH » Mon Mar 05, 2018 2:32 am

Hi guys,
I have an extremely simple question, but I can't seem to figure it out for at least 3 days. I have been searching for solution in the forums and on the wiki but with no success. The answer is probably something very trivial and I am beeing a complete noob, but this is driving me crazy.

I am using OMV on an ODroid HC2 and want to connect an external USB drive to the available port and transfer files in and out. I assume this is possible right? I read in the wiki that you should not connect a usb-powered external drive to the usb-port (probably because of power concerns) but that advice was for the HC1 and since the HC2 has much better power delivery I don't think that this should be an issue.

Anyways, when I connect the disk I can see it in the Files Systems menu and mount it. It correctly shows the free and used space. Here is a pic. It is about the NTFS drive marked in yellow.
Odroid OMV pic1.png
Odroid OMV pic1.png (17.71 KiB) Viewed 1563 times


And what should I do afterwards? I thought I am supposed to to add the drive in Access Rights Managment > Shared Folders. The problems is that I don't see the drive there:
Odroid OMV pic2.png
Odroid OMV pic2.png (37.64 KiB) Viewed 1563 times


The same thing when I try to add the drive as a Samba Share. Am I missing a step somewhere or is there a problem with my drive? Could it be because is NTFS formatted?
RossenH
 
Posts: 6
Joined: Mon Feb 26, 2018 4:08 am
languages_spoken: english
ODROIDs: Odroid HC2

Re: Properly mount external USB drive to ODroid HC2 running

Unread postby joshua.yang » Tue Mar 06, 2018 5:24 pm

To test, I formatted my 2.5 inch WD 500GB HDD as NTFS file system(using a command, e.g. mkntfs -f /dev/sdd1) and connected it to my HC2 via USB3.0 to SATA bridge board.
And I could see that the HC2 detects the NTFS external HDD. I could make a shared folder with that HDD and use it as a drive for Samba. :shock:

Screenshot from 2018-03-06 17-07-42.png
Screenshot from 2018-03-06 17-07-42.png (46.41 KiB) Viewed 1527 times


Screenshot from 2018-03-06 17-08-09.png
Screenshot from 2018-03-06 17-08-09.png (39.43 KiB) Viewed 1527 times
joshua.yang
 
Posts: 107
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: English
ODROIDs: XU4, XU4Q + Cloudshell2

Re: Properly mount external USB drive to ODroid HC2 running

Unread postby RossenH » Fri Mar 09, 2018 8:12 am

Yes, that is how it is supposed to work. Apparently there is something different in my case. Or something that I did wrong. Could it be that you formatted your drive under linux and mine was formatted on a windows machine and has data on it?

When I SSH-ed in the device I could see the drive mounted and accessible. I was able to read from it and write to it. The problem is that since it's SSH the speed I got was about 1.5 MB/s :D
screenshot.png
screenshot.png (27.24 KiB) Viewed 1502 times


I tried mounting the drive manually with "mount -t ntfs" to a different folder than the default. It worked but I still cant see the drive in the "Shared Folders" menu. Could this be a permission issue?
RossenH
 
Posts: 6
Joined: Mon Feb 26, 2018 4:08 am
languages_spoken: english
ODROIDs: Odroid HC2

Re: Properly mount external USB drive to ODroid HC2 running

Unread postby joshua.yang » Fri Mar 09, 2018 10:07 am

Actually, OMV doesn't recommend to use NTFS file system for a data storage devices.
The NTFS formatted HDD is too too slow on the Linux system and it doesn't support OMV's several features like ACL since NTFS is not POSIX compatible.
Please refer to: https://forum.openmediavault.org/index. ... d-Folders/
So I recommend to format that HDD to EXT4 file system after backup the whole data on it.

Maybe this issue is also caused due to that reason :)
joshua.yang
 
Posts: 107
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: English
ODROIDs: XU4, XU4Q + Cloudshell2

Re: Properly mount external USB drive to ODroid HC2 running

Unread postby rooted » Fri Mar 09, 2018 12:00 pm

Mount the NTFS drive with the "big_writes" option, it will be much faster.
User avatar
rooted
 
Posts: 5883
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: Properly mount external USB drive to ODroid HC2 running

Unread postby RossenH » Sat Mar 10, 2018 12:50 am

@joshua.yang Yes, this seems like it would be the ideal solution. The problem is that I have a lot of drives and usb sticks that are ntfs formatted. And in the future whenever someone gives me some large files on a stick I want to just plug it in and copy the files to my ODroid. Also your test proved that it was working fine with ntfs drives. I am starting to think that I may have messed something with OMV. For example I have installed and used the "Reset Permissions" plug-in to fix some problems I had with Transmission not having the right to write to a shared folder.

@rooted I used the following syntax to mount the drive:
Code: Select all
mount -t ntfs-3g -o big_writes /dev/sda1 /srv/SeagateExpansion

The transfer speed only increased from 1.5 to 1.75 MB/s. Have I used it wrong? I am coppying via WinSCP.
RossenH
 
Posts: 6
Joined: Mon Feb 26, 2018 4:08 am
languages_spoken: english
ODROIDs: Odroid HC2

Re: Properly mount external USB drive to ODroid HC2 running

Unread postby odroid » Mon Mar 12, 2018 10:11 am

How is the transfer speed if you use "Samba" instead of "winscp"?
As we tested, we could see 20~25MB/sec with a USB 2.0 connected storage.
User avatar
odroid
Site Admin
 
Posts: 29097
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Properly mount external USB drive to ODroid HC2 running

Unread postby RossenH » Tue Mar 13, 2018 7:25 am

odroid wrote:How is the transfer speed if you use "Samba" instead of "winscp"?
As we tested, we could see 20~25MB/sec with a USB 2.0 connected storage.


My problem is exactly that I can not use Samba with the external drive as I described in the first post. I don't doubt that the speed would be much higher. And 25 MB/s over USB 2, sounds amazing. The drive is USB 3 and I only get around 30-40 MB/s when connected to usb3 port on my laptop.

I am sure that if I install a fresh image of OMV, that would solve my problem but I have so many services and accounts already set up that I don't want to start from scratch. Kinda want to troubleshoot what I did or I am doing wrong. Is it possible to mount the drive and add it as a samba share over the terminal?
RossenH
 
Posts: 6
Joined: Mon Feb 26, 2018 4:08 am
languages_spoken: english
ODROIDs: Odroid HC2

Re: Properly mount external USB drive to ODroid HC2 running

Unread postby joshua.yang » Tue Mar 13, 2018 12:00 pm

RossenH wrote:I am sure that if I install a fresh image of OMV, that would solve my problem but I have so many services and accounts already set up that I don't want to start from scratch. Kinda want to troubleshoot what I did or I am doing wrong. Is it possible to mount the drive and add it as a samba share over the terminal?


Yes you can use Samba with mounted drives like doing on another Linux system but you can't manage it on OMV Web GUI.
And I'm not sure it wouldn't affect with bad behavior to the system.

Just follow this steps.
1. Insert a USB drive (It seems it doesn't matter whatever the file system of the drive)
2. Connect to your OMV via SSH
3. Find out the path of the inserted drive and copy that
Code: Select all
$ ls -al /srv
total 28
drwxr-xr-x   1 root root     258 Mar 13 11:45 .
drwxr-xr-x   1 root root     174 Mar  9 18:00 ..
drwx--x--x+ 20 root users   4096 Mar 12 18:49 dev-disk-by-id-ata-WDC_WD5000LPVT-08G33T1_WD-WX41A92R8771-part1
drwxrwxrwx   1 root root    4096 Mar 13 11:42 dev-disk-by-id-usb-SanDisk_Ultra_4C531001470220107443-0-0-part1
drwxr-xr-x   1 ftp  nogroup   22 Nov 23 18:46 ftp

4. Add a new Samba shared directory by referring to pre-defined(by OMV) setups. This is an example.
Code: Select all
$ sudo vi /etc/samba/smb.conf
# move to end of the file
...
#======================= Share Definitions =======================
[USB]
path = /srv/dev-disk-by-id-usb-SanDisk_Ultra_4C531001470220107443-0-0-part1
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects =
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = "odroid"
invalid users =
read list =
write list = "odroid"

5. Restart Samba service.
Code: Select all
$ sudo service smbd restart

6. Done
joshua.yang
 
Posts: 107
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: English
ODROIDs: XU4, XU4Q + Cloudshell2


Return to Other OS

Who is online

Users browsing this forum: No registered users and 3 guests