Miscellaneous

Excepts the process of building a NAS, it deals with the needed knowledge as NAS server administrator and the miscellaneous knowledge for trouble shooting when you're using NAS.

1. OMV Configuration

  • In the OMV image for ODROID XU/HC series, it corresponds to OMV_3_0_88_Odroidxu4_4.9.46 or above.
  • If it isn't through the router, it is recommended that uses another port number rather than well-known port 22. Select one between 1024 ~ 65535.

To use SSH with OMV, you must have some configs for it since it's been disabled by default for some security reasons. For example, one of them is that if the default SSH port and the account information have not been changed by the user, it can be a backdoor potentially.

You can permit root login for SSH connection but accessing SSH using root account is highly un-recommended for the same some reasons above. So you have to grant the SSH related permissions to your general OMV user account.

To archive it, go to OMV “User” menu.

Select a account for accessing SSH and click “Edit” button.
And go to “Groups” tab, check the items “ssh, sudo” like following screenshot.

Save and apply the changed.

2. SSH Connection

Linux has two environment for user, GUI(Graphic User Interface) and CLI(Command Line Interface).
GUI belongs with a graphical pictures to be displayed at a monitor, so you can manipulate the system with your mouse. But CLI shows totally text based display, you can manipulate the system with a command.

A server purposed system prefers CLI environment rather than GUI since that needs many resources. So a NAS like ODROID-HC1 has CLI environment.
As the reasons above, you should SSH access to CLI environment of the NAS to manage directly.

Generally, SSH has been installed on the general Linux distributions by default, and so is ODROID NAS (Ubuntu/OMV).
You need a appropriate program to access to the NAS using SSH. The users on a Windows system commonly uses Putty.

Download Putty and execute it.

Type your ODROID's IP to the “Host Name (or IP address)“ part, click the “Open” button.


The warning massage appears when you are connect for the first time. The message means you can not guarantee the safety because there is no SSH host key stored due to you haven't connected before. Simply click “Yes” and proceed.

Enter your account information, and the window similar to the below appears.

3. Copy default bash profiles

The user's home directory created by OMV didn't include the configs for using bash.
Simply copy the files in /etc/skel into your new home directory.

$ sudo cp /etc/skel/.* ~/
$ sudo chown {username}:users .*

And login again.

  • We will show you the simplest usage of each editor.

Since the CLI-based system can't uses the mouse, other text editor is required unlike Word and Notepad.
The text editors commonly used in Linux are vi and nano.

vi

  • vi has improved features version, vim. Install and use it to improve usability.
$ sudo apt-get install vim

1. Open

Enter following command to open or create a file.

$ vi textfile

2. Edit


vi has two modes of operation, insert mode and command mode. You can enter into insert mode through a shortcut associated with editing, you have to type “esc” to go back to command mode.
To enter into insert mode, type “i” key.

If you are in the insert mode, ”– INSERT –“ words always appears like screenshot above.
Now you can type everything, if you are done, enter “esc” key to go back from insert mode to command mode.

3. Save


Type ”:“ in command mode, then you can enter commands.
Type “w” here, and type “enter” key, it is saved with save massage.

4. Exit

Type ”:“ in command mode, and type “q”, “enter” to exit from there.
At this time, you should save or ignore any modifications to the file. You can save it by typing “wq”, ignoring the modification and quitting “q!”.

nano

1. Open

Enter following command to open or create a file.

$ nano textfile

2. Edit


It starts with editable status as soon as you open. You can move the prompt using arrow keys.

3. Save

Type “Ctrl + o” to save.

The save in nano is always “Save as”. Enter preferred name and the new file will be created or overwrite existed file.

4. Exit

Type “Ctrl + x” to quit. If the changes will be notified, it asks if you want to save edits.

if you want to, you will enter file's name like save process, but nano will be closed when you type “enter” key.

There will be several reasons, but you can check the scan range of Angry IP Scanner first.

Check Angry IP Scanner's IP scan range

Check currently your Angry IP Scanner's IP scan range.

Check your network information

You have to know the information of actually internet connected ethernet adapter.
In Windows PC, type “Windows + R” key and it appears “Execute” window, enter “cmd”.
And type “ipconfig”.

