Setting Up An Amahi Home Server – Adding a Drive To Your Server [Linux]

   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]Last week, I introduced you to the Amahi home server and talked about why you might want to set up a home server at all and all the great things it could do on your network. Unfortunately, we didn’t have time to go into some of the advanced setup and additional features, so let’s take a look at those today.

Specifically, we’ll be adding a drive or two into the server, and changing the horrible default theme. Warning: There is a tiny bit of command line work involved, but I’ve simplified things and found a GUI alternative wherever possible.

Changing Your Home Server Theme With The App Gallery

Let’s face it – the basic theme built into your Amahi install is pretty ugly. Like all great things (read: the iPhone) – there’s an app for that. Take a look at the app gallery by opening up your HDA through the web interface (http://hda), or by clicking the Amahi dashboard icon on your server desktop. Click on the Apps link in the top right, and you’ll be taken straight to the app tab of the setup page. Unless you’ve already explored the app directory and had a go yourself, you’ll probably be greeted by this message:

1 install apps   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]

You can either click on the Available link or the blue + icon to browse the apps. For now, let’s choose the Agedashi Theme, click to expand it, and click on the big install button:

2 install agedashi theme install   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]

After installing, a large link to Manage Themes should appear – click that to take you directly to the appropriate setup tab. You should see two thumbnails now, so click on the second one for Agedashi and your dashboard will instantly transform into something a little nicer, like so:

3 select agedashi thumbnail   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]

I’ll show you some of the more interesting apps in a future article, but let’s move on to more important things.

Adding An Additional Hard Drive

The first thing I wanted to do was to add some of the mountains of spare drives I have into the server and make them useful. Unfortunately, the process is far from plug-and-play level of easy. Take note Amahi developers – you really need to sort this out. The average user might have made it this far, but given how important the simple function of managing drives is in a server, you would really hope it was easier. Anyway, here’s how I managed it:

  • Shut down and physically install the drive into your system. Getting it correctly plugged in is beyond the scope of this article, so I’m going to assume you know how to do this.
  • Turn your system back on, make sure the drive is recognized, then log into your Amahi server (not remotely – use the keyboard and monitor actually attached to the server). On the desktop, click on Applications -> System Tools -> Disk Utility.
  • On the left hand side, you should see all the drives in your system. Click on the drive you will be adding, and as the screenshot shows, the small erase icon on the right end of the toolbar. You’ll need to authenticate with your root password.
  • 4 erase hd   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]

  • Next, click on the xxGB Unrecognized smaller drive icon beneath the main drive that now reads Unknown or Unused. You should see the following screen:
  • 5 create new partition table   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]

  • At the bottom, where it says Create Partition Table, select the type Master Boot Record and click the Create button directly beneath.
  • The main drive icon should now indicate “MBR Partition Table“, but beneath it will say xxGB Free. Click on the smaller icon beneath again, and the Create Partition screen should appear as the screenshot below shows. Label it whatever you want, select the Type to be Linux Ext4, make sure Take ownership of filesystem is ticked, then click Create
  • 6 unallocated space again   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]

  • At this point, it might look like nothing happened, but it’s currently working. If you click on that small partition icon again, you will see it is in the process of formatting your drive as you requested. Leave it to do its work.
  • 7 creating file system   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]

  • Next we will need to get our hands dirty in the terminal. Launch it from the Applications -> System Tools -> Terminal menu.
  • Type su - (s u space dash), Enter, and type in your password. Next, type hda-diskmount (hda dash diskmount, no spaces), and hit Enter again. You will see something similar to the following:
  • 8 copy this line hda diskmount stuff   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]

  • Don’t close the window, as we need to edit a little file first. Copy the line I highlighted above, the one beginning with UUID. (Right click -> copy). Don’t forget the line continues onto the next line and ends with “defaults 1 2“. You must copy the whole thing.
  • From the terminal, type gedit and hit Enter. This will bring up a standard gedit window, which is basically a text editor. Use the Open button, select Filesystem from the left hand side, then open the folder “etc“, and the file named “fstab“.
  • Paste the line you copied onto the last line of the file. You can see in the screenshot below I already did one earlier, so now I have two.
  • 9 copy into fstab   Setting Up An Amahi Home Server   Adding a Drive To Your Server [Linux]

  • Save the file, close gedit, and restart your system from System -> Shutdown -> Restart.

