SOLVED: Add External Hard Drive to HDA

caizizuofang
Posts: 46
Joined: Sun Jul 20, 2014 8:10 am

SOLVED: Add External Hard Drive to HDA

Postby caizizuofang » Tue Aug 05, 2014 3:36 pm

Hi experts - I have an external hard drive to be mounted to HDA. When the HDA was set up, this external drive hasn't been wired to HDA. I went through a bunch of posts but still have some confusions.

1) What's the best practice to add external hard drive to HDA? Manually install it or by leveraging Greyhole GUI? Please recommend.
2) I'm personally not reluctant to do installation by Greyhole. But do I need to do another partitioning? I remember I did it once when I set up the HDA.
3) Some files are still in this external drive which I want to keep them. Will those files be erased if I mount the drive?

Thanks in advance.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Add External Hard Drive to HDA

Postby bigfoot65 » Tue Aug 05, 2014 3:47 pm

Recommend you use our new Disk Wizard.
https://www.amahi.org/apps/disk-wizard

You can mount drives with existing data or format them.

Using Greyhole is optional, your choice.
https://www.amahi.org/apps/greyhole-ui
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

caizizuofang
Posts: 46
Joined: Sun Jul 20, 2014 8:10 am

Re: Add External Hard Drive to HDA

Postby caizizuofang » Tue Aug 05, 2014 4:26 pm

This disk wizard satisfies my needs. I got the path /var/hda/files/drives/ehd1 . I'm wondering how to migrate my existing shares, especially movies to this new location? Thanks.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Add External Hard Drive to HDA

Postby bigfoot65 » Tue Aug 05, 2014 4:28 pm

Just move the folders to the new location. You will then need to update the path in the shares tab for each in the dashboard.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

caizizuofang
Posts: 46
Joined: Sun Jul 20, 2014 8:10 am

Re: Add External Hard Drive to HDA

Postby caizizuofang » Tue Aug 05, 2014 4:46 pm

Basically, I need to move the share folders from my current HDA internal drive to the external drive.
I don't want to be annoying, but still get a couple of questions.
1) I installed the Shell in a box. This file relocation has to be done via command? Any user interface available to do this?
2) I need to reconfigure other HDA apps such as Plex in order to locate new folders.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Add External Hard Drive to HDA

Postby bigfoot65 » Tue Aug 05, 2014 4:55 pm

Not a problem. This does need to be done command line. There is no user interface. The syntax is as follows:

Code: Select all

cp -r /var/hda/files/share /var/hda/files/drives/ehd1
Once you are finished, ensure the ownership permissions are set correctly.

Code: Select all

chown -R 1stadminuser:users /var/hda/files/drives/ehd1/share
Replace 1stadminuser with the your 1st admin user name on the HDA.

To be safe, recommend copy to the new drive. Then once you verify all is ok, you can delete the old share.

Code: Select all

rm -rf /var/hda/files/share
Ensure you verify the path before you do the last bit as one mistake could be disastrous.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

caizizuofang
Posts: 46
Joined: Sun Jul 20, 2014 8:10 am

Re: Add External Hard Drive to HDA

Postby caizizuofang » Tue Aug 05, 2014 7:06 pm

By referencing your instruction, I tried to copy the shares from existing partition to the external drive by using

Code: Select all

cp -r /var/hda/files/share /var/hda/files/drives/ehd1
The system warns No such directory "/var/hda/files/share". Then I checked the HDA dashboard and found movies path is /var/hda/files without ending /Share. So I replaced source directory /var/hda/files/share with /var/hda/files and kept the same target directory.
However, the command results showed me that no space left but I'm pretty sure that external drive has 1 TB left. I double-checked and found the original HDA root partition only has 80M left.
Sooner after when I tried to log in HDA dashboard on browser, I got warning message "Application error: Rails application failed to start properly".
I'm thinking this may be because either copy process need storage buffer on original drive or the target directory was set up wrong. But on dashboard drive menu, I can see the mount path is /var/hda/files/drives/ehd1.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Add External Hard Drive to HDA

Postby bigfoot65 » Tue Aug 05, 2014 7:20 pm

Sorry, I should have mentioned it that you replace share with the name, i.e. movies. I thought you understood that share would need replaced with the respective name. If you moved the entire /var/hda/files are, you will break Amahi as you have discovered..

The folder drives needs to remain in /var/hda/files directory.

The path for each share is preceded by /var/hda/files. So for Pictures share, it's /var/hda/files/pictures.

I recommend you undo the move and start over moving each share individually. Hopefully it's not too late and you can get things sorted out. The dashboard should work after you move things back and then recommend you try restarting httpd.

Code: Select all

systemctl restart httpd
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

caizizuofang
Posts: 46
Joined: Sun Jul 20, 2014 8:10 am

Re: Add External Hard Drive to HDA

Postby caizizuofang » Tue Aug 05, 2014 7:46 pm

recommend you undo the move and start over moving each share individually.
Could you please clarify how to undo the move?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Add External Hard Drive to HDA

Postby bigfoot65 » Wed Aug 06, 2014 2:38 am

Since you did a copy, recommend you do:

Code: Select all

rm -rf /var/hda/files/share /var/hda/files/drives/ehd1
The files in /var/hda/files should still be in tact since you did not move, only copied.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 18 guests