You have to check ethernet adapter. Commonly, the adapter written as “Ethernet adapter” is your real internet connected ethernet adapter.
See your default gateway, and set Angry IP Scanner's IP Range. For example, if default gateway is “192.168.50.1”, you set the range as “192.168.50.0 ~ 192.168.50.255”.
If it is the same already, you can try using other's default gateway.

  • It's only applied if subnet mask is “255.255.255.0” due to the last octet is 0 ~ 255. If your subnet mask isn't “255.255.255.0”, you have to calculate yourself with your subnet mask.

Unsolved

If it isn't solved yet, another expected cause is that:

  • If you have multiple ethernet ports in use.
    • Check if what ethernet port(internal network) has the ODROID NAS.
  • If the computer and ODROID are not connected to same internal network.
    • Check if where the computer and ODROID are connected.
  • If it has poor contact or malfunction physically.
    • Check LAN cable or ethernet port/connector.
  • If it has network configuration error or OS related error.
    • Try again after creating a new boot microSD card.
  • ODROID related error such as boot fail, ethernet port malfunction, etc.
    • Contact us and send your ODROID.
  • And so on.
  • Your all data will be removed when you change the file system.

NTFS file system which is commonly the default file system of new external HDD is not appropriate for use on OMV NAS due to it is made for Windows OS.
OMV recommends ext4 file system, so if you want to use all the features such as ACL(Access Control List), and want reliability with high performance, you should newly format your HDD to make it ext4.
This is a guide that delete an existing file system and create a new file system via OMV Web GUI.

1. Delete an existing file system

  • This is only necessary if the existing HDD(or external one) has a file system other than ext4, or you want to format it for several reasons.

Go to the OMV “File Systems” menu.

The mounted HDDs will be listed in ”/dev/sd*” format.
Select the HDD that you want to change file system, click the “Unmount” button.
And click the “Delete” button.

2. Create a new file system

Click the “Create” button in “File Systems” menu.
Select a physical drive that you want to create a new file system, select “EXT4” for the “File system”, then click “OK” button to proceed.

If you're done, click the added entry and click “Mount” button. Now you can use newly ext4 file system HDD.

  • It is necessary for Intermediate level or above(not only installing the each service but also applying domain/SSL).

Nginx is fast and light web server program, and MySQL is free relational database management system.
They are commonly used program for construct a website, OMV helps to install/manage these programs as a plugin.

Nginx Installation

Go to the OMV “Plugins” menu and search for Nginx, install it.
After that, go to the “Nginx (websites)“ menu.

Enter 128 for the “Server names hash bucket size” and check enable option as shown screenshot above. And save.

MySQL Installation

Go to the OMV “Plugins” menu and search for MySQL, install it.
After that, go to the MySQL menu.

Copy and paste contents below into the “Extra options” as shown screenshot above.

character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

Check the “Enable” options in “General settings” and “SQL management site”, and save.

And specify root's password through click the “Reset Password” button.

  • Remote Linux system for backup is required. If not, the another mounted HDD can be used for using Rsync.
  • A Knowledge about Linux is required.

Rsync is a utility providing the features such as transporting files and synchronization with another computer system on remote/local.
It is recommended to use Rsync's synchronize feature for backup your important data into another place.
This guide uses SSH for authentication, and deal with the method for connection from local to remote.

1. Local configuration

Create a SSH authentication key pair

When Rsync attempts to connect from local to remote using SSH, it uses SSH key rather than enter password.
Click the “ADD” - “Create” button at the OMV “Certificates” - “SSH” menu to create a new SSH authentication key.
Click the new added key entry, and click “Edit” button. Copy “Public key” from the edit window.

2. Remote configuration

1) Install Rsync package

The Rsync package must be installed on remote system, so install Rsync if it isn't installed yet.

$ sudo apt-get install -y rsync

2) Save SSH public key of the local system

After connection using SSH, enter following commands to save the public key of the local system in the specific path.

$ PUB_KEY='{Public key}' # example) PUB_KEY='ssh-rsa AAAAB3N ... VDhDd Rsync'
$ echo $PUB_KEY > ~/.ssh/authorized_keys

3) Create a directory that Rsync will synchronize

Create a new directory to synchronize local's data using Rsync.

$ sudo mkdir -p /path/to/sync # Write your own path to sync with your NAS

3. Rsync settings

In the local system(OMV NAS), go to the “Rsync” - “Jobs” menu.
Click “Add” button to add a new Rsync job.

