Difference between revisions of "Greyhole troubleshooting"

From Amahi Wiki
Jump to: navigation, search
(Added section headings, section on how to clear the greyhole queue)
Line 4: Line 4:
  
 
1. What version of Fedora, Samba & Greyhole are you running?
 
1. What version of Fedora, Samba & Greyhole are you running?
      uname -r; rpm -q samba hda-greyhole
+
{{Code|uname -r; rpm -q samba hda-greyhole}}
  
 
2. The content of the /etc/samba/smb.conf & /etc/greyhole.conf files (provide paste URLs):
 
2. The content of the /etc/samba/smb.conf & /etc/greyhole.conf files (provide paste URLs):
      yum -y install fpaste; fpaste /etc/samba/smb.conf; fpaste /etc/greyhole.conf
+
 
 +
<u>Fedora:</u>
 +
{{Code|yum -y install fpaste;  
 +
fpaste /etc/samba/smb.conf;  
 +
fpaste /etc/greyhole.conf}}
 +
 
 +
<u>Ubuntu:</u>
 +
{{Code|patebinit /etc/samba/smb.conf;
 +
patebinit /etc/greyhole.conf}}
  
 
3. The result of the following commands:
 
3. The result of the following commands:
      mount; fdisk -l; df -h; greyhole --stats
+
{{Code|mount; fdisk -l; df -h; greyhole --stats}}
  
 
4. The list drives in your storage pool (per Amahi platform):
 
4. The list drives in your storage pool (per Amahi platform):
      mysql -u root -phda -e "select * from disk_pool_partitions" hda_production
+
{{Code|mysql -u root -phda -e "select * from disk_pool_partitions" hda_production}}
  
 
5. A list of the directories on the root of the drives included in your storage pool, obtained with the following command (provide a paste URL):
 
5. A list of the directories on the root of the drives included in your storage pool, obtained with the following command (provide a paste URL):
      mysql -u root -phda -e "select concat(path, '/gh') from disk_pool_partitions" hda_production | grep -v 'concat(' | xargs ls -la | fpaste
+
{{Code|mysql -u root -phda -e "select concat(path, '/gh') from disk_pool_partitions" hda_production <nowiki>|</nowiki> grep -v 'concat(' <nowiki>|</nowiki> xargs ls -la <nowiki>|</nowiki> fpaste}}
  
 
6. The Greyhole work queue:
 
6. The Greyhole work queue:
      greyhole --view-queue
+
{{Code|greyhole --view-queue}}
If the above command returns nothing, execute '''tail /var/log/greyhole.log''' to see the problem.
+
If the above command returns nothing, execute the following to see the problem:
 +
{{code|tail /var/log/greyhole.log}}
  
 
7. If you have issues with a particular file (file disappeared, is wrong size, has wrong filename), execute the following to find out what Greyhole did with this file:
 
7. If you have issues with a particular file (file disappeared, is wrong size, has wrong filename), execute the following to find out what Greyhole did with this file:
    greyhole --debug filename
+
{{Code|greyhole --debug filename}}
  
==Clearing The Greyhole Work Queue==
+
== Clearing The Greyhole Work Queue ==
 
I've not seen too many other reports of this occuring on the internet, so I suspect it's something that may be specific to my setup. However, the fix is pretty general, so I'm documenting it here for others to use.
 
I've not seen too many other reports of this occuring on the internet, so I suspect it's something that may be specific to my setup. However, the fix is pretty general, so I'm documenting it here for others to use.
  
 
Sometimes, greyhole will have too many tasks queued, and will lock up, leaving you with a full landing zone and an fsck queue that just isn't processing. Always leave your server overnight (or longer, depending on the size of your landing zone (overnight should be sufficient for most) to ensure that its not just taking a while to process, but if its really, definitely stuck, you may want to follow these instructions to clear the queue.
 
Sometimes, greyhole will have too many tasks queued, and will lock up, leaving you with a full landing zone and an fsck queue that just isn't processing. Always leave your server overnight (or longer, depending on the size of your landing zone (overnight should be sufficient for most) to ensure that its not just taking a while to process, but if its really, definitely stuck, you may want to follow these instructions to clear the queue.
  
