Page 1 of 4
SOLVED: Add External Hard Drive to HDA
Posted: Tue Aug 05, 2014 3:36 pm
by caizizuofang
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.
Re: Add External Hard Drive to HDA
Posted: Tue Aug 05, 2014 3:47 pm
by bigfoot65
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
Re: Add External Hard Drive to HDA
Posted: Tue Aug 05, 2014 4:26 pm
by caizizuofang
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.
Re: Add External Hard Drive to HDA
Posted: Tue Aug 05, 2014 4:28 pm
by bigfoot65
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.
Re: Add External Hard Drive to HDA
Posted: Tue Aug 05, 2014 4:46 pm
by caizizuofang
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.
Re: Add External Hard Drive to HDA
Posted: Tue Aug 05, 2014 4:55 pm
by bigfoot65
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.
Ensure you verify the path before you do the last bit as one mistake could be disastrous.
Re: Add External Hard Drive to HDA
Posted: Tue Aug 05, 2014 7:06 pm
by caizizuofang
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.
Re: Add External Hard Drive to HDA
Posted: Tue Aug 05, 2014 7:20 pm
by bigfoot65
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.
Re: Add External Hard Drive to HDA
Posted: Tue Aug 05, 2014 7:46 pm
by caizizuofang
recommend you undo the move and start over moving each share individually.
Could you please clarify how to undo the move?
Re: Add External Hard Drive to HDA
Posted: Wed Aug 06, 2014 2:38 am
by bigfoot65
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.