<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.amahi.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JoshTheBlack</id>
	<title>Amahi Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.amahi.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JoshTheBlack"/>
	<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php/Special:Contributions/JoshTheBlack"/>
	<updated>2026-04-07T01:45:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Greyhole&amp;diff=71270</id>
		<title>Greyhole</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Greyhole&amp;diff=71270"/>
		<updated>2013-05-30T01:22:20Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Important Warnings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:apps]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;&amp;quot;&amp;gt;&lt;br /&gt;
'''NEW:''' [https://github.com/gboudreau/Greyhole/wiki/MigrateFromWHS Widows Home Server Drive Extender Migration Guide]&lt;br /&gt;
&lt;br /&gt;
'''NEW:''' [[Greyhole troubleshooting]] guide&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is Greyhole ==&lt;br /&gt;
&lt;br /&gt;
[http://www.greyhole.net/ Greyhole] is Amahi's [[Storage pooling]] technology. Storage Pooling combines the space of multiple disk drives and makes them look as if they were all part of a single pool of disk space.&lt;br /&gt;
Specifically, Greyhole:&lt;br /&gt;
* Combines the space from multiple drives into a single volume&lt;br /&gt;
* Distributes files across all drives in the pool&lt;br /&gt;
* Creates multiple copies of files in admin-specified shares&lt;br /&gt;
&lt;br /&gt;
This feature is installed by default, but requires a few simple steps to begin utilizing the features.&lt;br /&gt;
&lt;br /&gt;
You can add additional drives to your hda and prepare them for use in Greyhole by following [[Adding a second hard drive to your HDA|this tutorial]].&lt;br /&gt;
&lt;br /&gt;
To add a drive to your Greyhole storage pool. Open your HDA dashboard and navigate to the Shares tab. Then click on the Storage Pool sub-category. You will see a page similar to the one below.&lt;br /&gt;
&lt;br /&gt;
== Important Warnings ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:darkred&amp;quot;&amp;gt;You should '''never''' change or delete files in the shared directories (''/var/hda/files/*'' by default) directly on the HDA, using the terminal, or the Gnome file browser, for the shares for which you checked the ''Uses pool'' option in the Amahi dashboard. If you want to work with files on Greyhole shares on the HDA, you should [[Mount Shares Locally]].&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
You should be safe reading existing files directly, or adding new files directly, as long as don't care that your new files will only be moved into the storage pool during the next check, which runs automatically at midnight (or manually using ''greyhole --fsck''). Until then, your new files will be stored in your shared directories (normally ''/var/hda/files/share_name/'').&lt;br /&gt;
&lt;br /&gt;
Also, touching anything inside the '''gh''' directories that Greyhole creates at the root of your partitions is a recipe for disaster.  [[Greyhole not on root | We strongly discourage you from using the root partition in a drive pool]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Forcing an fsck ==&lt;br /&gt;
{{code|greyhole -fsck&lt;br /&gt;
greyhole -f}} &lt;br /&gt;
will run an fsck ONLY if the greyhole or samba configurations have changed. &amp;lt;br /&amp;gt;&lt;br /&gt;
{{code|greyhole --fsck}}&lt;br /&gt;
will force a fsck.&lt;br /&gt;
&lt;br /&gt;
== First things first ==&lt;br /&gt;
&lt;br /&gt;
You need to go in the Settings tab, and enable '''Advanced Settings'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Without Advanced Settings enabled, you won't see the following page and options.&lt;br /&gt;
&lt;br /&gt;
== For Storage Pool (Partitions) ==&lt;br /&gt;
&lt;br /&gt;
[[File:Storage_Pool_1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Select the drives you want available for your storage pool.&lt;br /&gt;
&lt;br /&gt;
== Greyhole options ==&lt;br /&gt;
&lt;br /&gt;
The next step is to select the share you want to replicate across the pool.&lt;br /&gt;
&lt;br /&gt;
From the Shares tab, select the Shares sub-catagory. We chose the Pictures share for this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[File:Greyhole_Options_1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Check the option for &amp;quot;Uses pool&amp;quot; and choose the number of drives to replicate this share. In this instance we have chosen to use all drives available to the greyhole pool.&lt;br /&gt;
&lt;br /&gt;
Note: Greyhole is not a backup solution. If a file is removed, all copies are removed.&lt;br /&gt;
&lt;br /&gt;
== Greyhole advanced options ==&lt;br /&gt;
&lt;br /&gt;
You can further configure Greyhole by manually editing the following file:&amp;lt;br/&amp;gt;&lt;br /&gt;
'''/var/hda/platform/html/config/greyhole.yml'''&lt;br /&gt;
&lt;br /&gt;
To see what options are available, and what they do, refer to the [https://gist.github.com/1379102 sample greyhole.conf] provided with Greyhole.&lt;br /&gt;
&lt;br /&gt;
greyhole.yml is in in YAML format. Most of it should be easy enough to modify. The only exception would be the sticky_files (and optional sticky_into) options.&amp;lt;br/&amp;gt;&lt;br /&gt;
Here's an example of how those should appear:&lt;br /&gt;
&lt;br /&gt;
To specify the following to Greyhole in greyhole.conf:&lt;br /&gt;
&lt;br /&gt;
{{Text|Text=sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Music/&lt;br /&gt;
 sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Videos/Movies/&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd1/gh&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd5/gh&lt;br /&gt;
 sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Backups/CrashPlan/&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd0/gh}}&lt;br /&gt;
&lt;br /&gt;
one should specify this in the greyhole.yml file, where '''precise indentation matters''':&lt;br /&gt;
&lt;br /&gt;
{{Text|Text=sticky_files: &lt;br /&gt;
 - - Music/&lt;br /&gt;
 - - Videos/Movies/&lt;br /&gt;
   - - /mnt/hdd1/gh&lt;br /&gt;
     - /mnt/hdd5/gh&lt;br /&gt;
 - - Backups/CrashPlan/&lt;br /&gt;
   - - /mnt/hdd0/gh}}&lt;br /&gt;
&lt;br /&gt;
For your changes to be effective, you'll need to force Amahi to regenerate the greyhole.conf file. You can do so by editing a share, clicking it's path, and just clicking the Save button without actually changing the path.&lt;br /&gt;
&lt;br /&gt;
== Copying data into shares for the first time ==&lt;br /&gt;
&lt;br /&gt;
When you start using Greyhole, you might want to copy or move all your existing files into your new shares that use the storage pool.&lt;br /&gt;
&lt;br /&gt;
Note: This is not necessary if your files are already in Amahi shares. If they are there, and you enable the ''Uses pool'' option in the Amahi dashboard, the files will start getting moved around into the drives in your storage pool during the night (starting at midnight), when the nightly storage pool check starts.&amp;lt;br/&amp;gt;&lt;br /&gt;
The instructions below are for users who have more data to copy into the Greyhole shares than their currently free space in the /var/hda/files/ folder.&lt;br /&gt;
&lt;br /&gt;
One way to do that is to mount the shares that use the Greyhole storage pool, either on the HDA itself, or on a client computer on your local network, and copy your data from their existing location into the mounted shares.&lt;br /&gt;
This can be time consuming, but it is the safest way to use Greyhole.&lt;br /&gt;
&lt;br /&gt;
Another way to move your files from their current location into the storage pool is to share their current location using an Amahi share that ''Uses pool'', then let Greyhole's nightly check move the files from there into the pool.&lt;br /&gt;
&lt;br /&gt;
Here's a more detailed walkthrough for this method:&lt;br /&gt;
&lt;br /&gt;
# Setup the Greyhole Storage Pool in the Amahi dashboard, Shares &amp;gt; Storage Pool page.&lt;br /&gt;
# Go in the Shares &amp;gt; Shares page. In there, make sure you have an existing share for each share you have data for. Create new ones if you need, remove the ones you don't need.&lt;br /&gt;
# Edit the ''path'' of each of those shares, and enter the current location of your existing data. For example, the Movies share could have a path = ''/media/External Drive/Movies''&lt;br /&gt;
# Enable the ''Uses pool'' option for each of your shares, and select the number of extra copies you'd like, if any.&lt;br /&gt;
# Now, you either need to wait for Greyhole's nightly check to start, or you can start it manually from a terminal, as root, using this command: greyhole --fsck&lt;br /&gt;
# Monitor /var/log/greyhole.log to see when the ''fsck'' operation is done.&lt;br /&gt;
# Once ''fsck'' is done, your data has now been moved into the Greyhole storage pool (in the drives you selected in Shares &amp;gt; Storage Pool). All that should be left in the previous location of your data (''/media/External Drive/Movies'' from the previous example) should be symbolic links pointing to the new file copies. If the previous location is just empty directories (no symlinks), do not panic. This is normal if your previous location is an NTFS or FAT partition (drive).&lt;br /&gt;
# Move all those directories / symlinks from there into the correct folders in /var/hda/files/share_name&lt;br /&gt;
# Back in the Amahi dashboard, edit the path of the shares once again, and put back ''/var/hda/files/share_name'' (i.e. the folders where you moved the symbolic links).&lt;br /&gt;
# If you used an NTFS or FAT partition for the previous location, you'll need another fsck to create the symlinks where they should be. Either wait for midnight, or launch it manually, from a command line, as root: ''greyhole --fsck''&lt;br /&gt;
&lt;br /&gt;
You're done. All your existing data is now stored in the various drives included in your storage pool, and are accessible via the Samba shares you have defined in the Amahi dashboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding a new drive to your HDA and storage pool ==&lt;br /&gt;
This wiki page discusses [[Adding_a_second_hard_drive_to_your_HDA|how to add a new drive to your HDA and to your greyhole storage pool.]]&lt;br /&gt;
&lt;br /&gt;
== Drive Mounted as /media ==&lt;br /&gt;
Including any drive mounted as /media/Something in your storage pool is usually a bad idea.&amp;lt;br/&amp;gt;&lt;br /&gt;
Those mounts are created by the ''gnome-automounter'', which requires you to be logged in into X (Gnome) to become available.&amp;lt;br/&amp;gt;&lt;br /&gt;
This will create issues with Greyhole, which expects drives to always be available, and will take action when some of them are missing.&lt;br /&gt;
&lt;br /&gt;
Follow this guide to [[Adding a second hard drive to your HDA|permanently mount your drives]], before you include them in your storage pool.&lt;br /&gt;
&lt;br /&gt;
== Monitoring Greyhole ==&lt;br /&gt;
Sometimes you might want to monitor what Greyhole is doing, for example when writing data to your greyhole shares for the first time. Here are a few commands you can type in a terminal to follow along.&lt;br /&gt;
&lt;br /&gt;
'''Scrolling view of total Greyhole operations queue:'''&lt;br /&gt;
{{Code|while [ 1 &amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt; 1 ]; do greyhole --view-queue &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep Total; sleep 60; done}}&lt;br /&gt;
&lt;br /&gt;
'''Alternate way to watch Greyhole operations queue:'''&lt;br /&gt;
{{Code| watch -d greyhole --view-queue }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Scrolling log of what files Greyhole is working on right now:'''&lt;br /&gt;
{{Code|tail -f /var/log/greyhole.log}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Amahi App for watching the greyhole log in your web browser:'''&lt;br /&gt;
&lt;br /&gt;
[http://www.amahi.org/apps/greyhole-logmon Greyhole LogMon]&lt;br /&gt;
&lt;br /&gt;
== Convert Greyhole from SQLite to MySQL ==&lt;br /&gt;
Greyhole is already using MySQL in Amahi 6.0&lt;br /&gt;
&lt;br /&gt;
Greyhole was previously using SQLite as the default database for queueing up tasks on Amahi. This was unique to Amahi as Greyhole was originally designed to use MySQL for this task.&lt;br /&gt;
&lt;br /&gt;
There are some major performance benefits to using MySQL over SQLite when writing large amounts of files. Switching can be especially useful when moving data to Greyhole shares for the first time. For now there is a script you can run if you want to switch over. This script has been tested to be safe while Greyhole is working but should be used with discretion.&lt;br /&gt;
&lt;br /&gt;
''To Convert to MySQL, run as root:''&lt;br /&gt;
&lt;br /&gt;
{{Code|/usr/share/greyhole/db_migration-sqlite2mysql.sh}}&lt;br /&gt;
&lt;br /&gt;
To see what DB engine is Greyhole using, do this:&lt;br /&gt;
&lt;br /&gt;
{{Code|grep db_engine /etc/greyhole.conf}}&lt;br /&gt;
&lt;br /&gt;
== Disable Greyhole ==&lt;br /&gt;
For those who do not use Greyhole, you can disable it.  This is based on the fact you never have used it by enabling 'Uses pool' on any share.  Recommend using extreme caution as this could have unpredictable results.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps as user '''root''':&lt;br /&gt;
&lt;br /&gt;
{{Code|chkconfig greyhole off&lt;br /&gt;
rm /etc/monit.d/greyhole.conf&lt;br /&gt;
service monit restart&lt;br /&gt;
service greyhole stop}}&lt;br /&gt;
&lt;br /&gt;
'''DO NOT''' attempt to remove the Greyhole package as it is a dependency of the HDA software.  Doing so will break your HDA.&lt;br /&gt;
&lt;br /&gt;
= Testing and Reliability =&lt;br /&gt;
&lt;br /&gt;
Check out the [[Greyhole grinder]] to help make Greyhole rock solid.&lt;br /&gt;
&lt;br /&gt;
= Reconnect the Greyhole storage pool =&lt;br /&gt;
&lt;br /&gt;
If you upgrade and/or reinstall Amahi and need to get your drives with data on them to the new system, follow this  [[Reconnect_existing_Greyhole_storage pool]] guide.&lt;br /&gt;
&lt;br /&gt;
= Greyhole Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
Page: [[Greyhole troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
= Landing Zone Considerations =&lt;br /&gt;
&lt;br /&gt;
The landing zone or LZ is the area where files arrive first before being distributed to their final destination. See details in the [[Greyhole landing zone]] page.&lt;br /&gt;
&lt;br /&gt;
= Manually updating Greyhole for Amahi =&lt;br /&gt;
Page: [[Greyhole updating]]&lt;br /&gt;
&lt;br /&gt;
= Emptying Greyhole Attic =&lt;br /&gt;
{{Code|greyhole --empty-attic}}&lt;br /&gt;
About the attic: The attic is used like a Recycle Bin, or Trash.&lt;br /&gt;
That means you'll need to manually empty it once in a while.&lt;br /&gt;
To do so, use the --empty-attic parameter (see above).&lt;br /&gt;
Another option is to create a 'Greyhole Attic' Samba share.&lt;br /&gt;
More details about that here: https://github.com/gboudreau/Greyhole/wiki/AboutTrash&lt;br /&gt;
&lt;br /&gt;
= Moving drives/data out of Greyhole =&lt;br /&gt;
You may need to remove a drive from Greyhole and transfer the share files to another drive: [[Greyhole moving data out of the pool]]&lt;br /&gt;
&lt;br /&gt;
= Changing the Mount Points of your Greyhole drives =&lt;br /&gt;
[[Changing Greyhole Mount Points]]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
Good [http://revxatlarge.blogspot.com/2011/04/restoring-deleted-files-in-greyhole-and.html article] on Greyhole with terms explained.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Changing_Greyhole_Mount_Points&amp;diff=71264</id>
		<title>Changing Greyhole Mount Points</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Changing_Greyhole_Mount_Points&amp;diff=71264"/>
		<updated>2013-05-30T01:15:56Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: Created page with &amp;quot;==DISCLAIMER== This is what worked for me.  This may not work for you.  I recommend testing this ONLY if all of your data is backed up and recoverable outside of greyhole. We ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==DISCLAIMER==&lt;br /&gt;
This is what worked for me.  This may not work for you.  I recommend testing this ONLY if all of your data is backed up and recoverable outside of greyhole.&lt;br /&gt;
We cannot be held responsible if you lose all of your data attempting this.  YMMV.&lt;br /&gt;
&lt;br /&gt;
==How To Do It==&lt;br /&gt;
===Stop Greyhole===&lt;br /&gt;
In the HDA: &amp;lt;br /&amp;gt;&lt;br /&gt;
Setup &amp;gt; Settings &amp;gt; Servers &amp;gt; Greyhole &amp;lt;br /&amp;gt;&lt;br /&gt;
Uncheck Watchdog and then press the Stop It button.&lt;br /&gt;
===Change Mount Points===&lt;br /&gt;
====Unmount your data drives====&lt;br /&gt;
{{code|sudo umount -a}}&lt;br /&gt;
Verify this completed by checking your data drives are not mounted&lt;br /&gt;
{{code|mount}}&lt;br /&gt;
====Create your new mount points====&lt;br /&gt;
{{code|sudo mkdir /var/hda/files/drives/bay2&lt;br /&gt;
sudo mkdir /var/hda/files/drives/bay3&lt;br /&gt;
sudo mkdir /var/hda/files/drives/bay4}}&lt;br /&gt;
&lt;br /&gt;
====Backup fstab====&lt;br /&gt;
{{code|sudo cp /etc/fstab /etc/fstab.bak.2013.05.01}}&lt;br /&gt;
You could just use fstab.bak, but I prefer to have my backups dated.&lt;br /&gt;
====Edit fstab====&lt;br /&gt;
{{code|sudo nano /etc/fstab}}&lt;br /&gt;
Look for your mount points and change them to the new folders you want to mount the data drives in.  &amp;lt;br /&amp;gt;&lt;br /&gt;
If you haven't commented your fstab file, now's a good time for that.  Here's mine:&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# &amp;lt;file system&amp;gt;                           &amp;lt;mount point&amp;gt;             &amp;lt;type&amp;gt;  &amp;lt;options&amp;gt;                  &amp;lt;dump&amp;gt;  &amp;lt;pass&amp;gt;&lt;br /&gt;
proc                                      /proc                      proc    nodev,noexec,nosuid        0       0&lt;br /&gt;
# / was on /dev/sda1 during installation&lt;br /&gt;
UUID=45e7d257-a7cc-4a36-9dd8-20929ad54b0e /                          ext4    errors=remount-ro          0       1&lt;br /&gt;
# swap was on /dev/sda5 during installation&lt;br /&gt;
UUID=c4d9f59e-1d7b-47ba-a956-e0e8a231bc10 none                       swap    sw                         0       0&lt;br /&gt;
########################################## Mount 4TB Seagate drive in Bay 2 from bottom ######################&lt;br /&gt;
UUID=05c05271-7309-4244-9dd8-8c2d6c5aeacd /var/hda/files/drives/bay2 ext4 noatime,data=writeback,nofail 1       2&lt;br /&gt;
########################################## Mount 2TB Seagate drive in Bay 3 from Bottom ######################&lt;br /&gt;
UUID=489e45f4-16ef-4a65-47ba-456e465a4b4c /var/hda/files/drives/bay4 ext4 noatime,data=writeback,nofail 1       2&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
====Remount the Drives====&lt;br /&gt;
{{code|sudo mount -a}}&lt;br /&gt;
If there are any errors from this command, FIX THEM before you reboot.&amp;lt;br /&amp;gt;&lt;br /&gt;
Check the drives have mounted in the new mount points with:&lt;br /&gt;
{{code|mount}}&lt;br /&gt;
&lt;br /&gt;
===Reboot===&lt;br /&gt;
From the HDA dashboard:  &amp;lt;br /&amp;gt;&lt;br /&gt;
Setup &amp;gt; Settings &amp;gt; Settings &amp;gt; click the reboot button.&lt;br /&gt;
&lt;br /&gt;
===Fix Greyhole===&lt;br /&gt;
Some of these steps may not be necessary, but this is the path I took that got me results. &amp;lt;br /&amp;gt;&lt;br /&gt;
Several of these steps can take a LONG time depending on how many files are on the drives you have remounted.  &amp;lt;br /&amp;gt;&lt;br /&gt;
I recommend keeping an eye on greyhole to ensure it is doing what it should.&lt;br /&gt;
{{code|tail -f /var/log/greyhole.log​}}&lt;br /&gt;
Press Ctrl+Z to pause this task.  Note the number in brackets or use the &amp;quot;jobs&amp;quot; command to see where it is queued. &amp;lt;br /&amp;gt;&lt;br /&gt;
Bring it to the foreground to check it at anytime with:&lt;br /&gt;
{{code|fg 1}}&lt;br /&gt;
1 being the first task in the background.&lt;br /&gt;
====Restart Greyhole====&lt;br /&gt;
From the HDA: &amp;lt;br /&amp;gt;&lt;br /&gt;
Setup &amp;gt; Settings &amp;gt; Servers &amp;gt; Greyhole &amp;lt;br /&amp;gt;&lt;br /&gt;
Ensure Greyhole is started and the watchdog option is checked.&lt;br /&gt;
====Add Drives to Greyhole====&lt;br /&gt;
From the HDA:&amp;lt;br / &amp;gt;&lt;br /&gt;
Shares &amp;gt; Storage Pool &amp;gt; Check the drives (should be listed under the new mount points)&amp;lt;br / &amp;gt;&lt;br /&gt;
If your old mount points are still checked, uncheck them.&lt;br /&gt;
====Remove invalid symlinks====&lt;br /&gt;
{{code|sudo greyhole --fix-symlinks}}&lt;br /&gt;
At this point all of your files that were located on a drive whose mount point was changed will disappear from your shares. &amp;lt;br /&amp;gt;&lt;br /&gt;
This is because the symlinks were no longer valid and greyhole is still looking for them in their old folders.&amp;lt;br /&amp;gt;&lt;br /&gt;
Bring up the log and watch it work away at removing all those symlinks.&amp;lt;br /&amp;gt;&lt;br /&gt;
Wait until it has completed.&lt;br /&gt;
====Delete Orphaned Metadata====&lt;br /&gt;
{{code|sudo greyhole --fsck --delete-orphaned-metadata}}&lt;br /&gt;
This will remove any metadata still stored for those missing files.  It is necessary for the next step to work.&lt;br /&gt;
====Find the Orphaned Files====&lt;br /&gt;
{{code|sudo greyhole --fsck --find-orphaned-files --dir&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;/var/hda/files/drives/bay2/gh}}&lt;br /&gt;
This will run an fsck on the drive mounted in /var/hda/files/drives/bay2 and look for files without metadata.  &amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for each drive you have changed the mount points for.&amp;lt;br /&amp;gt;&lt;br /&gt;
At this point, your files should begin reappearing in your shares.  If not, try running another fsck:&lt;br /&gt;
{{code|sudo greyhole --fix-symlinks&lt;br /&gt;
sudo greyhole --fsck}}&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Greyhole&amp;diff=71192</id>
		<title>Greyhole</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Greyhole&amp;diff=71192"/>
		<updated>2013-05-29T23:52:28Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Moving drives/data out of Greyhole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:apps]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;&amp;quot;&amp;gt;&lt;br /&gt;
'''NEW:''' [https://github.com/gboudreau/Greyhole/wiki/MigrateFromWHS Widows Home Server Drive Extender Migration Guide]&lt;br /&gt;
&lt;br /&gt;
'''NEW:''' [[Greyhole troubleshooting]] guide&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is Greyhole ==&lt;br /&gt;
&lt;br /&gt;
[http://www.greyhole.net/ Greyhole] is Amahi's [[Storage pooling]] technology. Storage Pooling combines the space of multiple disk drives and makes them look as if they were all part of a single pool of disk space.&lt;br /&gt;
Specifically, Greyhole:&lt;br /&gt;
* Combines the space from multiple drives into a single volume&lt;br /&gt;
* Distributes files across all drives in the pool&lt;br /&gt;
* Creates multiple copies of files in admin-specified shares&lt;br /&gt;
&lt;br /&gt;
This feature is installed by default, but requires a few simple steps to begin utilizing the features.&lt;br /&gt;
&lt;br /&gt;
You can add additional drives to your hda and prepare them for use in Greyhole by following [[Adding a second hard drive to your HDA|this tutorial]].&lt;br /&gt;
&lt;br /&gt;
To add a drive to your Greyhole storage pool. Open your HDA dashboard and navigate to the Shares tab. Then click on the Storage Pool sub-category. You will see a page similar to the one below.&lt;br /&gt;
&lt;br /&gt;
== Important Warnings ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:darkred&amp;quot;&amp;gt;You should '''never''' change or delete files in the shared directories (''/var/hda/files/*'' by default) directly on the HDA, using the terminal, or the Gnome file browser, for the shares for which you checked the ''Uses pool'' option in the Amahi dashboard. If you want to work with files on Greyhole shares on the HDA, you should [[Mount Shares Locally]].&amp;lt;br/&amp;gt;&lt;br /&gt;
You should be safe reading existing files directly, or adding new files directly, as long as don't care that your new files will only be moved into the storage pool during the next check, which runs automatically at midnight (or manually using ''greyhole --fsck''). Until then, your new files will be stored in your shared directories (normally ''/var/hda/files/share_name/'').&lt;br /&gt;
&lt;br /&gt;
Also, touching anything inside the '''gh''' directories that Greyhole creates at the root of your partitions is a recipe for disaster.&lt;br /&gt;
&lt;br /&gt;
We [[Greyhole not on root | strongly discourage you from using the root partition in a drive pool]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== First things first ==&lt;br /&gt;
&lt;br /&gt;
You need to go in the Settings tab, and enable '''Advanced Settings'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Without Advanced Settings enabled, you won't see the following page and options.&lt;br /&gt;
&lt;br /&gt;
== For Storage Pool (Partitions) ==&lt;br /&gt;
&lt;br /&gt;
[[File:Storage_Pool_1.png|600px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
Select the drives you want available for your storage pool.&lt;br /&gt;
&lt;br /&gt;
== Greyhole options ==&lt;br /&gt;
&lt;br /&gt;
The next step is to select the share you want to replicate across the pool.&lt;br /&gt;
&lt;br /&gt;
From the Shares tab, select the Shares sub-catagory. We chose the Pictures share for this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[File:Greyhole_Options_1.png|600px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
Check the option for &amp;quot;Uses pool&amp;quot; and choose the number of drives to replicate this share. In this instance we have chosen to use all drives available to the greyhole pool.&lt;br /&gt;
&lt;br /&gt;
Note: Greyhole is not a backup solution. If a file is removed, all copies are removed.&lt;br /&gt;
&lt;br /&gt;
== Greyhole advanced options ==&lt;br /&gt;
&lt;br /&gt;
You can further configure Greyhole by manually editing the following file:&amp;lt;br/&amp;gt;&lt;br /&gt;
'''/var/hda/platform/html/config/greyhole.yml'''&lt;br /&gt;
&lt;br /&gt;
To see what options are available, and what they do, refer to the [https://gist.github.com/1379102 sample greyhole.conf] provided with Greyhole.&lt;br /&gt;
&lt;br /&gt;
greyhole.yml is in in YAML format. Most of it should be easy enough to modify. The only exception would be the sticky_files (and optional sticky_into) options.&amp;lt;br/&amp;gt;&lt;br /&gt;
Here's an example of how those should appear:&lt;br /&gt;
&lt;br /&gt;
To specify the following to Greyhole in greyhole.conf:&lt;br /&gt;
&lt;br /&gt;
{{Text|Text=sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Music/&lt;br /&gt;
 sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Videos/Movies/&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd1/gh&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd5/gh&lt;br /&gt;
 sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Backups/CrashPlan/&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd0/gh}}&lt;br /&gt;
&lt;br /&gt;
one should specify this in the greyhole.yml file, where '''precise indentation matters''':&lt;br /&gt;
&lt;br /&gt;
{{Text|Text=sticky_files: &lt;br /&gt;
 - - Music/&lt;br /&gt;
 - - Videos/Movies/&lt;br /&gt;
   - - /mnt/hdd1/gh&lt;br /&gt;
     - /mnt/hdd5/gh&lt;br /&gt;
 - - Backups/CrashPlan/&lt;br /&gt;
   - - /mnt/hdd0/gh}}&lt;br /&gt;
&lt;br /&gt;
For your changes to be effective, you'll need to force Amahi to regenerate the greyhole.conf file. You can do so by editing a share, clicking it's path, and just clicking the Save button without actually changing the path.&lt;br /&gt;
&lt;br /&gt;
== Copying data into shares for the first time ==&lt;br /&gt;
&lt;br /&gt;
When you start using Greyhole, you might want to copy or move all your existing files into your new shares that use the storage pool.&lt;br /&gt;
&lt;br /&gt;
Note: This is not necessary if your files are already in Amahi shares. If they are there, and you enable the ''Uses pool'' option in the Amahi dashboard, the files will start getting moved around into the drives in your storage pool during the night (starting at midnight), when the nightly storage pool check starts.&amp;lt;br/&amp;gt;&lt;br /&gt;
The instructions below are for users who have more data to copy into the Greyhole shares than their currently free space in the /var/hda/files/ folder.&lt;br /&gt;
&lt;br /&gt;
One way to do that is to mount the shares that use the Greyhole storage pool, either on the HDA itself, or on a client computer on your local network, and copy your data from their existing location into the mounted shares.&lt;br /&gt;
This can be time consuming, but it is the safest way to use Greyhole.&lt;br /&gt;
&lt;br /&gt;
Another way to move your files from their current location into the storage pool is to share their current location using an Amahi share that ''Uses pool'', then let Greyhole's nightly check move the files from there into the pool.&lt;br /&gt;
&lt;br /&gt;
Here's a more detailed walkthrough for this method:&lt;br /&gt;
&lt;br /&gt;
# Setup the Greyhole Storage Pool in the Amahi dashboard, Shares &amp;gt; Storage Pool page.&lt;br /&gt;
# Go in the Shares &amp;gt; Shares page. In there, make sure you have an existing share for each share you have data for. Create new ones if you need, remove the ones you don't need.&lt;br /&gt;
# Edit the ''path'' of each of those shares, and enter the current location of your existing data. For example, the Movies share could have a path = ''/media/External Drive/Movies''&lt;br /&gt;
# Enable the ''Uses pool'' option for each of your shares, and select the number of extra copies you'd like, if any.&lt;br /&gt;
# Now, you either need to wait for Greyhole's nightly check to start, or you can start it manually from a terminal, as root, using this command: greyhole --fsck&lt;br /&gt;
# Monitor /var/log/greyhole.log to see when the ''fsck'' operation is done.&lt;br /&gt;
# Once ''fsck'' is done, your data has now been moved into the Greyhole storage pool (in the drives you selected in Shares &amp;gt; Storage Pool). All that should be left in the previous location of your data (''/media/External Drive/Movies'' from the previous example) should be symbolic links pointing to the new file copies. If the previous location is just empty directories (no symlinks), do not panic. This is normal if your previous location is an NTFS or FAT partition (drive).&lt;br /&gt;
# Move all those directories / symlinks from there into the correct folders in /var/hda/files/share_name&lt;br /&gt;
# Back in the Amahi dashboard, edit the path of the shares once again, and put back ''/var/hda/files/share_name'' (i.e. the folders where you moved the symbolic links).&lt;br /&gt;
# If you used an NTFS or FAT partition for the previous location, you'll need another fsck to create the symlinks where they should be. Either wait for midnight, or launch it manually, from a command line, as root: ''greyhole --fsck''&lt;br /&gt;
&lt;br /&gt;
You're done. All your existing data is now stored in the various drives included in your storage pool, and are accessible via the Samba shares you have defined in the Amahi dashboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding a new drive to your HDA and storage pool ==&lt;br /&gt;
This wiki page discusses [[Adding_a_second_hard_drive_to_your_HDA|how to add a new drive to your HDA and to your greyhole storage pool.]]&lt;br /&gt;
&lt;br /&gt;
== Drive Mounted as /media ==&lt;br /&gt;
Including any drive mounted as /media/Something in your storage pool is usually a bad idea.&amp;lt;br/&amp;gt;&lt;br /&gt;
Those mounts are created by the ''gnome-automounter'', which requires you to be logged in into X (Gnome) to become available.&amp;lt;br/&amp;gt;&lt;br /&gt;
This will create issues with Greyhole, which expects drives to always be available, and will take action when some of them are missing.&lt;br /&gt;
&lt;br /&gt;
Follow this guide to [[Adding a second hard drive to your HDA|permanently mount your drives]], before you include them in your storage pool.&lt;br /&gt;
&lt;br /&gt;
== Monitoring Greyhole ==&lt;br /&gt;
Sometimes you might want to monitor what Greyhole is doing, for example when writing data to your greyhole shares for the first time. Here are a few commands you can type in a terminal to follow along.&lt;br /&gt;
&lt;br /&gt;
'''Scrolling view of total Greyhole operations queue:'''&lt;br /&gt;
{{Code|while [ 1 &amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt; 1 ]; do greyhole --view-queue &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep Total; sleep 60; done}}&lt;br /&gt;
&lt;br /&gt;
'''Alternate way to watch Greyhole operations queue:'''&lt;br /&gt;
{{Code| watch -d greyhole --view-queue }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Scrolling log of what files Greyhole is working on right now:'''&lt;br /&gt;
{{Code|tail -f /var/log/greyhole.log}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Amahi App for watching the greyhole log in your web browser:'''&lt;br /&gt;
&lt;br /&gt;
http://www.amahi.org/apps/greyhole-logmon&lt;br /&gt;
&lt;br /&gt;
== Convert Greyhole from SQLite to MySQL ==&lt;br /&gt;
Greyhole is already using MySQL in Amahi 6.0&lt;br /&gt;
&lt;br /&gt;
Greyhole was previously using SQLite as the default database for queueing up tasks on Amahi. This was unique to Amahi as Greyhole was originally designed to use MySQL for this task.&lt;br /&gt;
&lt;br /&gt;
There are some major performance benefits to using MySQL over SQLite when writing large amounts of files. Switching can be especially useful when moving data to Greyhole shares for the first time. For now there is a script you can run if you want to switch over. This script has been tested to be safe while Greyhole is working but should be used with discretion.&lt;br /&gt;
&lt;br /&gt;
''To Convert to MySQL, run as root:''&lt;br /&gt;
&lt;br /&gt;
{{Code|/usr/share/greyhole/db_migration-sqlite2mysql.sh}}&lt;br /&gt;
&lt;br /&gt;
To see what DB engine is Greyhole using, do this:&lt;br /&gt;
&lt;br /&gt;
{{Code|grep db_engine /etc/greyhole.conf}}&lt;br /&gt;
&lt;br /&gt;
== Disable Greyhole ==&lt;br /&gt;
For those who do not use Greyhole, you can disable it.  This is based on the fact you never have used it by enabling 'Uses pool' on any share.  Recommend using extreme caution as this could have unpredictable results.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps as user '''root''':&lt;br /&gt;
&lt;br /&gt;
{{Code|chkconfig greyhole off&lt;br /&gt;
rm /etc/monit.d/greyhole.conf&lt;br /&gt;
service monit restart&lt;br /&gt;
service greyhole stop}}&lt;br /&gt;
&lt;br /&gt;
'''DO NOT''' attempt to remove the Greyhole package as it is a dependency of the HDA software.  Doing so will break your HDA.&lt;br /&gt;
&lt;br /&gt;
= Testing and Reliability =&lt;br /&gt;
&lt;br /&gt;
Check out the [[Greyhole grinder]] to help make Greyhole rock solid.&lt;br /&gt;
&lt;br /&gt;
= Reconnect the Greyhole storage pool =&lt;br /&gt;
&lt;br /&gt;
If you upgrade and/or reinstall Amahi and need to get your drives with data on them to the new system, follow this  [[Reconnect_existing_Greyhole_storage pool]] guide.&lt;br /&gt;
&lt;br /&gt;
= Greyhole Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
Page: [[Greyhole troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
= Landing Zone Considerations =&lt;br /&gt;
&lt;br /&gt;
The landing zone or LZ is the area where files arrive first before being distributed to their final destination. See details in the [[Greyhole landing zone]] page.&lt;br /&gt;
&lt;br /&gt;
= Manually updating Greyhole for Amahi =&lt;br /&gt;
Page: [[Greyhole updating]]&lt;br /&gt;
&lt;br /&gt;
= Emptying Greyhole Attic =&lt;br /&gt;
{{Code|greyhole --empty-attic}}&lt;br /&gt;
About the attic: The attic is used like a Recycle Bin, or Trash.&lt;br /&gt;
That means you'll need to manually empty it once in a while.&lt;br /&gt;
To do so, use the --empty-attic parameter (see above).&lt;br /&gt;
Another option is to create a 'Greyhole Attic' Samba share.&lt;br /&gt;
More details about that here: https://github.com/gboudreau/Greyhole/wiki/AboutTrash&lt;br /&gt;
&lt;br /&gt;
= Moving drives/data out of Greyhole =&lt;br /&gt;
You may need to remove a drive from Greyhole and transfer the share files to another drive: [[Greyhole moving data out of the pool]]&lt;br /&gt;
&lt;br /&gt;
= Changing the Mount Points of your Greyhole drives =&lt;br /&gt;
[[Changing Greyhole Mount Points]]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
Good [http://revxatlarge.blogspot.com/2011/04/restoring-deleted-files-in-greyhole-and.html article] on Greyhole with terms explained.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Greyhole&amp;diff=71186</id>
		<title>Greyhole</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Greyhole&amp;diff=71186"/>
		<updated>2013-05-29T23:50:48Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Monitoring Greyhole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:apps]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;&amp;quot;&amp;gt;&lt;br /&gt;
'''NEW:''' [https://github.com/gboudreau/Greyhole/wiki/MigrateFromWHS Widows Home Server Drive Extender Migration Guide]&lt;br /&gt;
&lt;br /&gt;
'''NEW:''' [[Greyhole troubleshooting]] guide&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is Greyhole ==&lt;br /&gt;
&lt;br /&gt;
[http://www.greyhole.net/ Greyhole] is Amahi's [[Storage pooling]] technology. Storage Pooling combines the space of multiple disk drives and makes them look as if they were all part of a single pool of disk space.&lt;br /&gt;
Specifically, Greyhole:&lt;br /&gt;
* Combines the space from multiple drives into a single volume&lt;br /&gt;
* Distributes files across all drives in the pool&lt;br /&gt;
* Creates multiple copies of files in admin-specified shares&lt;br /&gt;
&lt;br /&gt;
This feature is installed by default, but requires a few simple steps to begin utilizing the features.&lt;br /&gt;
&lt;br /&gt;
You can add additional drives to your hda and prepare them for use in Greyhole by following [[Adding a second hard drive to your HDA|this tutorial]].&lt;br /&gt;
&lt;br /&gt;
To add a drive to your Greyhole storage pool. Open your HDA dashboard and navigate to the Shares tab. Then click on the Storage Pool sub-category. You will see a page similar to the one below.&lt;br /&gt;
&lt;br /&gt;
== Important Warnings ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:darkred&amp;quot;&amp;gt;You should '''never''' change or delete files in the shared directories (''/var/hda/files/*'' by default) directly on the HDA, using the terminal, or the Gnome file browser, for the shares for which you checked the ''Uses pool'' option in the Amahi dashboard. If you want to work with files on Greyhole shares on the HDA, you should [[Mount Shares Locally]].&amp;lt;br/&amp;gt;&lt;br /&gt;
You should be safe reading existing files directly, or adding new files directly, as long as don't care that your new files will only be moved into the storage pool during the next check, which runs automatically at midnight (or manually using ''greyhole --fsck''). Until then, your new files will be stored in your shared directories (normally ''/var/hda/files/share_name/'').&lt;br /&gt;
&lt;br /&gt;
Also, touching anything inside the '''gh''' directories that Greyhole creates at the root of your partitions is a recipe for disaster.&lt;br /&gt;
&lt;br /&gt;
We [[Greyhole not on root | strongly discourage you from using the root partition in a drive pool]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== First things first ==&lt;br /&gt;
&lt;br /&gt;
You need to go in the Settings tab, and enable '''Advanced Settings'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Without Advanced Settings enabled, you won't see the following page and options.&lt;br /&gt;
&lt;br /&gt;
== For Storage Pool (Partitions) ==&lt;br /&gt;
&lt;br /&gt;
[[File:Storage_Pool_1.png|600px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
Select the drives you want available for your storage pool.&lt;br /&gt;
&lt;br /&gt;
== Greyhole options ==&lt;br /&gt;
&lt;br /&gt;
The next step is to select the share you want to replicate across the pool.&lt;br /&gt;
&lt;br /&gt;
From the Shares tab, select the Shares sub-catagory. We chose the Pictures share for this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[File:Greyhole_Options_1.png|600px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
Check the option for &amp;quot;Uses pool&amp;quot; and choose the number of drives to replicate this share. In this instance we have chosen to use all drives available to the greyhole pool.&lt;br /&gt;
&lt;br /&gt;
Note: Greyhole is not a backup solution. If a file is removed, all copies are removed.&lt;br /&gt;
&lt;br /&gt;
== Greyhole advanced options ==&lt;br /&gt;
&lt;br /&gt;
You can further configure Greyhole by manually editing the following file:&amp;lt;br/&amp;gt;&lt;br /&gt;
'''/var/hda/platform/html/config/greyhole.yml'''&lt;br /&gt;
&lt;br /&gt;
To see what options are available, and what they do, refer to the [https://gist.github.com/1379102 sample greyhole.conf] provided with Greyhole.&lt;br /&gt;
&lt;br /&gt;
greyhole.yml is in in YAML format. Most of it should be easy enough to modify. The only exception would be the sticky_files (and optional sticky_into) options.&amp;lt;br/&amp;gt;&lt;br /&gt;
Here's an example of how those should appear:&lt;br /&gt;
&lt;br /&gt;
To specify the following to Greyhole in greyhole.conf:&lt;br /&gt;
&lt;br /&gt;
{{Text|Text=sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Music/&lt;br /&gt;
 sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Videos/Movies/&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd1/gh&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd5/gh&lt;br /&gt;
 sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Backups/CrashPlan/&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd0/gh}}&lt;br /&gt;
&lt;br /&gt;
one should specify this in the greyhole.yml file, where '''precise indentation matters''':&lt;br /&gt;
&lt;br /&gt;
{{Text|Text=sticky_files: &lt;br /&gt;
 - - Music/&lt;br /&gt;
 - - Videos/Movies/&lt;br /&gt;
   - - /mnt/hdd1/gh&lt;br /&gt;
     - /mnt/hdd5/gh&lt;br /&gt;
 - - Backups/CrashPlan/&lt;br /&gt;
   - - /mnt/hdd0/gh}}&lt;br /&gt;
&lt;br /&gt;
For your changes to be effective, you'll need to force Amahi to regenerate the greyhole.conf file. You can do so by editing a share, clicking it's path, and just clicking the Save button without actually changing the path.&lt;br /&gt;
&lt;br /&gt;
== Copying data into shares for the first time ==&lt;br /&gt;
&lt;br /&gt;
When you start using Greyhole, you might want to copy or move all your existing files into your new shares that use the storage pool.&lt;br /&gt;
&lt;br /&gt;
Note: This is not necessary if your files are already in Amahi shares. If they are there, and you enable the ''Uses pool'' option in the Amahi dashboard, the files will start getting moved around into the drives in your storage pool during the night (starting at midnight), when the nightly storage pool check starts.&amp;lt;br/&amp;gt;&lt;br /&gt;
The instructions below are for users who have more data to copy into the Greyhole shares than their currently free space in the /var/hda/files/ folder.&lt;br /&gt;
&lt;br /&gt;
One way to do that is to mount the shares that use the Greyhole storage pool, either on the HDA itself, or on a client computer on your local network, and copy your data from their existing location into the mounted shares.&lt;br /&gt;
This can be time consuming, but it is the safest way to use Greyhole.&lt;br /&gt;
&lt;br /&gt;
Another way to move your files from their current location into the storage pool is to share their current location using an Amahi share that ''Uses pool'', then let Greyhole's nightly check move the files from there into the pool.&lt;br /&gt;
&lt;br /&gt;
Here's a more detailed walkthrough for this method:&lt;br /&gt;
&lt;br /&gt;
# Setup the Greyhole Storage Pool in the Amahi dashboard, Shares &amp;gt; Storage Pool page.&lt;br /&gt;
# Go in the Shares &amp;gt; Shares page. In there, make sure you have an existing share for each share you have data for. Create new ones if you need, remove the ones you don't need.&lt;br /&gt;
# Edit the ''path'' of each of those shares, and enter the current location of your existing data. For example, the Movies share could have a path = ''/media/External Drive/Movies''&lt;br /&gt;
# Enable the ''Uses pool'' option for each of your shares, and select the number of extra copies you'd like, if any.&lt;br /&gt;
# Now, you either need to wait for Greyhole's nightly check to start, or you can start it manually from a terminal, as root, using this command: greyhole --fsck&lt;br /&gt;
# Monitor /var/log/greyhole.log to see when the ''fsck'' operation is done.&lt;br /&gt;
# Once ''fsck'' is done, your data has now been moved into the Greyhole storage pool (in the drives you selected in Shares &amp;gt; Storage Pool). All that should be left in the previous location of your data (''/media/External Drive/Movies'' from the previous example) should be symbolic links pointing to the new file copies. If the previous location is just empty directories (no symlinks), do not panic. This is normal if your previous location is an NTFS or FAT partition (drive).&lt;br /&gt;
# Move all those directories / symlinks from there into the correct folders in /var/hda/files/share_name&lt;br /&gt;
# Back in the Amahi dashboard, edit the path of the shares once again, and put back ''/var/hda/files/share_name'' (i.e. the folders where you moved the symbolic links).&lt;br /&gt;
# If you used an NTFS or FAT partition for the previous location, you'll need another fsck to create the symlinks where they should be. Either wait for midnight, or launch it manually, from a command line, as root: ''greyhole --fsck''&lt;br /&gt;
&lt;br /&gt;
You're done. All your existing data is now stored in the various drives included in your storage pool, and are accessible via the Samba shares you have defined in the Amahi dashboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding a new drive to your HDA and storage pool ==&lt;br /&gt;
This wiki page discusses [[Adding_a_second_hard_drive_to_your_HDA|how to add a new drive to your HDA and to your greyhole storage pool.]]&lt;br /&gt;
&lt;br /&gt;
== Drive Mounted as /media ==&lt;br /&gt;
Including any drive mounted as /media/Something in your storage pool is usually a bad idea.&amp;lt;br/&amp;gt;&lt;br /&gt;
Those mounts are created by the ''gnome-automounter'', which requires you to be logged in into X (Gnome) to become available.&amp;lt;br/&amp;gt;&lt;br /&gt;
This will create issues with Greyhole, which expects drives to always be available, and will take action when some of them are missing.&lt;br /&gt;
&lt;br /&gt;
Follow this guide to [[Adding a second hard drive to your HDA|permanently mount your drives]], before you include them in your storage pool.&lt;br /&gt;
&lt;br /&gt;
== Monitoring Greyhole ==&lt;br /&gt;
Sometimes you might want to monitor what Greyhole is doing, for example when writing data to your greyhole shares for the first time. Here are a few commands you can type in a terminal to follow along.&lt;br /&gt;
&lt;br /&gt;
'''Scrolling view of total Greyhole operations queue:'''&lt;br /&gt;
{{Code|while [ 1 &amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt; 1 ]; do greyhole --view-queue &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep Total; sleep 60; done}}&lt;br /&gt;
&lt;br /&gt;
'''Alternate way to watch Greyhole operations queue:'''&lt;br /&gt;
{{Code| watch -d greyhole --view-queue }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Scrolling log of what files Greyhole is working on right now:'''&lt;br /&gt;
{{Code|tail -f /var/log/greyhole.log}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Amahi App for watching the greyhole log in your web browser:'''&lt;br /&gt;
&lt;br /&gt;
http://www.amahi.org/apps/greyhole-logmon&lt;br /&gt;
&lt;br /&gt;
== Convert Greyhole from SQLite to MySQL ==&lt;br /&gt;
Greyhole is already using MySQL in Amahi 6.0&lt;br /&gt;
&lt;br /&gt;
Greyhole was previously using SQLite as the default database for queueing up tasks on Amahi. This was unique to Amahi as Greyhole was originally designed to use MySQL for this task.&lt;br /&gt;
&lt;br /&gt;
There are some major performance benefits to using MySQL over SQLite when writing large amounts of files. Switching can be especially useful when moving data to Greyhole shares for the first time. For now there is a script you can run if you want to switch over. This script has been tested to be safe while Greyhole is working but should be used with discretion.&lt;br /&gt;
&lt;br /&gt;
''To Convert to MySQL, run as root:''&lt;br /&gt;
&lt;br /&gt;
{{Code|/usr/share/greyhole/db_migration-sqlite2mysql.sh}}&lt;br /&gt;
&lt;br /&gt;
To see what DB engine is Greyhole using, do this:&lt;br /&gt;
&lt;br /&gt;
{{Code|grep db_engine /etc/greyhole.conf}}&lt;br /&gt;
&lt;br /&gt;
== Disable Greyhole ==&lt;br /&gt;
For those who do not use Greyhole, you can disable it.  This is based on the fact you never have used it by enabling 'Uses pool' on any share.  Recommend using extreme caution as this could have unpredictable results.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps as user '''root''':&lt;br /&gt;
&lt;br /&gt;
{{Code|chkconfig greyhole off&lt;br /&gt;
rm /etc/monit.d/greyhole.conf&lt;br /&gt;
service monit restart&lt;br /&gt;
service greyhole stop}}&lt;br /&gt;
&lt;br /&gt;
'''DO NOT''' attempt to remove the Greyhole package as it is a dependency of the HDA software.  Doing so will break your HDA.&lt;br /&gt;
&lt;br /&gt;
= Testing and Reliability =&lt;br /&gt;
&lt;br /&gt;
Check out the [[Greyhole grinder]] to help make Greyhole rock solid.&lt;br /&gt;
&lt;br /&gt;
= Reconnect the Greyhole storage pool =&lt;br /&gt;
&lt;br /&gt;
If you upgrade and/or reinstall Amahi and need to get your drives with data on them to the new system, follow this  [[Reconnect_existing_Greyhole_storage pool]] guide.&lt;br /&gt;
&lt;br /&gt;
= Greyhole Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
Page: [[Greyhole troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
= Landing Zone Considerations =&lt;br /&gt;
&lt;br /&gt;
The landing zone or LZ is the area where files arrive first before being distributed to their final destination. See details in the [[Greyhole landing zone]] page.&lt;br /&gt;
&lt;br /&gt;
= Manually updating Greyhole for Amahi =&lt;br /&gt;
Page: [[Greyhole updating]]&lt;br /&gt;
&lt;br /&gt;
= Emptying Greyhole Attic =&lt;br /&gt;
{{Code|greyhole --empty-attic}}&lt;br /&gt;
About the attic: The attic is used like a Recycle Bin, or Trash.&lt;br /&gt;
That means you'll need to manually empty it once in a while.&lt;br /&gt;
To do so, use the --empty-attic parameter (see above).&lt;br /&gt;
Another option is to create a 'Greyhole Attic' Samba share.&lt;br /&gt;
More details about that here: https://github.com/gboudreau/Greyhole/wiki/AboutTrash&lt;br /&gt;
&lt;br /&gt;
= Moving drives/data out of Greyhole =&lt;br /&gt;
You may need to remove a drive from Greyhole and transfer the share files to another drive: [[Greyhole moving data out of the pool]]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
Good [http://revxatlarge.blogspot.com/2011/04/restoring-deleted-files-in-greyhole-and.html article] on Greyhole with terms explained.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Greyhole&amp;diff=71180</id>
		<title>Greyhole</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Greyhole&amp;diff=71180"/>
		<updated>2013-05-29T23:48:36Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Monitoring Greyhole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:apps]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;&amp;quot;&amp;gt;&lt;br /&gt;
'''NEW:''' [https://github.com/gboudreau/Greyhole/wiki/MigrateFromWHS Widows Home Server Drive Extender Migration Guide]&lt;br /&gt;
&lt;br /&gt;
'''NEW:''' [[Greyhole troubleshooting]] guide&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is Greyhole ==&lt;br /&gt;
&lt;br /&gt;
[http://www.greyhole.net/ Greyhole] is Amahi's [[Storage pooling]] technology. Storage Pooling combines the space of multiple disk drives and makes them look as if they were all part of a single pool of disk space.&lt;br /&gt;
Specifically, Greyhole:&lt;br /&gt;
* Combines the space from multiple drives into a single volume&lt;br /&gt;
* Distributes files across all drives in the pool&lt;br /&gt;
* Creates multiple copies of files in admin-specified shares&lt;br /&gt;
&lt;br /&gt;
This feature is installed by default, but requires a few simple steps to begin utilizing the features.&lt;br /&gt;
&lt;br /&gt;
You can add additional drives to your hda and prepare them for use in Greyhole by following [[Adding a second hard drive to your HDA|this tutorial]].&lt;br /&gt;
&lt;br /&gt;
To add a drive to your Greyhole storage pool. Open your HDA dashboard and navigate to the Shares tab. Then click on the Storage Pool sub-category. You will see a page similar to the one below.&lt;br /&gt;
&lt;br /&gt;
== Important Warnings ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:darkred&amp;quot;&amp;gt;You should '''never''' change or delete files in the shared directories (''/var/hda/files/*'' by default) directly on the HDA, using the terminal, or the Gnome file browser, for the shares for which you checked the ''Uses pool'' option in the Amahi dashboard. If you want to work with files on Greyhole shares on the HDA, you should [[Mount Shares Locally]].&amp;lt;br/&amp;gt;&lt;br /&gt;
You should be safe reading existing files directly, or adding new files directly, as long as don't care that your new files will only be moved into the storage pool during the next check, which runs automatically at midnight (or manually using ''greyhole --fsck''). Until then, your new files will be stored in your shared directories (normally ''/var/hda/files/share_name/'').&lt;br /&gt;
&lt;br /&gt;
Also, touching anything inside the '''gh''' directories that Greyhole creates at the root of your partitions is a recipe for disaster.&lt;br /&gt;
&lt;br /&gt;
We [[Greyhole not on root | strongly discourage you from using the root partition in a drive pool]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== First things first ==&lt;br /&gt;
&lt;br /&gt;
You need to go in the Settings tab, and enable '''Advanced Settings'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Without Advanced Settings enabled, you won't see the following page and options.&lt;br /&gt;
&lt;br /&gt;
== For Storage Pool (Partitions) ==&lt;br /&gt;
&lt;br /&gt;
[[File:Storage_Pool_1.png|600px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
Select the drives you want available for your storage pool.&lt;br /&gt;
&lt;br /&gt;
== Greyhole options ==&lt;br /&gt;
&lt;br /&gt;
The next step is to select the share you want to replicate across the pool.&lt;br /&gt;
&lt;br /&gt;
From the Shares tab, select the Shares sub-catagory. We chose the Pictures share for this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[File:Greyhole_Options_1.png|600px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
Check the option for &amp;quot;Uses pool&amp;quot; and choose the number of drives to replicate this share. In this instance we have chosen to use all drives available to the greyhole pool.&lt;br /&gt;
&lt;br /&gt;
Note: Greyhole is not a backup solution. If a file is removed, all copies are removed.&lt;br /&gt;
&lt;br /&gt;
== Greyhole advanced options ==&lt;br /&gt;
&lt;br /&gt;
You can further configure Greyhole by manually editing the following file:&amp;lt;br/&amp;gt;&lt;br /&gt;
'''/var/hda/platform/html/config/greyhole.yml'''&lt;br /&gt;
&lt;br /&gt;
To see what options are available, and what they do, refer to the [https://gist.github.com/1379102 sample greyhole.conf] provided with Greyhole.&lt;br /&gt;
&lt;br /&gt;
greyhole.yml is in in YAML format. Most of it should be easy enough to modify. The only exception would be the sticky_files (and optional sticky_into) options.&amp;lt;br/&amp;gt;&lt;br /&gt;
Here's an example of how those should appear:&lt;br /&gt;
&lt;br /&gt;
To specify the following to Greyhole in greyhole.conf:&lt;br /&gt;
&lt;br /&gt;
{{Text|Text=sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Music/&lt;br /&gt;
 sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Videos/Movies/&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd1/gh&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd5/gh&lt;br /&gt;
 sticky_files &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; Backups/CrashPlan/&lt;br /&gt;
     stick_into &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt; /mnt/hdd0/gh}}&lt;br /&gt;
&lt;br /&gt;
one should specify this in the greyhole.yml file, where '''precise indentation matters''':&lt;br /&gt;
&lt;br /&gt;
{{Text|Text=sticky_files: &lt;br /&gt;
 - - Music/&lt;br /&gt;
 - - Videos/Movies/&lt;br /&gt;
   - - /mnt/hdd1/gh&lt;br /&gt;
     - /mnt/hdd5/gh&lt;br /&gt;
 - - Backups/CrashPlan/&lt;br /&gt;
   - - /mnt/hdd0/gh}}&lt;br /&gt;
&lt;br /&gt;
For your changes to be effective, you'll need to force Amahi to regenerate the greyhole.conf file. You can do so by editing a share, clicking it's path, and just clicking the Save button without actually changing the path.&lt;br /&gt;
&lt;br /&gt;
== Copying data into shares for the first time ==&lt;br /&gt;
&lt;br /&gt;
When you start using Greyhole, you might want to copy or move all your existing files into your new shares that use the storage pool.&lt;br /&gt;
&lt;br /&gt;
Note: This is not necessary if your files are already in Amahi shares. If they are there, and you enable the ''Uses pool'' option in the Amahi dashboard, the files will start getting moved around into the drives in your storage pool during the night (starting at midnight), when the nightly storage pool check starts.&amp;lt;br/&amp;gt;&lt;br /&gt;
The instructions below are for users who have more data to copy into the Greyhole shares than their currently free space in the /var/hda/files/ folder.&lt;br /&gt;
&lt;br /&gt;
One way to do that is to mount the shares that use the Greyhole storage pool, either on the HDA itself, or on a client computer on your local network, and copy your data from their existing location into the mounted shares.&lt;br /&gt;
This can be time consuming, but it is the safest way to use Greyhole.&lt;br /&gt;
&lt;br /&gt;
Another way to move your files from their current location into the storage pool is to share their current location using an Amahi share that ''Uses pool'', then let Greyhole's nightly check move the files from there into the pool.&lt;br /&gt;
&lt;br /&gt;
Here's a more detailed walkthrough for this method:&lt;br /&gt;
&lt;br /&gt;
# Setup the Greyhole Storage Pool in the Amahi dashboard, Shares &amp;gt; Storage Pool page.&lt;br /&gt;
# Go in the Shares &amp;gt; Shares page. In there, make sure you have an existing share for each share you have data for. Create new ones if you need, remove the ones you don't need.&lt;br /&gt;
# Edit the ''path'' of each of those shares, and enter the current location of your existing data. For example, the Movies share could have a path = ''/media/External Drive/Movies''&lt;br /&gt;
# Enable the ''Uses pool'' option for each of your shares, and select the number of extra copies you'd like, if any.&lt;br /&gt;
# Now, you either need to wait for Greyhole's nightly check to start, or you can start it manually from a terminal, as root, using this command: greyhole --fsck&lt;br /&gt;
# Monitor /var/log/greyhole.log to see when the ''fsck'' operation is done.&lt;br /&gt;
# Once ''fsck'' is done, your data has now been moved into the Greyhole storage pool (in the drives you selected in Shares &amp;gt; Storage Pool). All that should be left in the previous location of your data (''/media/External Drive/Movies'' from the previous example) should be symbolic links pointing to the new file copies. If the previous location is just empty directories (no symlinks), do not panic. This is normal if your previous location is an NTFS or FAT partition (drive).&lt;br /&gt;
# Move all those directories / symlinks from there into the correct folders in /var/hda/files/share_name&lt;br /&gt;
# Back in the Amahi dashboard, edit the path of the shares once again, and put back ''/var/hda/files/share_name'' (i.e. the folders where you moved the symbolic links).&lt;br /&gt;
# If you used an NTFS or FAT partition for the previous location, you'll need another fsck to create the symlinks where they should be. Either wait for midnight, or launch it manually, from a command line, as root: ''greyhole --fsck''&lt;br /&gt;
&lt;br /&gt;
You're done. All your existing data is now stored in the various drives included in your storage pool, and are accessible via the Samba shares you have defined in the Amahi dashboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding a new drive to your HDA and storage pool ==&lt;br /&gt;
This wiki page discusses [[Adding_a_second_hard_drive_to_your_HDA|how to add a new drive to your HDA and to your greyhole storage pool.]]&lt;br /&gt;
&lt;br /&gt;
== Drive Mounted as /media ==&lt;br /&gt;
Including any drive mounted as /media/Something in your storage pool is usually a bad idea.&amp;lt;br/&amp;gt;&lt;br /&gt;
Those mounts are created by the ''gnome-automounter'', which requires you to be logged in into X (Gnome) to become available.&amp;lt;br/&amp;gt;&lt;br /&gt;
This will create issues with Greyhole, which expects drives to always be available, and will take action when some of them are missing.&lt;br /&gt;
&lt;br /&gt;
Follow this guide to [[Adding a second hard drive to your HDA|permanently mount your drives]], before you include them in your storage pool.&lt;br /&gt;
&lt;br /&gt;
== Monitoring Greyhole ==&lt;br /&gt;
Sometimes you might want to monitor what Greyhole is doing, for example when writing data to your greyhole shares for the first time. Here are a few commands you can type in a terminal to follow along.&lt;br /&gt;
&lt;br /&gt;
'''Scrolling view of total Greyhole operations queue:'''&lt;br /&gt;
{{Code|while [ 1 &amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt; 1 ]; do greyhole --view-queue &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep Total; sleep 60; done}}&lt;br /&gt;
&lt;br /&gt;
'''Alternate way to watch Greyhole operations queue:'''&lt;br /&gt;
{{Code| watch -d greyhole --view-queue }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Scrolling log of what files Greyhole is working on right now:'''&lt;br /&gt;
{{Code|tail -f /var/log/greyhole.log}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Amahi App for watching the greyhole log in your web browser'''&lt;br /&gt;
http://www.amahi.org/apps/greyhole-logmon&lt;br /&gt;
&lt;br /&gt;
== Convert Greyhole from SQLite to MySQL ==&lt;br /&gt;
Greyhole is already using MySQL in Amahi 6.0&lt;br /&gt;
&lt;br /&gt;
Greyhole was previously using SQLite as the default database for queueing up tasks on Amahi. This was unique to Amahi as Greyhole was originally designed to use MySQL for this task.&lt;br /&gt;
&lt;br /&gt;
There are some major performance benefits to using MySQL over SQLite when writing large amounts of files. Switching can be especially useful when moving data to Greyhole shares for the first time. For now there is a script you can run if you want to switch over. This script has been tested to be safe while Greyhole is working but should be used with discretion.&lt;br /&gt;
&lt;br /&gt;
''To Convert to MySQL, run as root:''&lt;br /&gt;
&lt;br /&gt;
{{Code|/usr/share/greyhole/db_migration-sqlite2mysql.sh}}&lt;br /&gt;
&lt;br /&gt;
To see what DB engine is Greyhole using, do this:&lt;br /&gt;
&lt;br /&gt;
{{Code|grep db_engine /etc/greyhole.conf}}&lt;br /&gt;
&lt;br /&gt;
== Disable Greyhole ==&lt;br /&gt;
For those who do not use Greyhole, you can disable it.  This is based on the fact you never have used it by enabling 'Uses pool' on any share.  Recommend using extreme caution as this could have unpredictable results.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps as user '''root''':&lt;br /&gt;
&lt;br /&gt;
{{Code|chkconfig greyhole off&lt;br /&gt;
rm /etc/monit.d/greyhole.conf&lt;br /&gt;
service monit restart&lt;br /&gt;
service greyhole stop}}&lt;br /&gt;
&lt;br /&gt;
'''DO NOT''' attempt to remove the Greyhole package as it is a dependency of the HDA software.  Doing so will break your HDA.&lt;br /&gt;
&lt;br /&gt;
= Testing and Reliability =&lt;br /&gt;
&lt;br /&gt;
Check out the [[Greyhole grinder]] to help make Greyhole rock solid.&lt;br /&gt;
&lt;br /&gt;
= Reconnect the Greyhole storage pool =&lt;br /&gt;
&lt;br /&gt;
If you upgrade and/or reinstall Amahi and need to get your drives with data on them to the new system, follow this  [[Reconnect_existing_Greyhole_storage pool]] guide.&lt;br /&gt;
&lt;br /&gt;
= Greyhole Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
Page: [[Greyhole troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
= Landing Zone Considerations =&lt;br /&gt;
&lt;br /&gt;
The landing zone or LZ is the area where files arrive first before being distributed to their final destination. See details in the [[Greyhole landing zone]] page.&lt;br /&gt;
&lt;br /&gt;
= Manually updating Greyhole for Amahi =&lt;br /&gt;
Page: [[Greyhole updating]]&lt;br /&gt;
&lt;br /&gt;
= Emptying Greyhole Attic =&lt;br /&gt;
{{Code|greyhole --empty-attic}}&lt;br /&gt;
About the attic: The attic is used like a Recycle Bin, or Trash.&lt;br /&gt;
That means you'll need to manually empty it once in a while.&lt;br /&gt;
To do so, use the --empty-attic parameter (see above).&lt;br /&gt;
Another option is to create a 'Greyhole Attic' Samba share.&lt;br /&gt;
More details about that here: https://github.com/gboudreau/Greyhole/wiki/AboutTrash&lt;br /&gt;
&lt;br /&gt;
= Moving drives/data out of Greyhole =&lt;br /&gt;
You may need to remove a drive from Greyhole and transfer the share files to another drive: [[Greyhole moving data out of the pool]]&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
Good [http://revxatlarge.blogspot.com/2011/04/restoring-deleted-files-in-greyhole-and.html article] on Greyhole with terms explained.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Talk:Partitions_Over_2.1_TB&amp;diff=71174</id>
		<title>Talk:Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Talk:Partitions_Over_2.1_TB&amp;diff=71174"/>
		<updated>2013-05-29T23:46:28Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;2013.05.29: Removed the whole bit about editing the hda-diskmount script / manually mounting drive because the hda-diskmount script has supported GPT partitions since early 2012.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Talk:Partitions_Over_2.1_TB&amp;diff=71168</id>
		<title>Talk:Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Talk:Partitions_Over_2.1_TB&amp;diff=71168"/>
		<updated>2013-05-29T23:46:06Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: Created page with &amp;quot;Removed the whole bit about editing the hda-diskmount script / manually mounting drive because the hda-diskmount script has supported GPT partitions since early 2012.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Removed the whole bit about editing the hda-diskmount script / manually mounting drive because the hda-diskmount script has supported GPT partitions since early 2012.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71162</id>
		<title>Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71162"/>
		<updated>2013-05-29T23:43:37Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Format the drive! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Foreward=&lt;br /&gt;
You cannot use a &amp;gt;=2.1TB partition as your boot device unless you have a UEFI bios.  That is beyond the scope of this article. &lt;br /&gt;
&lt;br /&gt;
When using a &amp;gt;=2.1TB partition, you should be running 64-bit Amahi.&lt;br /&gt;
&lt;br /&gt;
Before you use a &amp;gt;=2.1TB drive on Windows, please read this support article: http://support.microsoft.com/kb/2581408&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As hard drives have increased in capacity over time, some clever workarounds have been engineered to keep breaking barriers, such as the move from CHS to LBA.  Unfortunately, with older style MBR partitions, there is a limit of 2.1TB that simply cannot be worked around using an MBR partition.  We have to instead use newer GPT style partitions.&lt;br /&gt;
&lt;br /&gt;
I'm not going to delve into the history too much, you can google/wikipedia it yourself if you like.&lt;br /&gt;
&lt;br /&gt;
So, if you've just purchased a snazzy new 3TB drive like a Western Digital Caviar Green, and you're scratching your head as to why you can't get the full capacity, here's the fix.&lt;br /&gt;
&lt;br /&gt;
=Assumptions=&lt;br /&gt;
The below documentation assumes you have an existing boot drive with Amahi, namely /dev/sda.  Your &amp;gt;2.1TB HDD will be /dev/sdb&lt;br /&gt;
&lt;br /&gt;
The instructions also assume a Linux terminal, such as that on your Amahi box (either using its console, the Terminal application within the GUI, or SSH'd in)&lt;br /&gt;
&lt;br /&gt;
=Warning=&lt;br /&gt;
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.  WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS, HARDWARE MALFUNCTION, ETC!&lt;br /&gt;
&lt;br /&gt;
=OK, Let's do it=&lt;br /&gt;
First we label the drive with a GPT partition&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mklabel gpt&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we select sectors as a unit of measurement&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb unit s&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we make the partition.  &lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mkpart primary ext4 2048 -1&lt;br /&gt;
}}&lt;br /&gt;
Parted may complain about the last sector and will automatically suggest a correct sector, just say Yes to the prompt.&lt;br /&gt;
&lt;br /&gt;
We make it as a primary partition, ext4 filesystem, and we carefully select the sectors.  The first number MUST be divisible by 8, so you can try 40, 48, 56, 64 etc...  For me these numbers threw up errors, so I just went to 2048 and everything worked fine, and in the grand scheme of a 3TB drive, the extra sectors don't really matter :)&lt;br /&gt;
&lt;br /&gt;
The reason that the starting sector is divisible by 8 is for aligning the sectors.  This is because HDD's have traditionally been based around 512-byte sectors, yet newer, higher capacity HDD's are now arriving based around 4096-byte (a.k.a. 4k) sectors.  The partitioning will still work with 512-bytes, but the drive's performance will be drastically impacted - in some testing it can be twice as slow, in others up to 25 times slower, depending on the sector alignment.  So it's important to get this right!!!&lt;br /&gt;
&lt;br /&gt;
=Alternative Parted usage=&lt;br /&gt;
Instead of the sequence of one liners up there, you can enter into parted itself like this.  I give this as I don't know how your version of parted is going to behave.  The interactive stuff from parted has been removed:&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb&lt;br /&gt;
(parted) mklabel gpt&lt;br /&gt;
(parted) unit s&lt;br /&gt;
(parted) mkpart primary ext4 2048 -1&lt;br /&gt;
(parted) quit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Format the drive!=&lt;br /&gt;
Finally, let's get that drive formatted to a nice ext4 volume:&lt;br /&gt;
{{Code|&lt;br /&gt;
mkfs.ext4 -T largefile4 /dev/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Adding to your HDA=&lt;br /&gt;
See [[Adding_a_second_hard_drive_to_your_HDA#Mount_the_hard_drive]]&lt;br /&gt;
&lt;br /&gt;
=A note about Western Digital drives=&lt;br /&gt;
Western Digital make some nice hardware, but they are also incredibly stupid.  Many of their hard drives will automatically park their heads every 8 seconds, which wears out the hard drives very quickly, in some cases the HDD's will reach their design limit (300k parks for consumer, 600k parks for enterprise) within 3-4 months!!!  This isn't to say that the drives will necessarily die within 3-4 months, but it's still not good!&lt;br /&gt;
&lt;br /&gt;
Fortunately we can fix this using a Western Digital tool named wdidle3.  You can download it [http://support.wdc.com/product/download.asp?groupid=609&amp;amp;sid=113 here].&lt;br /&gt;
&lt;br /&gt;
Create a bootable usb drive using [http://www.freedos.org/freedos/files/ FreeDOS] and [http://unetbootin.sourceforge.net/ unetbootin], then copy wdidle.exe onto the usb drive.  Boot up your Amahi box to FreeDOS and enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
c:\&lt;br /&gt;
wdidle3 /R&lt;br /&gt;
wdidle3 /S300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This cd's you to the usb drive's root, then we run wdidle3 /R to display the current drive status, then we run wdidle3 /S300 to set the park time to 5 minutes.  Alternatively you could run wdidle3 /D to completely disable the parking.&lt;br /&gt;
&lt;br /&gt;
When you're done, simply restart the PC!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n.b. Unetbootin was a bit finnicky for me, I found that if I created the drive with a FreeDOS live CD that it wouldn't work, but if I then re-created using unetbootin's automatic distribution download feature, the USB stick worked a treat.  YMMV.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71156</id>
		<title>Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71156"/>
		<updated>2013-05-29T23:43:15Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Adding the drive to your HDA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Foreward=&lt;br /&gt;
You cannot use a &amp;gt;=2.1TB partition as your boot device unless you have a UEFI bios.  That is beyond the scope of this article. &lt;br /&gt;
&lt;br /&gt;
When using a &amp;gt;=2.1TB partition, you should be running 64-bit Amahi.&lt;br /&gt;
&lt;br /&gt;
Before you use a &amp;gt;=2.1TB drive on Windows, please read this support article: http://support.microsoft.com/kb/2581408&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As hard drives have increased in capacity over time, some clever workarounds have been engineered to keep breaking barriers, such as the move from CHS to LBA.  Unfortunately, with older style MBR partitions, there is a limit of 2.1TB that simply cannot be worked around using an MBR partition.  We have to instead use newer GPT style partitions.&lt;br /&gt;
&lt;br /&gt;
I'm not going to delve into the history too much, you can google/wikipedia it yourself if you like.&lt;br /&gt;
&lt;br /&gt;
So, if you've just purchased a snazzy new 3TB drive like a Western Digital Caviar Green, and you're scratching your head as to why you can't get the full capacity, here's the fix.&lt;br /&gt;
&lt;br /&gt;
=Assumptions=&lt;br /&gt;
The below documentation assumes you have an existing boot drive with Amahi, namely /dev/sda.  Your &amp;gt;2.1TB HDD will be /dev/sdb&lt;br /&gt;
&lt;br /&gt;
The instructions also assume a Linux terminal, such as that on your Amahi box (either using its console, the Terminal application within the GUI, or SSH'd in)&lt;br /&gt;
&lt;br /&gt;
=Warning=&lt;br /&gt;
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.  WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS, HARDWARE MALFUNCTION, ETC!&lt;br /&gt;
&lt;br /&gt;
=OK, Let's do it=&lt;br /&gt;
First we label the drive with a GPT partition&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mklabel gpt&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we select sectors as a unit of measurement&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb unit s&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we make the partition.  &lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mkpart primary ext4 2048 -1&lt;br /&gt;
}}&lt;br /&gt;
Parted may complain about the last sector and will automatically suggest a correct sector, just say Yes to the prompt.&lt;br /&gt;
&lt;br /&gt;
We make it as a primary partition, ext4 filesystem, and we carefully select the sectors.  The first number MUST be divisible by 8, so you can try 40, 48, 56, 64 etc...  For me these numbers threw up errors, so I just went to 2048 and everything worked fine, and in the grand scheme of a 3TB drive, the extra sectors don't really matter :)&lt;br /&gt;
&lt;br /&gt;
The reason that the starting sector is divisible by 8 is for aligning the sectors.  This is because HDD's have traditionally been based around 512-byte sectors, yet newer, higher capacity HDD's are now arriving based around 4096-byte (a.k.a. 4k) sectors.  The partitioning will still work with 512-bytes, but the drive's performance will be drastically impacted - in some testing it can be twice as slow, in others up to 25 times slower, depending on the sector alignment.  So it's important to get this right!!!&lt;br /&gt;
&lt;br /&gt;
=Alternative Parted usage=&lt;br /&gt;
Instead of the sequence of one liners up there, you can enter into parted itself like this.  I give this as I don't know how your version of parted is going to behave.  The interactive stuff from parted has been removed:&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb&lt;br /&gt;
(parted) mklabel gpt&lt;br /&gt;
(parted) unit s&lt;br /&gt;
(parted) mkpart primary ext4 2048 -1&lt;br /&gt;
(parted) quit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Format the drive!=&lt;br /&gt;
Finally, let's get that drive formatted to a nice ext4 volume:&lt;br /&gt;
{{Code|&lt;br /&gt;
mkfs.ext4 -T largefile4 /dev/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
See [[Adding_a_second_hard_drive_to_your_HDA#Mount_the_hard_drive]]&lt;br /&gt;
&lt;br /&gt;
=A note about Western Digital drives=&lt;br /&gt;
Western Digital make some nice hardware, but they are also incredibly stupid.  Many of their hard drives will automatically park their heads every 8 seconds, which wears out the hard drives very quickly, in some cases the HDD's will reach their design limit (300k parks for consumer, 600k parks for enterprise) within 3-4 months!!!  This isn't to say that the drives will necessarily die within 3-4 months, but it's still not good!&lt;br /&gt;
&lt;br /&gt;
Fortunately we can fix this using a Western Digital tool named wdidle3.  You can download it [http://support.wdc.com/product/download.asp?groupid=609&amp;amp;sid=113 here].&lt;br /&gt;
&lt;br /&gt;
Create a bootable usb drive using [http://www.freedos.org/freedos/files/ FreeDOS] and [http://unetbootin.sourceforge.net/ unetbootin], then copy wdidle.exe onto the usb drive.  Boot up your Amahi box to FreeDOS and enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
c:\&lt;br /&gt;
wdidle3 /R&lt;br /&gt;
wdidle3 /S300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This cd's you to the usb drive's root, then we run wdidle3 /R to display the current drive status, then we run wdidle3 /S300 to set the park time to 5 minutes.  Alternatively you could run wdidle3 /D to completely disable the parking.&lt;br /&gt;
&lt;br /&gt;
When you're done, simply restart the PC!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n.b. Unetbootin was a bit finnicky for me, I found that if I created the drive with a FreeDOS live CD that it wouldn't work, but if I then re-created using unetbootin's automatic distribution download feature, the USB stick worked a treat.  YMMV.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71150</id>
		<title>Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71150"/>
		<updated>2013-05-29T23:38:51Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Alternative Parted usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Foreward=&lt;br /&gt;
You cannot use a &amp;gt;=2.1TB partition as your boot device unless you have a UEFI bios.  That is beyond the scope of this article. &lt;br /&gt;
&lt;br /&gt;
When using a &amp;gt;=2.1TB partition, you should be running 64-bit Amahi.&lt;br /&gt;
&lt;br /&gt;
Before you use a &amp;gt;=2.1TB drive on Windows, please read this support article: http://support.microsoft.com/kb/2581408&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As hard drives have increased in capacity over time, some clever workarounds have been engineered to keep breaking barriers, such as the move from CHS to LBA.  Unfortunately, with older style MBR partitions, there is a limit of 2.1TB that simply cannot be worked around using an MBR partition.  We have to instead use newer GPT style partitions.&lt;br /&gt;
&lt;br /&gt;
I'm not going to delve into the history too much, you can google/wikipedia it yourself if you like.&lt;br /&gt;
&lt;br /&gt;
So, if you've just purchased a snazzy new 3TB drive like a Western Digital Caviar Green, and you're scratching your head as to why you can't get the full capacity, here's the fix.&lt;br /&gt;
&lt;br /&gt;
=Assumptions=&lt;br /&gt;
The below documentation assumes you have an existing boot drive with Amahi, namely /dev/sda.  Your &amp;gt;2.1TB HDD will be /dev/sdb&lt;br /&gt;
&lt;br /&gt;
The instructions also assume a Linux terminal, such as that on your Amahi box (either using its console, the Terminal application within the GUI, or SSH'd in)&lt;br /&gt;
&lt;br /&gt;
=Warning=&lt;br /&gt;
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.  WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS, HARDWARE MALFUNCTION, ETC!&lt;br /&gt;
&lt;br /&gt;
=OK, Let's do it=&lt;br /&gt;
First we label the drive with a GPT partition&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mklabel gpt&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we select sectors as a unit of measurement&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb unit s&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we make the partition.  &lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mkpart primary ext4 2048 -1&lt;br /&gt;
}}&lt;br /&gt;
Parted may complain about the last sector and will automatically suggest a correct sector, just say Yes to the prompt.&lt;br /&gt;
&lt;br /&gt;
We make it as a primary partition, ext4 filesystem, and we carefully select the sectors.  The first number MUST be divisible by 8, so you can try 40, 48, 56, 64 etc...  For me these numbers threw up errors, so I just went to 2048 and everything worked fine, and in the grand scheme of a 3TB drive, the extra sectors don't really matter :)&lt;br /&gt;
&lt;br /&gt;
The reason that the starting sector is divisible by 8 is for aligning the sectors.  This is because HDD's have traditionally been based around 512-byte sectors, yet newer, higher capacity HDD's are now arriving based around 4096-byte (a.k.a. 4k) sectors.  The partitioning will still work with 512-bytes, but the drive's performance will be drastically impacted - in some testing it can be twice as slow, in others up to 25 times slower, depending on the sector alignment.  So it's important to get this right!!!&lt;br /&gt;
&lt;br /&gt;
=Alternative Parted usage=&lt;br /&gt;
Instead of the sequence of one liners up there, you can enter into parted itself like this.  I give this as I don't know how your version of parted is going to behave.  The interactive stuff from parted has been removed:&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb&lt;br /&gt;
(parted) mklabel gpt&lt;br /&gt;
(parted) unit s&lt;br /&gt;
(parted) mkpart primary ext4 2048 -1&lt;br /&gt;
(parted) quit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Format the drive!=&lt;br /&gt;
Finally, let's get that drive formatted to a nice ext4 volume:&lt;br /&gt;
{{Code|&lt;br /&gt;
mkfs.ext4 -T largefile4 /dev/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Adding the drive to your HDA=&lt;br /&gt;
Normally to add a drive to Amahi, you would run the script '''hda-diskmount''', which searches for any unmounted drives and mounts them.  Unfortunately, this script doesn't yet cater for GPT partitions.  It runs an '''fdisk -l''' and searches out drives with a Linux system type, and with what it finds it mounts any that aren't mounted.&lt;br /&gt;
&lt;br /&gt;
If we run '''fdisk -l''' by itself, we will see that our new drive doesn't return a system type of 'Linux', instead it returns 'GPT' as well as a warning:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 4096 bytes&lt;br /&gt;
I/O size (minimum/optimal): 4096 bytes / 4096 bytes&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sdb1               1  4294967295  2147483647+  ee  GPT&lt;br /&gt;
Partition 1 does not start on physical sector boundary.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
So hda-diskmount correctly ignores the drive.  You can either [http://forums.amahi.org/viewtopic.php?f=15&amp;amp;t=2326 fix hda-diskmount], or you can manually mount the drives with the instructions below.&lt;br /&gt;
&lt;br /&gt;
First we make our mount point&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
mkdir /var/hda/files/drives/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next we exercise good practice and backup our fstab file, I like to use `date +%Y%m%d` to give the name a date stamp e.g. /etc/fstab.20110731 represents a backup done on the 31st of July, 2011.  This isn't necessary, you could just use something like 'fstab.old', but date-stamping your file backups is a good habit to get into&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cp /etc/fstab /etc/fstab.`date +%Y%m%d`&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we adjust the fstab file&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= echo -e /dev/sdb1$'\t\t'/var/hda/files/drives/sdb1$'\t'ext4$'\t'defaults$'\t'1 1 &amp;gt;&amp;gt; /etc/fstab&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
What this does is adds a line to the /etc/fstab file, telling it that when Amahi boots, it has to mount the drive.  The $'\t' entries simply mean 'put in a tab space'&lt;br /&gt;
&lt;br /&gt;
If you now run '''cat /etc/fstab''' you should see a nice entry at the bottom, similar to this&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cat /etc/fstab&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# /etc/fstab&lt;br /&gt;
# Created by anaconda on Thu Jul 28 23:56:48 2011&lt;br /&gt;
#&lt;br /&gt;
# Accessible filesystems, by reference, are maintained under '/dev/disk'&lt;br /&gt;
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info&lt;br /&gt;
#&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 /                       ext4    defaults        1 1&lt;br /&gt;
UUID=cc1204dd-a4f8-42f8-8736-b5970251a865 /boot                   ext4    defaults        1 2&lt;br /&gt;
/dev/mapper/vg_hda-LogVol00 swap                    swap    defaults        0 0&lt;br /&gt;
tmpfs                   /dev/shm                tmpfs   defaults        0 0&lt;br /&gt;
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0&lt;br /&gt;
sysfs                   /sys                    sysfs   defaults        0 0&lt;br /&gt;
proc                    /proc                   proc    defaults        0 0&lt;br /&gt;
/dev/sdb1		/var/hda/files/drives/sdb1	ext4	defaults	1 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now you can either reboot to allow the fstab file to mount your new drive, or you can simply run '''mount -a'''&lt;br /&gt;
&lt;br /&gt;
Now if you run mount by itself, you should see your drive listed e.g.&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= mount&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 on / type ext4 (rw)&lt;br /&gt;
proc on /proc type proc (rw)&lt;br /&gt;
sysfs on /sys type sysfs (rw)&lt;br /&gt;
devpts on /dev/pts type devpts (rw,gid=5,mode=620)&lt;br /&gt;
tmpfs on /dev/shm type tmpfs (rw)&lt;br /&gt;
/dev/sda1 on /boot type ext4 (rw)&lt;br /&gt;
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)&lt;br /&gt;
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)&lt;br /&gt;
fusectl on /sys/fs/fuse/connections type fusectl (rw)&lt;br /&gt;
/dev/sdd1 on /media/520abb16-ac7c-4f65-9cc3-9e536c93dca2 type ext4 (rw,nosuid,nodev,uhelper=udisks)&lt;br /&gt;
/dev/sdb1 on /var/hda/files/drives/sdb1 type ext4 (rw)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=A note about Western Digital drives=&lt;br /&gt;
Western Digital make some nice hardware, but they are also incredibly stupid.  Many of their hard drives will automatically park their heads every 8 seconds, which wears out the hard drives very quickly, in some cases the HDD's will reach their design limit (300k parks for consumer, 600k parks for enterprise) within 3-4 months!!!  This isn't to say that the drives will necessarily die within 3-4 months, but it's still not good!&lt;br /&gt;
&lt;br /&gt;
Fortunately we can fix this using a Western Digital tool named wdidle3.  You can download it [http://support.wdc.com/product/download.asp?groupid=609&amp;amp;sid=113 here].&lt;br /&gt;
&lt;br /&gt;
Create a bootable usb drive using [http://www.freedos.org/freedos/files/ FreeDOS] and [http://unetbootin.sourceforge.net/ unetbootin], then copy wdidle.exe onto the usb drive.  Boot up your Amahi box to FreeDOS and enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
c:\&lt;br /&gt;
wdidle3 /R&lt;br /&gt;
wdidle3 /S300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This cd's you to the usb drive's root, then we run wdidle3 /R to display the current drive status, then we run wdidle3 /S300 to set the park time to 5 minutes.  Alternatively you could run wdidle3 /D to completely disable the parking.&lt;br /&gt;
&lt;br /&gt;
When you're done, simply restart the PC!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n.b. Unetbootin was a bit finnicky for me, I found that if I created the drive with a FreeDOS live CD that it wouldn't work, but if I then re-created using unetbootin's automatic distribution download feature, the USB stick worked a treat.  YMMV.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71144</id>
		<title>Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71144"/>
		<updated>2013-05-29T23:38:31Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* OK, Let's do it */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Foreward=&lt;br /&gt;
You cannot use a &amp;gt;=2.1TB partition as your boot device unless you have a UEFI bios.  That is beyond the scope of this article. &lt;br /&gt;
&lt;br /&gt;
When using a &amp;gt;=2.1TB partition, you should be running 64-bit Amahi.&lt;br /&gt;
&lt;br /&gt;
Before you use a &amp;gt;=2.1TB drive on Windows, please read this support article: http://support.microsoft.com/kb/2581408&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As hard drives have increased in capacity over time, some clever workarounds have been engineered to keep breaking barriers, such as the move from CHS to LBA.  Unfortunately, with older style MBR partitions, there is a limit of 2.1TB that simply cannot be worked around using an MBR partition.  We have to instead use newer GPT style partitions.&lt;br /&gt;
&lt;br /&gt;
I'm not going to delve into the history too much, you can google/wikipedia it yourself if you like.&lt;br /&gt;
&lt;br /&gt;
So, if you've just purchased a snazzy new 3TB drive like a Western Digital Caviar Green, and you're scratching your head as to why you can't get the full capacity, here's the fix.&lt;br /&gt;
&lt;br /&gt;
=Assumptions=&lt;br /&gt;
The below documentation assumes you have an existing boot drive with Amahi, namely /dev/sda.  Your &amp;gt;2.1TB HDD will be /dev/sdb&lt;br /&gt;
&lt;br /&gt;
The instructions also assume a Linux terminal, such as that on your Amahi box (either using its console, the Terminal application within the GUI, or SSH'd in)&lt;br /&gt;
&lt;br /&gt;
=Warning=&lt;br /&gt;
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.  WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS, HARDWARE MALFUNCTION, ETC!&lt;br /&gt;
&lt;br /&gt;
=OK, Let's do it=&lt;br /&gt;
First we label the drive with a GPT partition&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mklabel gpt&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we select sectors as a unit of measurement&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb unit s&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we make the partition.  &lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mkpart primary ext4 2048 -1&lt;br /&gt;
}}&lt;br /&gt;
Parted may complain about the last sector and will automatically suggest a correct sector, just say Yes to the prompt.&lt;br /&gt;
&lt;br /&gt;
We make it as a primary partition, ext4 filesystem, and we carefully select the sectors.  The first number MUST be divisible by 8, so you can try 40, 48, 56, 64 etc...  For me these numbers threw up errors, so I just went to 2048 and everything worked fine, and in the grand scheme of a 3TB drive, the extra sectors don't really matter :)&lt;br /&gt;
&lt;br /&gt;
The reason that the starting sector is divisible by 8 is for aligning the sectors.  This is because HDD's have traditionally been based around 512-byte sectors, yet newer, higher capacity HDD's are now arriving based around 4096-byte (a.k.a. 4k) sectors.  The partitioning will still work with 512-bytes, but the drive's performance will be drastically impacted - in some testing it can be twice as slow, in others up to 25 times slower, depending on the sector alignment.  So it's important to get this right!!!&lt;br /&gt;
&lt;br /&gt;
=Alternative Parted usage=&lt;br /&gt;
Instead of the sequence of one liners up there, you can enter into parted itself like this.  I give this as I don't know how your version of parted is going to behave.  The interactive stuff from parted has been removed:&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb&lt;br /&gt;
(parted) mklabel gpt&lt;br /&gt;
(parted) unit s&lt;br /&gt;
(parted) mkpart primary ext2 2048 -1&lt;br /&gt;
(parted) quit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Format the drive!=&lt;br /&gt;
Finally, let's get that drive formatted to a nice ext4 volume:&lt;br /&gt;
{{Code|&lt;br /&gt;
mkfs.ext4 -T largefile4 /dev/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Adding the drive to your HDA=&lt;br /&gt;
Normally to add a drive to Amahi, you would run the script '''hda-diskmount''', which searches for any unmounted drives and mounts them.  Unfortunately, this script doesn't yet cater for GPT partitions.  It runs an '''fdisk -l''' and searches out drives with a Linux system type, and with what it finds it mounts any that aren't mounted.&lt;br /&gt;
&lt;br /&gt;
If we run '''fdisk -l''' by itself, we will see that our new drive doesn't return a system type of 'Linux', instead it returns 'GPT' as well as a warning:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 4096 bytes&lt;br /&gt;
I/O size (minimum/optimal): 4096 bytes / 4096 bytes&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sdb1               1  4294967295  2147483647+  ee  GPT&lt;br /&gt;
Partition 1 does not start on physical sector boundary.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
So hda-diskmount correctly ignores the drive.  You can either [http://forums.amahi.org/viewtopic.php?f=15&amp;amp;t=2326 fix hda-diskmount], or you can manually mount the drives with the instructions below.&lt;br /&gt;
&lt;br /&gt;
First we make our mount point&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
mkdir /var/hda/files/drives/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next we exercise good practice and backup our fstab file, I like to use `date +%Y%m%d` to give the name a date stamp e.g. /etc/fstab.20110731 represents a backup done on the 31st of July, 2011.  This isn't necessary, you could just use something like 'fstab.old', but date-stamping your file backups is a good habit to get into&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cp /etc/fstab /etc/fstab.`date +%Y%m%d`&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we adjust the fstab file&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= echo -e /dev/sdb1$'\t\t'/var/hda/files/drives/sdb1$'\t'ext4$'\t'defaults$'\t'1 1 &amp;gt;&amp;gt; /etc/fstab&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
What this does is adds a line to the /etc/fstab file, telling it that when Amahi boots, it has to mount the drive.  The $'\t' entries simply mean 'put in a tab space'&lt;br /&gt;
&lt;br /&gt;
If you now run '''cat /etc/fstab''' you should see a nice entry at the bottom, similar to this&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cat /etc/fstab&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# /etc/fstab&lt;br /&gt;
# Created by anaconda on Thu Jul 28 23:56:48 2011&lt;br /&gt;
#&lt;br /&gt;
# Accessible filesystems, by reference, are maintained under '/dev/disk'&lt;br /&gt;
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info&lt;br /&gt;
#&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 /                       ext4    defaults        1 1&lt;br /&gt;
UUID=cc1204dd-a4f8-42f8-8736-b5970251a865 /boot                   ext4    defaults        1 2&lt;br /&gt;
/dev/mapper/vg_hda-LogVol00 swap                    swap    defaults        0 0&lt;br /&gt;
tmpfs                   /dev/shm                tmpfs   defaults        0 0&lt;br /&gt;
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0&lt;br /&gt;
sysfs                   /sys                    sysfs   defaults        0 0&lt;br /&gt;
proc                    /proc                   proc    defaults        0 0&lt;br /&gt;
/dev/sdb1		/var/hda/files/drives/sdb1	ext4	defaults	1 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now you can either reboot to allow the fstab file to mount your new drive, or you can simply run '''mount -a'''&lt;br /&gt;
&lt;br /&gt;
Now if you run mount by itself, you should see your drive listed e.g.&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= mount&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 on / type ext4 (rw)&lt;br /&gt;
proc on /proc type proc (rw)&lt;br /&gt;
sysfs on /sys type sysfs (rw)&lt;br /&gt;
devpts on /dev/pts type devpts (rw,gid=5,mode=620)&lt;br /&gt;
tmpfs on /dev/shm type tmpfs (rw)&lt;br /&gt;
/dev/sda1 on /boot type ext4 (rw)&lt;br /&gt;
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)&lt;br /&gt;
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)&lt;br /&gt;
fusectl on /sys/fs/fuse/connections type fusectl (rw)&lt;br /&gt;
/dev/sdd1 on /media/520abb16-ac7c-4f65-9cc3-9e536c93dca2 type ext4 (rw,nosuid,nodev,uhelper=udisks)&lt;br /&gt;
/dev/sdb1 on /var/hda/files/drives/sdb1 type ext4 (rw)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=A note about Western Digital drives=&lt;br /&gt;
Western Digital make some nice hardware, but they are also incredibly stupid.  Many of their hard drives will automatically park their heads every 8 seconds, which wears out the hard drives very quickly, in some cases the HDD's will reach their design limit (300k parks for consumer, 600k parks for enterprise) within 3-4 months!!!  This isn't to say that the drives will necessarily die within 3-4 months, but it's still not good!&lt;br /&gt;
&lt;br /&gt;
Fortunately we can fix this using a Western Digital tool named wdidle3.  You can download it [http://support.wdc.com/product/download.asp?groupid=609&amp;amp;sid=113 here].&lt;br /&gt;
&lt;br /&gt;
Create a bootable usb drive using [http://www.freedos.org/freedos/files/ FreeDOS] and [http://unetbootin.sourceforge.net/ unetbootin], then copy wdidle.exe onto the usb drive.  Boot up your Amahi box to FreeDOS and enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
c:\&lt;br /&gt;
wdidle3 /R&lt;br /&gt;
wdidle3 /S300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This cd's you to the usb drive's root, then we run wdidle3 /R to display the current drive status, then we run wdidle3 /S300 to set the park time to 5 minutes.  Alternatively you could run wdidle3 /D to completely disable the parking.&lt;br /&gt;
&lt;br /&gt;
When you're done, simply restart the PC!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n.b. Unetbootin was a bit finnicky for me, I found that if I created the drive with a FreeDOS live CD that it wouldn't work, but if I then re-created using unetbootin's automatic distribution download feature, the USB stick worked a treat.  YMMV.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71138</id>
		<title>Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71138"/>
		<updated>2013-05-29T23:32:10Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Foreward */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Foreward=&lt;br /&gt;
You cannot use a &amp;gt;=2.1TB partition as your boot device unless you have a UEFI bios.  That is beyond the scope of this article. &lt;br /&gt;
&lt;br /&gt;
When using a &amp;gt;=2.1TB partition, you should be running 64-bit Amahi.&lt;br /&gt;
&lt;br /&gt;
Before you use a &amp;gt;=2.1TB drive on Windows, please read this support article: http://support.microsoft.com/kb/2581408&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As hard drives have increased in capacity over time, some clever workarounds have been engineered to keep breaking barriers, such as the move from CHS to LBA.  Unfortunately, with older style MBR partitions, there is a limit of 2.1TB that simply cannot be worked around using an MBR partition.  We have to instead use newer GPT style partitions.&lt;br /&gt;
&lt;br /&gt;
I'm not going to delve into the history too much, you can google/wikipedia it yourself if you like.&lt;br /&gt;
&lt;br /&gt;
So, if you've just purchased a snazzy new 3TB drive like a Western Digital Caviar Green, and you're scratching your head as to why you can't get the full capacity, here's the fix.&lt;br /&gt;
&lt;br /&gt;
=Assumptions=&lt;br /&gt;
The below documentation assumes you have an existing boot drive with Amahi, namely /dev/sda.  Your &amp;gt;2.1TB HDD will be /dev/sdb&lt;br /&gt;
&lt;br /&gt;
The instructions also assume a Linux terminal, such as that on your Amahi box (either using its console, the Terminal application within the GUI, or SSH'd in)&lt;br /&gt;
&lt;br /&gt;
=Warning=&lt;br /&gt;
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.  WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS, HARDWARE MALFUNCTION, ETC!&lt;br /&gt;
&lt;br /&gt;
=OK, Let's do it=&lt;br /&gt;
First we label the drive with a GPT partition&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mklabel gpt&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we select sectors as a unit of measurement&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb unit s&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we make the partition.  &lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mkpart primary ext2 2048 -1&lt;br /&gt;
}}&lt;br /&gt;
Parted may complain about the last sector and will automatically suggest a correct sector, just say Yes to the prompt.&lt;br /&gt;
&lt;br /&gt;
We make it as a primary partition, ext2 filesystem, and we carefully select the sectors.  The first number MUST be divisible by 8, so you can try 40, 48, 56, 64 etc...  For me these numbers threw up errors, so I just went to 2048 and everything worked fine, and in the grand scheme of a 3TB drive, the extra sectors don't really matter :)&lt;br /&gt;
&lt;br /&gt;
The reason that the starting sector is divisible by 8 is for aligning the sectors.  This is because HDD's have traditionally been based around 512-byte sectors, yet newer, higher capacity HDD's are now arriving based around 4096-byte (a.k.a. 4k) sectors.  The partitioning will still work with 512-bytes, but the drive's performance will be drastically impacted - in some testing it can be twice as slow, in others up to 25 times slower, depending on the sector alignment.  So it's important to get this right!!!&lt;br /&gt;
&lt;br /&gt;
=Alternative Parted usage=&lt;br /&gt;
Instead of the sequence of one liners up there, you can enter into parted itself like this.  I give this as I don't know how your version of parted is going to behave.  The interactive stuff from parted has been removed:&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb&lt;br /&gt;
(parted) mklabel gpt&lt;br /&gt;
(parted) unit s&lt;br /&gt;
(parted) mkpart primary ext2 2048 -1&lt;br /&gt;
(parted) quit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Format the drive!=&lt;br /&gt;
Finally, let's get that drive formatted to a nice ext4 volume:&lt;br /&gt;
{{Code|&lt;br /&gt;
mkfs.ext4 -T largefile4 /dev/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Adding the drive to your HDA=&lt;br /&gt;
Normally to add a drive to Amahi, you would run the script '''hda-diskmount''', which searches for any unmounted drives and mounts them.  Unfortunately, this script doesn't yet cater for GPT partitions.  It runs an '''fdisk -l''' and searches out drives with a Linux system type, and with what it finds it mounts any that aren't mounted.&lt;br /&gt;
&lt;br /&gt;
If we run '''fdisk -l''' by itself, we will see that our new drive doesn't return a system type of 'Linux', instead it returns 'GPT' as well as a warning:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 4096 bytes&lt;br /&gt;
I/O size (minimum/optimal): 4096 bytes / 4096 bytes&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sdb1               1  4294967295  2147483647+  ee  GPT&lt;br /&gt;
Partition 1 does not start on physical sector boundary.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
So hda-diskmount correctly ignores the drive.  You can either [http://forums.amahi.org/viewtopic.php?f=15&amp;amp;t=2326 fix hda-diskmount], or you can manually mount the drives with the instructions below.&lt;br /&gt;
&lt;br /&gt;
First we make our mount point&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
mkdir /var/hda/files/drives/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next we exercise good practice and backup our fstab file, I like to use `date +%Y%m%d` to give the name a date stamp e.g. /etc/fstab.20110731 represents a backup done on the 31st of July, 2011.  This isn't necessary, you could just use something like 'fstab.old', but date-stamping your file backups is a good habit to get into&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cp /etc/fstab /etc/fstab.`date +%Y%m%d`&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we adjust the fstab file&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= echo -e /dev/sdb1$'\t\t'/var/hda/files/drives/sdb1$'\t'ext4$'\t'defaults$'\t'1 1 &amp;gt;&amp;gt; /etc/fstab&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
What this does is adds a line to the /etc/fstab file, telling it that when Amahi boots, it has to mount the drive.  The $'\t' entries simply mean 'put in a tab space'&lt;br /&gt;
&lt;br /&gt;
If you now run '''cat /etc/fstab''' you should see a nice entry at the bottom, similar to this&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cat /etc/fstab&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# /etc/fstab&lt;br /&gt;
# Created by anaconda on Thu Jul 28 23:56:48 2011&lt;br /&gt;
#&lt;br /&gt;
# Accessible filesystems, by reference, are maintained under '/dev/disk'&lt;br /&gt;
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info&lt;br /&gt;
#&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 /                       ext4    defaults        1 1&lt;br /&gt;
UUID=cc1204dd-a4f8-42f8-8736-b5970251a865 /boot                   ext4    defaults        1 2&lt;br /&gt;
/dev/mapper/vg_hda-LogVol00 swap                    swap    defaults        0 0&lt;br /&gt;
tmpfs                   /dev/shm                tmpfs   defaults        0 0&lt;br /&gt;
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0&lt;br /&gt;
sysfs                   /sys                    sysfs   defaults        0 0&lt;br /&gt;
proc                    /proc                   proc    defaults        0 0&lt;br /&gt;
/dev/sdb1		/var/hda/files/drives/sdb1	ext4	defaults	1 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now you can either reboot to allow the fstab file to mount your new drive, or you can simply run '''mount -a'''&lt;br /&gt;
&lt;br /&gt;
Now if you run mount by itself, you should see your drive listed e.g.&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= mount&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 on / type ext4 (rw)&lt;br /&gt;
proc on /proc type proc (rw)&lt;br /&gt;
sysfs on /sys type sysfs (rw)&lt;br /&gt;
devpts on /dev/pts type devpts (rw,gid=5,mode=620)&lt;br /&gt;
tmpfs on /dev/shm type tmpfs (rw)&lt;br /&gt;
/dev/sda1 on /boot type ext4 (rw)&lt;br /&gt;
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)&lt;br /&gt;
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)&lt;br /&gt;
fusectl on /sys/fs/fuse/connections type fusectl (rw)&lt;br /&gt;
/dev/sdd1 on /media/520abb16-ac7c-4f65-9cc3-9e536c93dca2 type ext4 (rw,nosuid,nodev,uhelper=udisks)&lt;br /&gt;
/dev/sdb1 on /var/hda/files/drives/sdb1 type ext4 (rw)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=A note about Western Digital drives=&lt;br /&gt;
Western Digital make some nice hardware, but they are also incredibly stupid.  Many of their hard drives will automatically park their heads every 8 seconds, which wears out the hard drives very quickly, in some cases the HDD's will reach their design limit (300k parks for consumer, 600k parks for enterprise) within 3-4 months!!!  This isn't to say that the drives will necessarily die within 3-4 months, but it's still not good!&lt;br /&gt;
&lt;br /&gt;
Fortunately we can fix this using a Western Digital tool named wdidle3.  You can download it [http://support.wdc.com/product/download.asp?groupid=609&amp;amp;sid=113 here].&lt;br /&gt;
&lt;br /&gt;
Create a bootable usb drive using [http://www.freedos.org/freedos/files/ FreeDOS] and [http://unetbootin.sourceforge.net/ unetbootin], then copy wdidle.exe onto the usb drive.  Boot up your Amahi box to FreeDOS and enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
c:\&lt;br /&gt;
wdidle3 /R&lt;br /&gt;
wdidle3 /S300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This cd's you to the usb drive's root, then we run wdidle3 /R to display the current drive status, then we run wdidle3 /S300 to set the park time to 5 minutes.  Alternatively you could run wdidle3 /D to completely disable the parking.&lt;br /&gt;
&lt;br /&gt;
When you're done, simply restart the PC!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n.b. Unetbootin was a bit finnicky for me, I found that if I created the drive with a FreeDOS live CD that it wouldn't work, but if I then re-created using unetbootin's automatic distribution download feature, the USB stick worked a treat.  YMMV.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71132</id>
		<title>Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71132"/>
		<updated>2013-05-29T23:32:01Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Foreward */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Foreward=&lt;br /&gt;
You cannot use a &amp;gt;=2.1TB partition as your boot device unless you have a UEFI bios.  That is beyond the scope of this article. &lt;br /&gt;
When using a &amp;gt;=2.1TB partition, you should be running 64-bit Amahi.&lt;br /&gt;
Before you use a &amp;gt;=2.1TB drive on Windows, please read this support article: http://support.microsoft.com/kb/2581408&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As hard drives have increased in capacity over time, some clever workarounds have been engineered to keep breaking barriers, such as the move from CHS to LBA.  Unfortunately, with older style MBR partitions, there is a limit of 2.1TB that simply cannot be worked around using an MBR partition.  We have to instead use newer GPT style partitions.&lt;br /&gt;
&lt;br /&gt;
I'm not going to delve into the history too much, you can google/wikipedia it yourself if you like.&lt;br /&gt;
&lt;br /&gt;
So, if you've just purchased a snazzy new 3TB drive like a Western Digital Caviar Green, and you're scratching your head as to why you can't get the full capacity, here's the fix.&lt;br /&gt;
&lt;br /&gt;
=Assumptions=&lt;br /&gt;
The below documentation assumes you have an existing boot drive with Amahi, namely /dev/sda.  Your &amp;gt;2.1TB HDD will be /dev/sdb&lt;br /&gt;
&lt;br /&gt;
The instructions also assume a Linux terminal, such as that on your Amahi box (either using its console, the Terminal application within the GUI, or SSH'd in)&lt;br /&gt;
&lt;br /&gt;
=Warning=&lt;br /&gt;
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.  WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS, HARDWARE MALFUNCTION, ETC!&lt;br /&gt;
&lt;br /&gt;
=OK, Let's do it=&lt;br /&gt;
First we label the drive with a GPT partition&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mklabel gpt&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we select sectors as a unit of measurement&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb unit s&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we make the partition.  &lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mkpart primary ext2 2048 -1&lt;br /&gt;
}}&lt;br /&gt;
Parted may complain about the last sector and will automatically suggest a correct sector, just say Yes to the prompt.&lt;br /&gt;
&lt;br /&gt;
We make it as a primary partition, ext2 filesystem, and we carefully select the sectors.  The first number MUST be divisible by 8, so you can try 40, 48, 56, 64 etc...  For me these numbers threw up errors, so I just went to 2048 and everything worked fine, and in the grand scheme of a 3TB drive, the extra sectors don't really matter :)&lt;br /&gt;
&lt;br /&gt;
The reason that the starting sector is divisible by 8 is for aligning the sectors.  This is because HDD's have traditionally been based around 512-byte sectors, yet newer, higher capacity HDD's are now arriving based around 4096-byte (a.k.a. 4k) sectors.  The partitioning will still work with 512-bytes, but the drive's performance will be drastically impacted - in some testing it can be twice as slow, in others up to 25 times slower, depending on the sector alignment.  So it's important to get this right!!!&lt;br /&gt;
&lt;br /&gt;
=Alternative Parted usage=&lt;br /&gt;
Instead of the sequence of one liners up there, you can enter into parted itself like this.  I give this as I don't know how your version of parted is going to behave.  The interactive stuff from parted has been removed:&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb&lt;br /&gt;
(parted) mklabel gpt&lt;br /&gt;
(parted) unit s&lt;br /&gt;
(parted) mkpart primary ext2 2048 -1&lt;br /&gt;
(parted) quit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Format the drive!=&lt;br /&gt;
Finally, let's get that drive formatted to a nice ext4 volume:&lt;br /&gt;
{{Code|&lt;br /&gt;
mkfs.ext4 -T largefile4 /dev/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Adding the drive to your HDA=&lt;br /&gt;
Normally to add a drive to Amahi, you would run the script '''hda-diskmount''', which searches for any unmounted drives and mounts them.  Unfortunately, this script doesn't yet cater for GPT partitions.  It runs an '''fdisk -l''' and searches out drives with a Linux system type, and with what it finds it mounts any that aren't mounted.&lt;br /&gt;
&lt;br /&gt;
If we run '''fdisk -l''' by itself, we will see that our new drive doesn't return a system type of 'Linux', instead it returns 'GPT' as well as a warning:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 4096 bytes&lt;br /&gt;
I/O size (minimum/optimal): 4096 bytes / 4096 bytes&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sdb1               1  4294967295  2147483647+  ee  GPT&lt;br /&gt;
Partition 1 does not start on physical sector boundary.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
So hda-diskmount correctly ignores the drive.  You can either [http://forums.amahi.org/viewtopic.php?f=15&amp;amp;t=2326 fix hda-diskmount], or you can manually mount the drives with the instructions below.&lt;br /&gt;
&lt;br /&gt;
First we make our mount point&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
mkdir /var/hda/files/drives/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next we exercise good practice and backup our fstab file, I like to use `date +%Y%m%d` to give the name a date stamp e.g. /etc/fstab.20110731 represents a backup done on the 31st of July, 2011.  This isn't necessary, you could just use something like 'fstab.old', but date-stamping your file backups is a good habit to get into&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cp /etc/fstab /etc/fstab.`date +%Y%m%d`&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we adjust the fstab file&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= echo -e /dev/sdb1$'\t\t'/var/hda/files/drives/sdb1$'\t'ext4$'\t'defaults$'\t'1 1 &amp;gt;&amp;gt; /etc/fstab&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
What this does is adds a line to the /etc/fstab file, telling it that when Amahi boots, it has to mount the drive.  The $'\t' entries simply mean 'put in a tab space'&lt;br /&gt;
&lt;br /&gt;
If you now run '''cat /etc/fstab''' you should see a nice entry at the bottom, similar to this&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cat /etc/fstab&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# /etc/fstab&lt;br /&gt;
# Created by anaconda on Thu Jul 28 23:56:48 2011&lt;br /&gt;
#&lt;br /&gt;
# Accessible filesystems, by reference, are maintained under '/dev/disk'&lt;br /&gt;
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info&lt;br /&gt;
#&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 /                       ext4    defaults        1 1&lt;br /&gt;
UUID=cc1204dd-a4f8-42f8-8736-b5970251a865 /boot                   ext4    defaults        1 2&lt;br /&gt;
/dev/mapper/vg_hda-LogVol00 swap                    swap    defaults        0 0&lt;br /&gt;
tmpfs                   /dev/shm                tmpfs   defaults        0 0&lt;br /&gt;
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0&lt;br /&gt;
sysfs                   /sys                    sysfs   defaults        0 0&lt;br /&gt;
proc                    /proc                   proc    defaults        0 0&lt;br /&gt;
/dev/sdb1		/var/hda/files/drives/sdb1	ext4	defaults	1 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now you can either reboot to allow the fstab file to mount your new drive, or you can simply run '''mount -a'''&lt;br /&gt;
&lt;br /&gt;
Now if you run mount by itself, you should see your drive listed e.g.&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= mount&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 on / type ext4 (rw)&lt;br /&gt;
proc on /proc type proc (rw)&lt;br /&gt;
sysfs on /sys type sysfs (rw)&lt;br /&gt;
devpts on /dev/pts type devpts (rw,gid=5,mode=620)&lt;br /&gt;
tmpfs on /dev/shm type tmpfs (rw)&lt;br /&gt;
/dev/sda1 on /boot type ext4 (rw)&lt;br /&gt;
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)&lt;br /&gt;
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)&lt;br /&gt;
fusectl on /sys/fs/fuse/connections type fusectl (rw)&lt;br /&gt;
/dev/sdd1 on /media/520abb16-ac7c-4f65-9cc3-9e536c93dca2 type ext4 (rw,nosuid,nodev,uhelper=udisks)&lt;br /&gt;
/dev/sdb1 on /var/hda/files/drives/sdb1 type ext4 (rw)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=A note about Western Digital drives=&lt;br /&gt;
Western Digital make some nice hardware, but they are also incredibly stupid.  Many of their hard drives will automatically park their heads every 8 seconds, which wears out the hard drives very quickly, in some cases the HDD's will reach their design limit (300k parks for consumer, 600k parks for enterprise) within 3-4 months!!!  This isn't to say that the drives will necessarily die within 3-4 months, but it's still not good!&lt;br /&gt;
&lt;br /&gt;
Fortunately we can fix this using a Western Digital tool named wdidle3.  You can download it [http://support.wdc.com/product/download.asp?groupid=609&amp;amp;sid=113 here].&lt;br /&gt;
&lt;br /&gt;
Create a bootable usb drive using [http://www.freedos.org/freedos/files/ FreeDOS] and [http://unetbootin.sourceforge.net/ unetbootin], then copy wdidle.exe onto the usb drive.  Boot up your Amahi box to FreeDOS and enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
c:\&lt;br /&gt;
wdidle3 /R&lt;br /&gt;
wdidle3 /S300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This cd's you to the usb drive's root, then we run wdidle3 /R to display the current drive status, then we run wdidle3 /S300 to set the park time to 5 minutes.  Alternatively you could run wdidle3 /D to completely disable the parking.&lt;br /&gt;
&lt;br /&gt;
When you're done, simply restart the PC!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n.b. Unetbootin was a bit finnicky for me, I found that if I created the drive with a FreeDOS live CD that it wouldn't work, but if I then re-created using unetbootin's automatic distribution download feature, the USB stick worked a treat.  YMMV.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71126</id>
		<title>Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71126"/>
		<updated>2013-05-29T23:31:49Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: /* Foreward */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Foreward=&lt;br /&gt;
You cannot use a &amp;gt;=2.1TB partition as your boot device unless you have a UEFI bios.  That is beyond the scope of this article. &lt;br /&gt;
&lt;br /&gt;
When using a &amp;gt;=2.1TB partition, you should be running 64-bit Amahi.&lt;br /&gt;
&lt;br /&gt;
Before you use a &amp;gt;=2.1TB drive on Windows, please read this support article: http://support.microsoft.com/kb/2581408&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As hard drives have increased in capacity over time, some clever workarounds have been engineered to keep breaking barriers, such as the move from CHS to LBA.  Unfortunately, with older style MBR partitions, there is a limit of 2.1TB that simply cannot be worked around using an MBR partition.  We have to instead use newer GPT style partitions.&lt;br /&gt;
&lt;br /&gt;
I'm not going to delve into the history too much, you can google/wikipedia it yourself if you like.&lt;br /&gt;
&lt;br /&gt;
So, if you've just purchased a snazzy new 3TB drive like a Western Digital Caviar Green, and you're scratching your head as to why you can't get the full capacity, here's the fix.&lt;br /&gt;
&lt;br /&gt;
=Assumptions=&lt;br /&gt;
The below documentation assumes you have an existing boot drive with Amahi, namely /dev/sda.  Your &amp;gt;2.1TB HDD will be /dev/sdb&lt;br /&gt;
&lt;br /&gt;
The instructions also assume a Linux terminal, such as that on your Amahi box (either using its console, the Terminal application within the GUI, or SSH'd in)&lt;br /&gt;
&lt;br /&gt;
=Warning=&lt;br /&gt;
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.  WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS, HARDWARE MALFUNCTION, ETC!&lt;br /&gt;
&lt;br /&gt;
=OK, Let's do it=&lt;br /&gt;
First we label the drive with a GPT partition&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mklabel gpt&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we select sectors as a unit of measurement&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb unit s&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we make the partition.  &lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mkpart primary ext2 2048 -1&lt;br /&gt;
}}&lt;br /&gt;
Parted may complain about the last sector and will automatically suggest a correct sector, just say Yes to the prompt.&lt;br /&gt;
&lt;br /&gt;
We make it as a primary partition, ext2 filesystem, and we carefully select the sectors.  The first number MUST be divisible by 8, so you can try 40, 48, 56, 64 etc...  For me these numbers threw up errors, so I just went to 2048 and everything worked fine, and in the grand scheme of a 3TB drive, the extra sectors don't really matter :)&lt;br /&gt;
&lt;br /&gt;
The reason that the starting sector is divisible by 8 is for aligning the sectors.  This is because HDD's have traditionally been based around 512-byte sectors, yet newer, higher capacity HDD's are now arriving based around 4096-byte (a.k.a. 4k) sectors.  The partitioning will still work with 512-bytes, but the drive's performance will be drastically impacted - in some testing it can be twice as slow, in others up to 25 times slower, depending on the sector alignment.  So it's important to get this right!!!&lt;br /&gt;
&lt;br /&gt;
=Alternative Parted usage=&lt;br /&gt;
Instead of the sequence of one liners up there, you can enter into parted itself like this.  I give this as I don't know how your version of parted is going to behave.  The interactive stuff from parted has been removed:&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb&lt;br /&gt;
(parted) mklabel gpt&lt;br /&gt;
(parted) unit s&lt;br /&gt;
(parted) mkpart primary ext2 2048 -1&lt;br /&gt;
(parted) quit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Format the drive!=&lt;br /&gt;
Finally, let's get that drive formatted to a nice ext4 volume:&lt;br /&gt;
{{Code|&lt;br /&gt;
mkfs.ext4 -T largefile4 /dev/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Adding the drive to your HDA=&lt;br /&gt;
Normally to add a drive to Amahi, you would run the script '''hda-diskmount''', which searches for any unmounted drives and mounts them.  Unfortunately, this script doesn't yet cater for GPT partitions.  It runs an '''fdisk -l''' and searches out drives with a Linux system type, and with what it finds it mounts any that aren't mounted.&lt;br /&gt;
&lt;br /&gt;
If we run '''fdisk -l''' by itself, we will see that our new drive doesn't return a system type of 'Linux', instead it returns 'GPT' as well as a warning:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 4096 bytes&lt;br /&gt;
I/O size (minimum/optimal): 4096 bytes / 4096 bytes&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sdb1               1  4294967295  2147483647+  ee  GPT&lt;br /&gt;
Partition 1 does not start on physical sector boundary.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
So hda-diskmount correctly ignores the drive.  You can either [http://forums.amahi.org/viewtopic.php?f=15&amp;amp;t=2326 fix hda-diskmount], or you can manually mount the drives with the instructions below.&lt;br /&gt;
&lt;br /&gt;
First we make our mount point&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
mkdir /var/hda/files/drives/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next we exercise good practice and backup our fstab file, I like to use `date +%Y%m%d` to give the name a date stamp e.g. /etc/fstab.20110731 represents a backup done on the 31st of July, 2011.  This isn't necessary, you could just use something like 'fstab.old', but date-stamping your file backups is a good habit to get into&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cp /etc/fstab /etc/fstab.`date +%Y%m%d`&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we adjust the fstab file&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= echo -e /dev/sdb1$'\t\t'/var/hda/files/drives/sdb1$'\t'ext4$'\t'defaults$'\t'1 1 &amp;gt;&amp;gt; /etc/fstab&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
What this does is adds a line to the /etc/fstab file, telling it that when Amahi boots, it has to mount the drive.  The $'\t' entries simply mean 'put in a tab space'&lt;br /&gt;
&lt;br /&gt;
If you now run '''cat /etc/fstab''' you should see a nice entry at the bottom, similar to this&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cat /etc/fstab&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# /etc/fstab&lt;br /&gt;
# Created by anaconda on Thu Jul 28 23:56:48 2011&lt;br /&gt;
#&lt;br /&gt;
# Accessible filesystems, by reference, are maintained under '/dev/disk'&lt;br /&gt;
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info&lt;br /&gt;
#&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 /                       ext4    defaults        1 1&lt;br /&gt;
UUID=cc1204dd-a4f8-42f8-8736-b5970251a865 /boot                   ext4    defaults        1 2&lt;br /&gt;
/dev/mapper/vg_hda-LogVol00 swap                    swap    defaults        0 0&lt;br /&gt;
tmpfs                   /dev/shm                tmpfs   defaults        0 0&lt;br /&gt;
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0&lt;br /&gt;
sysfs                   /sys                    sysfs   defaults        0 0&lt;br /&gt;
proc                    /proc                   proc    defaults        0 0&lt;br /&gt;
/dev/sdb1		/var/hda/files/drives/sdb1	ext4	defaults	1 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now you can either reboot to allow the fstab file to mount your new drive, or you can simply run '''mount -a'''&lt;br /&gt;
&lt;br /&gt;
Now if you run mount by itself, you should see your drive listed e.g.&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= mount&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 on / type ext4 (rw)&lt;br /&gt;
proc on /proc type proc (rw)&lt;br /&gt;
sysfs on /sys type sysfs (rw)&lt;br /&gt;
devpts on /dev/pts type devpts (rw,gid=5,mode=620)&lt;br /&gt;
tmpfs on /dev/shm type tmpfs (rw)&lt;br /&gt;
/dev/sda1 on /boot type ext4 (rw)&lt;br /&gt;
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)&lt;br /&gt;
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)&lt;br /&gt;
fusectl on /sys/fs/fuse/connections type fusectl (rw)&lt;br /&gt;
/dev/sdd1 on /media/520abb16-ac7c-4f65-9cc3-9e536c93dca2 type ext4 (rw,nosuid,nodev,uhelper=udisks)&lt;br /&gt;
/dev/sdb1 on /var/hda/files/drives/sdb1 type ext4 (rw)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=A note about Western Digital drives=&lt;br /&gt;
Western Digital make some nice hardware, but they are also incredibly stupid.  Many of their hard drives will automatically park their heads every 8 seconds, which wears out the hard drives very quickly, in some cases the HDD's will reach their design limit (300k parks for consumer, 600k parks for enterprise) within 3-4 months!!!  This isn't to say that the drives will necessarily die within 3-4 months, but it's still not good!&lt;br /&gt;
&lt;br /&gt;
Fortunately we can fix this using a Western Digital tool named wdidle3.  You can download it [http://support.wdc.com/product/download.asp?groupid=609&amp;amp;sid=113 here].&lt;br /&gt;
&lt;br /&gt;
Create a bootable usb drive using [http://www.freedos.org/freedos/files/ FreeDOS] and [http://unetbootin.sourceforge.net/ unetbootin], then copy wdidle.exe onto the usb drive.  Boot up your Amahi box to FreeDOS and enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
c:\&lt;br /&gt;
wdidle3 /R&lt;br /&gt;
wdidle3 /S300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This cd's you to the usb drive's root, then we run wdidle3 /R to display the current drive status, then we run wdidle3 /S300 to set the park time to 5 minutes.  Alternatively you could run wdidle3 /D to completely disable the parking.&lt;br /&gt;
&lt;br /&gt;
When you're done, simply restart the PC!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n.b. Unetbootin was a bit finnicky for me, I found that if I created the drive with a FreeDOS live CD that it wouldn't work, but if I then re-created using unetbootin's automatic distribution download feature, the USB stick worked a treat.  YMMV.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71120</id>
		<title>Partitions Over 2.1 TB</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Partitions_Over_2.1_TB&amp;diff=71120"/>
		<updated>2013-05-29T23:31:37Z</updated>

		<summary type="html">&lt;p&gt;JoshTheBlack: Added foreward&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Foreward=&lt;br /&gt;
You cannot use a &amp;gt;=2.1TB partition as your boot device unless you have a UEFI bios.  That is beyond the scope of this article. &lt;br /&gt;
When using a &amp;gt;=2.1TB partition, you should be running 64-bit Amahi.&lt;br /&gt;
Before you use a &amp;gt;=2.1TB drive on Windows, please read this support article: http://support.microsoft.com/kb/2581408&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As hard drives have increased in capacity over time, some clever workarounds have been engineered to keep breaking barriers, such as the move from CHS to LBA.  Unfortunately, with older style MBR partitions, there is a limit of 2.1TB that simply cannot be worked around using an MBR partition.  We have to instead use newer GPT style partitions.&lt;br /&gt;
&lt;br /&gt;
I'm not going to delve into the history too much, you can google/wikipedia it yourself if you like.&lt;br /&gt;
&lt;br /&gt;
So, if you've just purchased a snazzy new 3TB drive like a Western Digital Caviar Green, and you're scratching your head as to why you can't get the full capacity, here's the fix.&lt;br /&gt;
&lt;br /&gt;
=Assumptions=&lt;br /&gt;
The below documentation assumes you have an existing boot drive with Amahi, namely /dev/sda.  Your &amp;gt;2.1TB HDD will be /dev/sdb&lt;br /&gt;
&lt;br /&gt;
The instructions also assume a Linux terminal, such as that on your Amahi box (either using its console, the Terminal application within the GUI, or SSH'd in)&lt;br /&gt;
&lt;br /&gt;
=Warning=&lt;br /&gt;
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.  WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS, HARDWARE MALFUNCTION, ETC!&lt;br /&gt;
&lt;br /&gt;
=OK, Let's do it=&lt;br /&gt;
First we label the drive with a GPT partition&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mklabel gpt&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we select sectors as a unit of measurement&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb unit s&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we make the partition.  &lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb mkpart primary ext2 2048 -1&lt;br /&gt;
}}&lt;br /&gt;
Parted may complain about the last sector and will automatically suggest a correct sector, just say Yes to the prompt.&lt;br /&gt;
&lt;br /&gt;
We make it as a primary partition, ext2 filesystem, and we carefully select the sectors.  The first number MUST be divisible by 8, so you can try 40, 48, 56, 64 etc...  For me these numbers threw up errors, so I just went to 2048 and everything worked fine, and in the grand scheme of a 3TB drive, the extra sectors don't really matter :)&lt;br /&gt;
&lt;br /&gt;
The reason that the starting sector is divisible by 8 is for aligning the sectors.  This is because HDD's have traditionally been based around 512-byte sectors, yet newer, higher capacity HDD's are now arriving based around 4096-byte (a.k.a. 4k) sectors.  The partitioning will still work with 512-bytes, but the drive's performance will be drastically impacted - in some testing it can be twice as slow, in others up to 25 times slower, depending on the sector alignment.  So it's important to get this right!!!&lt;br /&gt;
&lt;br /&gt;
=Alternative Parted usage=&lt;br /&gt;
Instead of the sequence of one liners up there, you can enter into parted itself like this.  I give this as I don't know how your version of parted is going to behave.  The interactive stuff from parted has been removed:&lt;br /&gt;
{{Code|&lt;br /&gt;
parted /dev/sdb&lt;br /&gt;
(parted) mklabel gpt&lt;br /&gt;
(parted) unit s&lt;br /&gt;
(parted) mkpart primary ext2 2048 -1&lt;br /&gt;
(parted) quit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Format the drive!=&lt;br /&gt;
Finally, let's get that drive formatted to a nice ext4 volume:&lt;br /&gt;
{{Code|&lt;br /&gt;
mkfs.ext4 -T largefile4 /dev/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Adding the drive to your HDA=&lt;br /&gt;
Normally to add a drive to Amahi, you would run the script '''hda-diskmount''', which searches for any unmounted drives and mounts them.  Unfortunately, this script doesn't yet cater for GPT partitions.  It runs an '''fdisk -l''' and searches out drives with a Linux system type, and with what it finds it mounts any that aren't mounted.&lt;br /&gt;
&lt;br /&gt;
If we run '''fdisk -l''' by itself, we will see that our new drive doesn't return a system type of 'Linux', instead it returns 'GPT' as well as a warning:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 4096 bytes&lt;br /&gt;
I/O size (minimum/optimal): 4096 bytes / 4096 bytes&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sdb1               1  4294967295  2147483647+  ee  GPT&lt;br /&gt;
Partition 1 does not start on physical sector boundary.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
So hda-diskmount correctly ignores the drive.  You can either [http://forums.amahi.org/viewtopic.php?f=15&amp;amp;t=2326 fix hda-diskmount], or you can manually mount the drives with the instructions below.&lt;br /&gt;
&lt;br /&gt;
First we make our mount point&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
mkdir /var/hda/files/drives/sdb1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next we exercise good practice and backup our fstab file, I like to use `date +%Y%m%d` to give the name a date stamp e.g. /etc/fstab.20110731 represents a backup done on the 31st of July, 2011.  This isn't necessary, you could just use something like 'fstab.old', but date-stamping your file backups is a good habit to get into&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cp /etc/fstab /etc/fstab.`date +%Y%m%d`&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we adjust the fstab file&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= echo -e /dev/sdb1$'\t\t'/var/hda/files/drives/sdb1$'\t'ext4$'\t'defaults$'\t'1 1 &amp;gt;&amp;gt; /etc/fstab&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
What this does is adds a line to the /etc/fstab file, telling it that when Amahi boots, it has to mount the drive.  The $'\t' entries simply mean 'put in a tab space'&lt;br /&gt;
&lt;br /&gt;
If you now run '''cat /etc/fstab''' you should see a nice entry at the bottom, similar to this&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= cat /etc/fstab&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# /etc/fstab&lt;br /&gt;
# Created by anaconda on Thu Jul 28 23:56:48 2011&lt;br /&gt;
#&lt;br /&gt;
# Accessible filesystems, by reference, are maintained under '/dev/disk'&lt;br /&gt;
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info&lt;br /&gt;
#&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 /                       ext4    defaults        1 1&lt;br /&gt;
UUID=cc1204dd-a4f8-42f8-8736-b5970251a865 /boot                   ext4    defaults        1 2&lt;br /&gt;
/dev/mapper/vg_hda-LogVol00 swap                    swap    defaults        0 0&lt;br /&gt;
tmpfs                   /dev/shm                tmpfs   defaults        0 0&lt;br /&gt;
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0&lt;br /&gt;
sysfs                   /sys                    sysfs   defaults        0 0&lt;br /&gt;
proc                    /proc                   proc    defaults        0 0&lt;br /&gt;
/dev/sdb1		/var/hda/files/drives/sdb1	ext4	defaults	1 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now you can either reboot to allow the fstab file to mount your new drive, or you can simply run '''mount -a'''&lt;br /&gt;
&lt;br /&gt;
Now if you run mount by itself, you should see your drive listed e.g.&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
Code= mount&lt;br /&gt;
/dev/mapper/vg_hda-LogVol01 on / type ext4 (rw)&lt;br /&gt;
proc on /proc type proc (rw)&lt;br /&gt;
sysfs on /sys type sysfs (rw)&lt;br /&gt;
devpts on /dev/pts type devpts (rw,gid=5,mode=620)&lt;br /&gt;
tmpfs on /dev/shm type tmpfs (rw)&lt;br /&gt;
/dev/sda1 on /boot type ext4 (rw)&lt;br /&gt;
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)&lt;br /&gt;
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)&lt;br /&gt;
fusectl on /sys/fs/fuse/connections type fusectl (rw)&lt;br /&gt;
/dev/sdd1 on /media/520abb16-ac7c-4f65-9cc3-9e536c93dca2 type ext4 (rw,nosuid,nodev,uhelper=udisks)&lt;br /&gt;
/dev/sdb1 on /var/hda/files/drives/sdb1 type ext4 (rw)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=A note about Western Digital drives=&lt;br /&gt;
Western Digital make some nice hardware, but they are also incredibly stupid.  Many of their hard drives will automatically park their heads every 8 seconds, which wears out the hard drives very quickly, in some cases the HDD's will reach their design limit (300k parks for consumer, 600k parks for enterprise) within 3-4 months!!!  This isn't to say that the drives will necessarily die within 3-4 months, but it's still not good!&lt;br /&gt;
&lt;br /&gt;
Fortunately we can fix this using a Western Digital tool named wdidle3.  You can download it [http://support.wdc.com/product/download.asp?groupid=609&amp;amp;sid=113 here].&lt;br /&gt;
&lt;br /&gt;
Create a bootable usb drive using [http://www.freedos.org/freedos/files/ FreeDOS] and [http://unetbootin.sourceforge.net/ unetbootin], then copy wdidle.exe onto the usb drive.  Boot up your Amahi box to FreeDOS and enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Code|&lt;br /&gt;
c:\&lt;br /&gt;
wdidle3 /R&lt;br /&gt;
wdidle3 /S300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This cd's you to the usb drive's root, then we run wdidle3 /R to display the current drive status, then we run wdidle3 /S300 to set the park time to 5 minutes.  Alternatively you could run wdidle3 /D to completely disable the parking.&lt;br /&gt;
&lt;br /&gt;
When you're done, simply restart the PC!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n.b. Unetbootin was a bit finnicky for me, I found that if I created the drive with a FreeDOS live CD that it wouldn't work, but if I then re-created using unetbootin's automatic distribution download feature, the USB stick worked a treat.  YMMV.&lt;/div&gt;</summary>
		<author><name>JoshTheBlack</name></author>
		
	</entry>
</feed>