#Stop the greyhole daemon
+
Stop the greyhole daemon
##<pre>sudo service greyhole stop</pre>
+
{{Code|sudo service greyhole stop}}
#Connect to the MYSQL engine
+
Connect to the MYSQL engine
##<pre>mysql -u greyhole -pgreyhole</pre>
+
{{Code|mysql -u greyhole -pgreyhole}}
###Select the Greyhole database
+
Select the Greyhole database
####<pre>USE greyhole;</pre>
+
{{Code|USE greyhole;}}
###Drop and Recreate the 'Tasks' table with the same structure
+
Drop and Recreate the 'Tasks' table with the same structure
####<pre>TRUNCATE TABLE tasks;</pre>
+
{{Code|TRUNCATE TABLE tasks;}}
###Exit the MYSQL engine
+
Exit the MYSQL engine
####<pre>exit;</pre>
+
{{Code|exit;}}
#Restart the greyhole daemon
+
Restart the greyhole daemon
##<pre>sudo service greyhole start</pre>
+
{{Code|sudo service greyhole start}}
#Schedule an fsck to clear out the files currently in the landing zone
+
Schedule an fsck to clear out the files currently in the landing zone
##<pre>sudo greyhole --fsck</pre>
+
{{Code|sudo greyhole --fsck}}
  
 
Back to the [[Greyhole]] page
 
Back to the [[Greyhole]] page

Revision as of 11:54, 13 July 2012

Gathering Good Troubleshooting Information

When reporting an issue with Greyhole, or asking for help regarding Greyhole, you should provide the following. You'll need to execute the given commands as root.

1. What version of Fedora, Samba & Greyhole are you running?

bash code
​uname -r; rpm -q samba hda-greyhole​


2. The content of the /etc/samba/smb.conf & /etc/greyhole.conf files (provide paste URLs):

Fedora:

bash code
​yum -y install fpaste; fpaste /etc/samba/smb.conf; fpaste /etc/greyhole.conf​


Ubuntu:

bash code
​patebinit /etc/samba/smb.conf; patebinit /etc/greyhole.conf​


3. The result of the following commands:

bash code
​mount; fdisk -l; df -h; greyhole --stats​


4. The list drives in your storage pool (per Amahi platform):

bash code
​mysql -u root -phda -e "select * from disk_pool_partitions" hda_production​


5. A list of the directories on the root of the drives included in your storage pool, obtained with the following command (provide a paste URL):

bash code
​mysql -u root -phda -e "select concat(path, '/gh') from disk_pool_partitions" hda_production | grep -v 'concat(' | xargs ls -la | fpaste​


6. The Greyhole work queue:

bash code
​greyhole --view-queue​

If the above command returns nothing, execute the following to see the problem:

bash code
​tail /var/log/greyhole.log​


7. If you have issues with a particular file (file disappeared, is wrong size, has wrong filename), execute the following to find out what Greyhole did with this file:

bash code
​greyhole --debug filename​


Clearing The Greyhole Work Queue

I've not seen too many other reports of this occuring on the internet, so I suspect it's something that may be specific to my setup. However, the fix is pretty general, so I'm documenting it here for others to use.

Sometimes, greyhole will have too many tasks queued, and will lock up, leaving you with a full landing zone and an fsck queue that just isn't processing. Always leave your server overnight (or longer, depending on the size of your landing zone (overnight should be sufficient for most) to ensure that its not just taking a while to process, but if its really, definitely stuck, you may want to follow these instructions to clear the queue.

Stop the greyhole daemon

bash code
​sudo service greyhole stop​

Connect to the MYSQL engine

bash code
​mysql -u greyhole -pgreyhole​

Select the Greyhole database

bash code
​USE greyhole;

Drop and Recreate the 'Tasks' table with the same structure

bash code
​TRUNCATE TABLE tasks;

Exit the MYSQL engine

bash code
​exit;

Restart the greyhole daemon

bash code
​sudo service greyhole start​

Schedule an fsck to clear out the files currently in the landing zone

bash code
​sudo greyhole --fsck​


Back to the Greyhole page