Fill it out like the screenshot above.
Type {ACCOUNT@IP}:{PATH} format into the “Destination server” part.
For example, if the remote IP is “100.100.100.100”, and user name is “odroid”, and if you want to synchronize with ”/path/to/sync” path, you can type “odroid@100.100.100.100:/path/to/sync”.
And once you save, Rsync job addition will be done. Automatic data synchronization will be performed every specific period(10 minutes in the screenshot).

  • A Knowledge about Linux is required.

The Plex provided by OMV plugin might be out of date. It's because the plugin is only for the connection between Plex and OMV Web GUI.
So, sometimes the users should update their Plex manually.

1. Stop enabled Plex service

Go to the OMV “Plex Media Server” menu and disable it, and save.
After connection via SSH, enter the following command.

$ sudo service plexmediaserver stop

2. Download the latest Plex for ARM and install

Download the latest Plex for ARM linked below.
https://dev2day.de/pms/pool/main/p/plexmediaserver-installer/
Copy the “plexmediaserver-installer …“ file's link of the screen.
And after SSH connection, enter the following commands to download and install.

  • The version here might be different from real latest version so you would check the latest version by accessing the site.
# If the link below doesn't work, copy the download link and paste it manually.
$ sudo wget https://dev2day.de/pms/pool/main/p/plexmediaserver-installer/plexmediaserver-installer_1.8.1.4139-c789b3fbb-1_armhf.deb
# The file name might be different from yours.
$ sudo dpkg -i plexmediaserver-installer_1.8.1.4139-c789b3fbb-1_armhf.deb

3. Enable stopped Plex service

Go back to the OMV “Plex Media Server” menu, and enable and save.
If it is enabled already, just disable and enable again.

If there's no network interface, you cannot use the network related setups at the certain services like OpenVPN.

This screenshot is a part of the setup page of the OpenVPN service.

Add a network interface

Click OMV Network menu and then click Interfaces tab.
And click Add button.

Select name on the General settings tab. It might be eth0 as default.

Save and close the dialog. Then the result likes a screenshot below.

Check it

Back to the OpenVPN's setup page again, and you can check the added network interface.

  • A Knowledge about Linux is required.
  • There're a few limitations:
    • The user encrypted library/folder cannot be accessed using FUSE.
    • The directory which is mounted using FUSE is read only.
    • In Debian/CentOS, it can be accessed by only the “fuse” group's users.
    • More information

You may want to access files uploaded to Seafile directly from the server. But Seafile saves all files in split, you can't find out the files.
When you are going to access the complete files which is not split on SSH, and to backup your uploaded files using Rsync, you can refer to following method.

1. Create a directory that will be mounted

Since Seafile uses FUSE(Filesystem in Userspace), it should be mounted in specific directory using the file system that would collect the split files.

$ sudo mkdir -p /path/to/seafile-fuse

2. seaf_fuse.sh {mount point}

Go to Seafile installed path and execute “seaf_fuse.sh” file. At this time, you have to put the mounted directory path as a argument.

$ cd /path/to/seafile
$ sudo ./seaf-fuse.sh start /path/to/seafile-fuse

And when you go to the mounted directory, you can see the directories for each account.

$ cd /path/to/seafile-fuse


  • A Knowledge about Linux is required.

With Seafile, you can share your files through email and the administrator can receives the various email related to Seafile server operation.
It can be done with the SMTP server of the email service you are using.

1. (Gmail) Create App password

  • This guide uses Gmail. If you are going to use other email service, you may search how to use the SMTP server on that service.

Login into Gmail with your account.

Then go to “My Account” and go to “Sign-in & security” to “Signing in to Google”.

Click the “App passwords” at the “Password & sign-in method” section. If you can't click on that or it is disabled, you should proceed from “2 Step verification”.

When the app password generation window pops up, click “Select app” - “Other (Custom name)“ and enter appropriate name, create.

Copy “Your app password for your device” from the “Generated app password” window and paste it into anywhere temporary. You cannot see this password again.

2. Enable Seafile's email features

After connecting to SSH, open the configuration file with the following command.

$ sudo vi /path/to/seafile/conf/seahub_settings.py

Put the following at the end of the contents.

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '{Your email address here}'
EMAIL_HOST_PASSWORD = '{Your application password here}'
EMAIL_PORT = 587 
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER


Save and exit, and restart Seafile and Seahub services.

$ sudo service seafile restart
$ sudo service seahub restart