That’s it – if you go to the storage tab of the Amahi Setup page, you should see your total storage has now increased.

In my next article, I’ll show you how to set up file duplication using the Greyhole storage pool, which allows you to duplicate certain sets of files across 2 or more drives for the ultimate in redundancy – if one drive fails, you’ll still have copies of the file on other drives. Stay tuned, and remember to ask if the comments if you’re having issues and I’ll my best to help.

The comments were closed because the article is more than 180 days old.

If you have any questions related to what's mentioned in the article or need help with any computer issue, ask it on MakeUseOf Answers—We and our community will be more than happy to help.

16 Comments -

ubuntuandstuff

Let’s get some people working on an ubuntu based version! This is really amazing!

http://www.ubuntuandstuff.blogspot.co...

ubuntuandstuff

Let’s get some people on an ubuntu version!

http://www.ubuntuandstuff.blogspot.co...

Alan

I was banging my head on the desk until I found this article. In fact, I was having such a hard time, I was considering blowing it all away and trying (WHS) windows Home Server. Thanks so much for making this much clearer. Looking forward to your next article,”file duplication using the Greyhole storage pool” Hope it’s soon

Alan

James Bruce

Thanks for your kind words Alan and glad to be of service. The final article in the series on Greyhole and file duplication has actually already been published here:

http://www.makeuseof.com/tag/a

I’ll edit the article to add a link to it now. Thanks~!

Alan

I was banging my head on the desk until I found this article. In fact, I was having such a hard time, I was considering blowing it all away and trying (WHS) windows Home Server. Thanks so much for making this much clearer. Looking forward to your next article,”file duplication using the Greyhole storage pool” Hope it’s soon

Alan

Bill

Thank you, James, for your good Amahi tutorials. I just started my own Amahi HDA on an old Dell Inspiron 2600 laptop – it was just gathering dust in a closet. Its tiny hard drive is filling up fast, so I’ll be adding an external drive via USB. My question is: will the added drive(s) automatically get HDA created folders for music, movies, and so on? If so, must I then browse files “by the drive” or will Amahi give me a list of all movies as if they are all in “one place”? I’ve been copying my media files directly into the appropriate directories in the “var” folder. Is there a more elegant way to add files to the HDA? Thanks again!

Bill

James Bruce

A few points:

– USB drives in Amahi are a little dodgy because of something to do with their ID changing with every restart, so it would be like removing a drive then adding a new one every time.

– You shouldn;t be copying directly to any part of the file system – use the HDA network shares which you can access from any networked computer. If you’re copying files over gigabit ethernet backend, there should be no problem. Just use windows network neighbourhood to find the HDA server, and open up the various shares.

