Difference between revisions of "Reconnect existing Greyhole storage pool"

From Amahi Wiki
Jump to: navigation, search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
'''NOTE:'''  For the procedures below, most will require '''root''' user privileges.
 +
 +
 
In order to speed up the entire process, you should backup the following files somewhere safe:
 
In order to speed up the entire process, you should backup the following files somewhere safe:
 
   /etc/greyhole.conf
 
   /etc/greyhole.conf
Line 8: Line 11:
 
Before re-installing Fedora/Ubuntu, please disconnect all data drives. This will prevent you from potentially destroying any data during the re-installation process. Then, install Fedora/Ubuntu and Amahi using our installation guide.
 
Before re-installing Fedora/Ubuntu, please disconnect all data drives. This will prevent you from potentially destroying any data during the re-installation process. Then, install Fedora/Ubuntu and Amahi using our installation guide.
  
* Ubuntu: http://docs.amahi.org/ubuntu-12.html
+
* [http://docs.amahi.org/ubuntu-12.html Ubuntu]
* Fedora: http://docs.amahi.org/fedora-19.html
+
* [http://docs.amahi.org/fedora-19.html Fedora]
 +
 
 +
 
 +
Next, connect your data drives back to your server, then use the contents of your previous ''/etc/fstab'' to mount your data drives in their old paths (hint: copy and paste the lines that have mount points in '''/var/hda/files/drives/''').
 +
 
 +
When you're finished, verify the mount points exist:
 +
ll /var/hda/files/drives
 +
 
 +
If they do not, you will need to create them (replace ''drive1'' with what was reflected in ''/etc/fstab''):
 +
mkdir -p /var/hda/files/drives/drive1
  
 +
Now you are ready to mount the drives with:
  
Next, connect your data drives back to your server, then use the contents of your previous /etc/fstab to mount your data drives in their old paths (hint: copy and paste the lines that have mount points in /var/hda/files/drives/). When you're finished, mount the drives with:
+
mount -a
  
{{Code|mount -a}}
+
If there any errors, <u>'''DO NOT'''</u> continue until they are resolved.
  
Note: This would allow you to remount the drives on the previous paths in your previous installation. For example, if you have one 1TB and one 2TB harddrive, and they were mounted as /var/hda/files/drives/drive1 and /var/hda/files/drives/drive2 repectively, it would be more efficient to remount your data drives on your new Amahi installation in the same locations. If you didn't backup your fstab, simply remount the drives like you were installing them for the first time:
+
:'''NOTE:''' This would allow you to remount the drives on the previous paths in your previous installation. For example, if you have one 2TB and one 3TB harddrive, and they were mounted as /var/hda/files/drives/drive1 and /var/hda/files/drives/drive2 repectively, it would be more efficient to remount your data drives on your new Amahi installation in the same locations. However, if you didn't backup your fstab, simply remount the drives like you were installing them for the first time using [[Adding_a_second_hard_drive_to_your_HDA#Mount_Hard_Drive|hda-diskmount]].
  
{{Code|hda-diskmount}}
+
<blockquote>{{Warning|Warning: Before you continue, you should check the ownership of the files and folders in /var/hda/files to ensure that it belongs to
 +
  1stadminuser:users
  
{{Warning|Warning: Before you continue, you should check the ownership of the files and folders in /var/hda/files to ensure that it belongs to
+
If not, this can be resolved by running the following commands as root:
  <user>:<group>
 
  
and not under 500:users. This can be resolved by running the following commands as root:
+
chown -R 1stadminuser:users /var/hda/files
 +
chmod -R g+w /var/hda/files
  
{{Code|chown -R 1000:users /var/hda/files
+
'''NOTE:'''  1stadminuser should be replaced with the primary user who has administration privileges on your HDA.  This is typically the first user created at install.
chmod -R g+w /var/hda/files}} }}
+
}}</blockquote>
  
 
Then this is what needs to be done:
 
Then this is what needs to be done:
  
* Enable "Advanced Settings" with the Amahi Dashboard: Setup &raquo; Settings.
+
* Go to Setup &raquo; and select [[Advanced_Settings|Enable Advanced Settings]] check box via the Amahi Dashboard
* Go to Setup &raquo; Shares &raquo; Storage Pool and check your pooled drives to add them to the pool.
+
* Add drives to Greyhole:<br />
* Re-create your original shares in the Amahi Dashboard: Setup &raquo; Shares.
+
:<u>Ubuntu</u>
**  You should make sure to select "Use Pool" and select the correct number of extra copies. If you don't remember all of your original shares, you can check your old /etc/greyhole.conf file (which includes the extra number of copies) or run the following:
+
:Go to Setup &raquo; Shares &raquo; Storage Pool and check your pooled drives to add them to the pool.
 +
:<u>Fedora</u>
 +
:If using [https://www.amahi.org/apps/greyhole-ui Greyhole UI], go to Setup &raquo; Drive Pooling &raquo; Partitions and check your pooled drives to add them to the pool (without the app, you will have to add them manually in ''/etc/greyhole.conf'').
 +
* Re-create your original shares in the Amahi Dashboard (see [[Storage_and_file_sharing|storage and file sharing]]:<br />
 +
:<u>Ubuntu</u>
 +
:You should make sure to select "Use Pool" and select the correct number of extra copies.  
 +
:<u>Fedora</u>
 +
:If using [https://www.amahi.org/apps/greyhole-ui Greyhole UI], go to Setup &raquo; Shares and select the shares to use the pool.  Also select the correct number of extra copies desired (without the app, you will have to add them manually in ''/etc/greyhole.conf'').
 +
 
 +
'''NOTE:'''  If you don't remember all of your original shares, you can check your old /etc/greyhole.conf file (which includes the extra number of copies) or run the following:
 +
 
 +
ls -1 /var/hda/files/drives/*/gh/ | grep -v : | sort -u
  
{{Code|ls -1 /var/hda/files/drives/*/gh/ <nowiki>|</nowiki> grep -v : <nowiki>|</nowiki> sort -u}}
 
 
* Run Greyhole's fsck command to rebuild your shares:
 
* Run Greyhole's fsck command to rebuild your shares:
  
{{Code|greyhole --fsck}}
+
greyhole --fsck
  
 
Until this completes, some of your files will be missing from your shares.
 
Until this completes, some of your files will be missing from your shares.

Latest revision as of 18:10, 9 August 2015

NOTE: For the procedures below, most will require root user privileges.


In order to speed up the entire process, you should backup the following files somewhere safe:

 /etc/greyhole.conf

and

 /etc/fstab

This will allow you to rebuild your Greyhole Storage Pool much faster without needing to rebuild all links in your share before they can be used.

Before re-installing Fedora/Ubuntu, please disconnect all data drives. This will prevent you from potentially destroying any data during the re-installation process. Then, install Fedora/Ubuntu and Amahi using our installation guide.


Next, connect your data drives back to your server, then use the contents of your previous /etc/fstab to mount your data drives in their old paths (hint: copy and paste the lines that have mount points in /var/hda/files/drives/).

When you're finished, verify the mount points exist:

ll /var/hda/files/drives

If they do not, you will need to create them (replace drive1 with what was reflected in /etc/fstab):

mkdir -p /var/hda/files/drives/drive1

Now you are ready to mount the drives with:

mount -a

If there any errors, DO NOT continue until they are resolved.

NOTE: This would allow you to remount the drives on the previous paths in your previous installation. For example, if you have one 2TB and one 3TB harddrive, and they were mounted as /var/hda/files/drives/drive1 and /var/hda/files/drives/drive2 repectively, it would be more efficient to remount your data drives on your new Amahi installation in the same locations. However, if you didn't backup your fstab, simply remount the drives like you were installing them for the first time using hda-diskmount.
Warning!
Warning: Before you continue, you should check the ownership of the files and folders in /var/hda/files to ensure that it belongs to

1stadminuser:users

If not, this can be resolved by running the following commands as root:

chown -R 1stadminuser:users /var/hda/files chmod -R g+w /var/hda/files

NOTE: 1stadminuser should be replaced with the primary user who has administration privileges on your HDA. This is typically the first user created at install.

Then this is what needs to be done:

Ubuntu
Go to Setup » Shares » Storage Pool and check your pooled drives to add them to the pool.
Fedora
If using Greyhole UI, go to Setup » Drive Pooling » Partitions and check your pooled drives to add them to the pool (without the app, you will have to add them manually in /etc/greyhole.conf).
Ubuntu
You should make sure to select "Use Pool" and select the correct number of extra copies.
Fedora
If using Greyhole UI, go to Setup » Shares and select the shares to use the pool. Also select the correct number of extra copies desired (without the app, you will have to add them manually in /etc/greyhole.conf).

NOTE: If you don't remember all of your original shares, you can check your old /etc/greyhole.conf file (which includes the extra number of copies) or run the following:

ls -1 /var/hda/files/drives/*/gh/ | grep -v : | sort -u
  • Run Greyhole's fsck command to rebuild your shares:
greyhole --fsck

Until this completes, some of your files will be missing from your shares.