Close

Step 3: Connecting and Configuring the External HDD

A project log for Linux Tutorial: Odroid U3 Server w/ Seafile Cloud

I posting this to give a feel for the Odroid U3. There is a forum but not a lot of documentation out there.

tlankford01tlankford01 08/06/2014 at 02:150 Comments

In this step we are going to connect the hard disk drive. Most of these drives have a management and security software on them. We will be eliminating this probably. Some of the new drives may boot right up and be available for immidiate use by the Odroid. My Maxtor was not. It is real simple to check. When you plug in the drive the Unbuntu Desktop should have a prompt to open in file manager. We want to see the drive path for later. In mine it boots in the home directory /media/odroid/OneTouch 4\Mini. We will be making changes including the drive name. you can even move where the drive mounts but this is fine for our purposes.

Next we will open a terminal.

Type the command:

cat /proc/mounts

this will give us a list of the drives that are mounted. We will ignore the ones that root or boot drives ending in mmc. We are looking for the drive that has /dev/sda*. The * is probably going to be a partition number 1. If there are multiple partitions mounted then we will see them listed in order. If you were to have a flash drive in also it would probably show up as /dev/sdb and so on.

Next we want to see if the drive is usable as it is formatted or if we are going to have to rewrite the drive.

Type the command:

sudo nano mkdir /media/odroid/OneTouch 4\Mini/test

You will be using the drive path that is you found in the file manager on the desktop and only adding "test" to make a file if it will write compatible with the Odroid. If you get a read only error then you will have to reformat which is a few simple steps. There are several ways to go about this but we are going to use a program called parted. Be very careful and pay attention to what you are doing. This can wreck not only the OS but he board as well so be very careful when working with the drive scripts.

First issue the command:

umount /dev/sda1

This will unmount the partition so that we do not get an in use error.

next type:

parted

this will start the parted program

Then type the command:

select /dev/sda

This is very important to make sure we are in the right drive. We do not want to mess with the boot drive at all.

Next we will type the command:

mklabel msdos

You will be prompted to give a name to the drive. I will call mine labserv since it is for a server for my laboratory.

next type the command:

mkpart

when prompted respond with the following answers

primary

ext4

0%

100%

This is the partition layout you can change these values if you wish to make multiple partitions but for our purposes here we will only be writing the one partition.

Type:

print

to check the partition has been written properly

and exit the editor by typing:

quit

We are almost finished making the drive work for our server. Let's write a file system to the partition.

Type the command:

mke2fs -v -L labserv -t ext4 /dev/sda1

This will write the file system to the drive. When this is done we can test it in a few moments.

Type:

umount /dev/sda

Then unplug the drive from the usb. Wait just a moment then plug the drive back in.

Check the file manager to see the drive path for the HDD. Mine now reads /media/odroid/labserv

Type the command:

mkdir /media/odroid/labserv/test

If there are no errors then we can remove the test folder by typing:

rm /media/odroid/labserv/test

Congratulations, we have formatted the drive and prepared the partition and file system for our use with the server. Shutdown the Odroid so that you can unplug the monitor and keyboard. This can be done through the gui or type the command in the terminal

sudo halt

Discussions