If you follow the tutorial I wrote, the USB drive SHOULD be added to the pool, and you will simply notice that your total storage space has increased regardless of where it comes from, the same way you would with an internal drive. However, I’m afraid I don’t know exactly what problems would arise from it being a USB drive. I think you will be fine, so long as you don’t up a complicated Greyhole pooled storage system for file redundancy. (from the next article in the series: http://www.makeuseof.com/tag/amahi-home-server-setting-file-duplications-exploring-app-store/ )

Bill

James, thank you so much for your words of wisdom! Will it make a difference (as far as hard drive ID ‘stability’) if I use a different bus (like eSATA)? Or do the additional drives really need to be internal? I have 3 500Gb G-Raid drives with multiple connectivity options. I guess I’ll be needing 100% up time on my old Dell…
Thanks again!

James Bruce

As far as I’m aware from looking at the hardware I have around me, e-SATA would be treated exactly the same as internal SATA drives, the only difference is in the connector. So you should be fine with that, assuming your laptop will take eSata – I’m guessing you will need to buy some kind of pcmcia e-SATA adapter or something?

Compared to running a full server 24/7 , a laptop is an excellent low power choice.

Bill

Thanks again, James! Because the Dell only has built-in USB 1.1 ports, I was planning on getting a pcmcia card for the laptop with USB 2.0 ports, but now I’ll be going with an eSATA pcmcia card for sure. Now I just have to hope Fedora 14 will “see” the card (and support connectivity through it).

BTW, I was googling around on the issue of “changing” USB Drive ID numbers, and saw this:
USB device IDs
When you attach a USB mass storage device, the system assigns the device a USB device ID. (USB device IDs are only assigned to USB storage devices, not to non-storage devices like mice and keyboards.) USB device IDs are determined by the order in which the system detects each device. However, the enumeration of devices depends on several factors and different circumstances may result in different device ID assignments on the same machine. For example, devices that you attach to a running system are enumerated in the order that you plug them in. At boot time, however, the entire USB hub/device tree is traversed and devices may be detected in a different order, resulting in different device ID assignments. In general, these guidelines apply:

* if you attach all of your USB storage devices while the system is turned off, the enumeration order when the computer is started will likely persist between system reboots.

* if you hot-add or hot-remove USB storage devices, device IDs may change when the system is rebooted.

* if you add, remove, or change the order of USB storage devices on a non-running system that previously contained USB storage devices, device IDs may be different when the system is rebooted.

END QUOTE
I saw this posted on http://osr600doc.sco.com/en/manHW/usb.HW.html
which is a site devoted to UNIX, I think. Using USB seems like a bit of a gamble with Amahi so I’ll be sticking with eSATA (provided I can find a supported pcmcia card).

The power consumption issue was not something I had considered- but is a point well-taken. Thanks for mentioning it. And thanks in general…

Bill

James Bruce

A few points:

- USB drives in Amahi are a little dodgy because of something to do with their ID changing with every restart, so it would be like removing a drive then adding a new one every time.

- You shouldn;t be copying directly to any part of the file system – use the HDA network shares which you can access from any networked computer. If you’re copying files over gigabit ethernet backend, there should be no problem. Just use windows network neighbourhood to find the HDA server, and open up the various shares.

If you follow the tutorial I wrote, the USB drive SHOULD be added to the pool, and you will simply notice that your total storage space has increased regardless of where it comes from, the same way you would with an internal drive. However, I’m afraid I don’t know exactly what problems would arise from it being a USB drive. I think you will be fine, so long as you don’t up a complicated Greyhole pooled storage system for file redundancy. (from the next article in the series: http://www.makeuseof.com/tag/a… )

Bill

James, thank you so much for your words of wisdom! Will it make a difference (as far as hard drive ID ‘stability’) if I use a different bus (like eSATA)? Or do the additional drives really need to be internal? I have 3 500Gb G-Raid drives with multiple connectivity options. I guess I’ll be needing 100% up time on my old Dell…
Thanks again!

James Bruce

As far as I’m aware from looking at the hardware I have around me, e-SATA would be treated exactly the same as internal SATA drives, the only difference is in the connector. So you should be fine with that, assuming your laptop will take eSata – I’m guessing you will need to buy some kind of pcmcia e-SATA adapter or something?

Compared to running a full server 24/7 , a laptop is an excellent low power choice.

Bill

Thanks again, James! Because the Dell only has built-in USB 1.1 ports, I was planning on getting a pcmcia card for the laptop with USB 2.0 ports, but now I’ll be going with an eSATA pcmcia card for sure. Now I just have to hope Fedora 14 will “see” the card (and support connectivity through it).

BTW, I was googling around on the issue of “changing” USB Drive ID numbers, and saw this:
USB device IDs
When you attach a USB mass storage device, the system assigns the device a USB device ID. (USB device IDs are only assigned to USB storage devices, not to non-storage devices like mice and keyboards.) USB device IDs are determined by the order in which the system detects each device. However, the enumeration of devices depends on several factors and different circumstances may result in different device ID assignments on the same machine. For example, devices that you attach to a running system are enumerated in the order that you plug them in. At boot time, however, the entire USB hub/device tree is traversed and devices may be detected in a different order, resulting in different device ID assignments. In general, these guidelines apply:

* if you attach all of your USB storage devices while the system is turned off, the enumeration order when the computer is started will likely persist between system reboots.

* if you hot-add or hot-remove USB storage devices, device IDs may change when the system is rebooted.

* if you add, remove, or change the order of USB storage devices on a non-running system that previously contained USB storage devices, device IDs may be different when the system is rebooted.

END QUOTE
I saw this posted on http://osr600doc.sco.com/en/ma
which is a site devoted to UNIX, I think. Using USB seems like a bit of a gamble with Amahi so I’ll be sticking with eSATA (provided I can find a supported pcmcia card).

The power consumption issue was not something I had considered- but is a point well-taken. Thanks for mentioning it. And thanks in general…

Bill

Pool Installation

I’m so love this blog, already bookmarked it! Thanks.