<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>System Administration by Quags</title>
	<atom:link href="http://quags.net/feed" rel="self" type="application/rss+xml" />
	<link>http://quags.net</link>
	<description>My way</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:41:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Copy accounts from a reseller WHM with out the root password (automatically)</title>
		<link>http://quags.net/archives/59</link>
		<comments>http://quags.net/archives/59#comments</comments>
		<pubDate>Mon, 30 Jan 2012 21:22:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=59</guid>
		<description><![CDATA[I quickly wrote this script to easily run the backup process for all accounts of a reseller using WHM. This calls the backup process in cpanel for each account using the ftp/scp copy function. Once its done you need to &#8230; <a href="http://quags.net/archives/59">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I quickly wrote this script to easily run the backup process for all accounts of a reseller using WHM. This calls the backup process in cpanel for each account using the ftp/scp copy function. Once its done you need to manually restore accounts yourself in the folder you copied the accounts to. </p>
<p>An example to restore the account is something quick like</p>
<p> for i in *; do /scripts/restorepkg $i; done</p>
<p>Run the above command in the folder all the backup accounts were copied to.</p>
<p>The restore as well as the below script are best run in screen.</p>
<p>You need to manually create the domains file for the script below. You can do this by going to list accounts in WHM and at the bottom clicking the fetch csv option. Take all that data and create a file called domains on your server. Then run</p>
<p> cat domains | cut -d, -f1-3,10 | grep -v ^Domain, > domains2</p>
<p>This will format the file, calling in domains2 in a format the below script can use.</p>
<p>Script below, with instructions.</p>
<pre>
#!/bin/bash

# Quick script to copy accounts from another cpanel server, with the reseller (not root password)
# This is just logging into cpanel to run the generate a full cpmove backup function in WHM

##
# Requires
##

## 1) logging into an account with the reseller password
## 2) the backup function working
## 3) getting the csv from list accounts and putting it in the right format

##
# Getting the csv
##

# Log into WHM as the reseller and go to list accounts. At the botton click 'Fetch CSV'
# Save it on the server you are copying it to, and call it 'domains'
# Run the below command
#cat domains | cut -d, -f1-3,10 | grep -v ^Domain, > domains2

# This is the WHM Password (resller pass)
HTTPPASS=whmpassword

# This is the WHM IP (server with the accounts now)
SERVER=IP.TRANSFERING.FROM

# This is the Remote FTP Username (ftp username)
FTPUSER=FTPUSERNAME

# This is the remote FTP Password (ftp password)
FTPPASS=ftppass

# This is the remote FTP IP (ftp IP address where accounts are going to)
FTPSERVER=ftp.server.ip

# This is the email address that gets notifications when the full backup is complete (your email address, the @ is %40)
MYEMAIL="email%40domain.com"

# backup type, possibilities are
# ftp
# passiveftp
# scp
TYPE=ftp;

# Port your ftp or scp port
PORT=21

# remote dir, default is %2F which is blank
# for scp follow format of %2Fhome%2Fusername for /home/username
REMOTEDIR=%2F;

# Sleep time in seconds (setting this too low could cause may backup processes to run at once)
sleep=200;

# you don't need to run this as root, but you may need to define a HOME
export HOME=/root

if [ ! -f domains2 ]; then
 echo 'Domains file missing';
 exit;
fi
# there is no error checking, so double check the above

for i in $(cat domains2 | cut -d\, -f3); do
 THEME=`cat domains2 | grep ,$i, | cut -d, -f4 | grep -v ^#`;
 curl -u $i:$HTTPPASS -k "https://$SERVER:2083/frontend/$THEME/backup/dofullbackup.html?dest=$TYPE&#038;email=$MYEMAIL&#038;server=$FTPSERVER&#038;user=$FTPUSER&#038;pass=$FTPPASS&#038;port=$PORT&#038;rdir=$REMOTEDIR"
 echo "Finished $i, Sleeping"
 sleep $sleep
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/59/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 6.2 and libvirt startup issues</title>
		<link>http://quags.net/archives/53</link>
		<comments>http://quags.net/archives/53#comments</comments>
		<pubDate>Wed, 21 Dec 2011 16:08:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=53</guid>
		<description><![CDATA[After the centos 6.2 update I noticed libvirt was not running on some servers. Looking at the logs I found Starting libvirtd daemon: 10:35:16.697: 6933: info : libvirt version: 0.9.4, package: 23.el6_2.1 (CentOS BuildSystem &#60;http://bugs.centos.org&#62;, 2011-12-17-16:39:59, c6b4.bsys.dev.centos.org) 10:35:16.697: 6933: error &#8230; <a href="http://quags.net/archives/53">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After the centos 6.2 update I noticed libvirt was not running on some servers. Looking at the logs I found</p>
<p>Starting libvirtd daemon: 10:35:16.697: 6933: info : libvirt version: 0.9.4, package: 23.el6_2.1 (CentOS BuildSystem &lt;http://bugs.centos.org&gt;, 2011-12-17-16:39:59, c6b4.bsys.dev.centos.org)<br />
10:35:16.697: 6933: error : virNetServerMDNSStart:460 : internal error Failed to create mDNS client: Daemon not running</p>
<p>&nbsp;</p>
<p>Further investigation found avahi was needed for this to work. The final fix was running</p>
<p>&nbsp;</p>
<pre>
yum -y install avahi
/etc/init.d/messagebus restart
/etc/init.d/avahi-daemon restart
/etc/init.d/libvirtd restart
/sbin/chkconfig messagebus on
/sbin/chkconfig avahi-daemon on
</pre>
<p>In centos 6.2 restarting libvirt will not restart the vm&#8217;s. Once done libvirt was running again.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/53/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpenVZ and CentOS6</title>
		<link>http://quags.net/archives/46</link>
		<comments>http://quags.net/archives/46#comments</comments>
		<pubDate>Tue, 02 Aug 2011 18:18:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=46</guid>
		<description><![CDATA[I have been testing openvz on centos6 today, and following my normal config I installed software raid1. Everything went fine until a reboot into the centos kernel. On a reboot, I got an error &#160; dracut cannot find root, &#8220;sleeping &#8230; <a href="http://quags.net/archives/46">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been testing openvz on centos6 today, and following my normal config I installed software raid1. Everything went fine until a reboot into the centos kernel. On a reboot, I got an error</p>
<p>&nbsp;</p>
<p><strong>dracut cannot find root, &#8220;sleeping forever&#8221;</strong></p>
<p>&nbsp;</p>
<p>As an old school sysadmin I hate change, what is dracut I&#8217;m thinking (not to mention fstab has UUID&#8217;s instead of LABELs, looking like ubuntu now). This replaces the old initrd system. Ok it has a shell you can boot into rdshell which seems kind of cool. On to the fix I found.</p>
<p>I noticed that on openvz dracut never assembled raid1. I ran</p>
<p>dracut -f &#8211;add-drivers raid1 &#8211;mdadmconf /boot/initramfs-2.6.32-042stab024.1.img 2.6.32-042stab024.1</p>
<p>Which at the time was the stable kernel and rebooted. System is back up with out errors.</p>
<p>&nbsp;</p>
<p>You may need to run</p>
<p>mdadm &#8211;examine &#8211;scan</p>
<p>and update your /etc/mdadm.conf file</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/46/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CVE-2010-3856</title>
		<link>http://quags.net/archives/37</link>
		<comments>http://quags.net/archives/37#comments</comments>
		<pubDate>Sat, 23 Oct 2010 14:45:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://quags.net/?p=37</guid>
		<description><![CDATA[A new glibc exploit has been disclosed under CVE-2010-3856. Unlike the last glibc exploit a few days ago you do not get direct root access, but you can create files/dirs in root owned paths. I expect an update from RedHat &#8230; <a href="http://quags.net/archives/37">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A new glibc exploit has been disclosed under CVE-2010-3856. Unlike the last glibc exploit a few days ago you do not get direct root access, but you can create files/dirs in root owned paths. I expect an update from RedHat with in the next 24 &#8211; 48 hours.</p>
<p>I released a glibc update for the last glibc update in a testing repo. It looks like I will be keeping the testing repo for some time. Here is how to get the latest glibc update (a copy of my previous post)</p>
<p>-</p>
<p>Run <strong>/admin/updatefromtesting</strong> and there are glibc updates for CentOS 5.</p>
<p>You can get this by running</p>
<p><strong>/admin/upscripts</strong></p>
<p>If you do not have the admin scripts run</p>
<p><strong>rsync -a rsync://mirror.trouble-free.net/admin /admin</strong></p>
<p>Before use, you will need to run either</p>
<p><strong>ln -s /admin/testing.repo /etc/yum.repos.d/testing.repo</strong></p>
<p>or</p>
<p><strong>cp /admin/testing.repo /etc/yum.repos.d/testing.repo</strong></p>
<p>Then run</p>
<p><strong>/admin/updatefromtesting</strong></p>
<p>This repo is not enabled by default. So what is really happening is yum is being called as yum –enablerepo=tf-testing update</p>
<p>&#8211;</p>
<p>The testing repo will stay around for a bit longer. If you are a current InterServer customer please contact support.</p>
<p>I have tested this update on multiple i386 and x86_64 systems and have seemed it stable. However, using the testing repo is not an official update from RedHat or CentOS.</p>
<p>The repo, including srpm, is at http://mirror.trouble-free.net/tf/testing/5.5/</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/37/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CVE-2010-3847</title>
		<link>http://quags.net/archives/32</link>
		<comments>http://quags.net/archives/32#comments</comments>
		<pubDate>Wed, 20 Oct 2010 14:43:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://quags.net/?p=32</guid>
		<description><![CDATA[CVE-2010-3847 glibc root exploit <a href="http://quags.net/archives/32">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There is a new linux root exploit through glibc CVE-2010-3847. This exploit can be used to gain root access by a &#8220;local user&#8221;. Of course, being in the web hosting industry a local user can be an exploitable script, a customer, a php or cgi shell and on and on. Affected are RHEL and CentOS 5.</p>
<p>No glibc update has been released yet by RedHat.</p>
<p>I have released a new admin script and a testing repo on the InterServer yum repo. The admin script is <strong>/admin/updatefromtesting</strong> and there are glibc updates for CentOS 5.</p>
<p>You can get this by running</p>
<p><strong>/admin/upscripts</strong></p>
<p>If you do not have the admin scripts run</p>
<p><strong>rsync -a rsync://mirror.trouble-free.net/admin /admin</strong></p>
<p>Before use, you will need to run either</p>
<p><strong>ln -s /admin/testing.repo /etc/yum.repos.d/testing.repo</strong></p>
<p>or</p>
<p><strong>cp /admin/testing.repo /etc/yum.repos.d/testing.repo</strong></p>
<p>Then run</p>
<p><strong>/admin/updatefromtesting</strong></p>
<p>This repo is not enabled by default. So what is really happening is yum is being called as yum &#8211;enablerepo=tf-testing update</p>
<p>Future updates will not use this repo. In fact, I do not have plans on keeping the testing repo &#8211; we will see.</p>
<p>I expect the glibc update from redhat to apply over the testing repo. However this is glibc, so use at your own risks. If you are an InterServer customer contact support for help with this update.</p>
<p>I have tested the update on multiple servers and have build for i386 and x86_64.</p>
<p>The repo, including srpm, is at http://mirror.trouble-free.net/tf/testing/5.5/</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/32/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a cheap and easy harddrive copying system</title>
		<link>http://quags.net/archives/5</link>
		<comments>http://quags.net/archives/5#comments</comments>
		<pubDate>Thu, 19 Aug 2010 15:34:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://quags.net/?p=5</guid>
		<description><![CDATA[building an easy to use hd copy system <a href="http://quags.net/archives/5">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The problem: Harddrives seem to die on Friday at 4 PM.</p>
<p>Needed: A simple system to have anyone be able to easily copy a harddrive, even with bad sectors.</p>
<p>In the past I manually copied the data with a giant rsync command. after creating all the partitions. I had tried DD, but with bad sectors there could be issues. DD_Rescue wasn&#8217;t bad, but I was going for something even simpler.</p>
<p>The solution: FreeBSD recoverdisk (it comes with the default FreeBSD 8.0 install)</p>
<p>Recoverdisk can do any OS, skip bad sectors, restart the copy, and even shows a percentage to completion.</p>
<p>I also wanted something that could have the drives swapped out of easily, even if the server was live. To do this, I used ESATA and an external drive dock, with a motherboard that supports AHCI. I also used FreeBSD 8.0. I will not go into the process of installing that however.</p>
<p>So to build this you will need:</p>
<p><strong>1)</strong> an esata PCI card for two ports</p>
<p><strong>2)</strong> ahci motherboard</p>
<p><strong>3)</strong> a server running freebsd 8.0</p>
<p><strong>4)</strong> external sata drive dock. I am using StarTech dual 2.5/3.5 Drive eSATA/USB 2.0 SATA HD Docking Station (Part# SATASOCK22UE)</p>
<p>Some things to know before you begin. You could use this as USB, but I found that is much slower. Also smartcheck will not work under USB mode. To do any hot swapping you need an AHCI motherboard. In the below setup I have disk names as ad6 and ad8 &#8211; these may be different on your set up &#8211; so be sure to double check and change them as you see fit. Finally, test test test, and label because you could wipe the wrong drive otherwise. On my set up, I have the section for the old drive clearly labeled (and called ad6) and the section for the new drive labeled (called ad8). I have also found, some drives that have a lot of bad sectors get to 99.9XXX done and never complete the copy &#8211; you can end it there and the new drive will boot.</p>
<p>Here is the process to set this up. Everything below assumes you will put the bad drive in /dev/ad6 and the good drive in /dev/ad8. Change this as needed.</p>
<p><strong>1) </strong>Install FreeBSD 8</p>
<p><strong>2) </strong>Use pkg_add to install</p>
<p>bash<br />
e2fsprogs<br />
gettext<br />
libiconv<br />
linuxfdisk<br />
nano<br />
ntfsprogs<br />
psmisc<br />
smartmontools</p>
<p>Thats simply issuing a pkg_add -r bash for example.</p>
<p><strong>3)</strong> Set bash as the default shell with chsh -s /usr/local/bin/bash root</p>
<p><strong>4) </strong>Edit /root/.bash_profile and add</p>
<p>if [ -e /etc/bashrc ]; then<br />
source /etc/bashrc<br />
fi</p>
<p><strong>5)</strong> edit /etc/bashrc and add</p>
<p>CLICOLOR=&#8221;YES&#8221;;    export CLICOLOR<br />
LSCOLORS=&#8221;ExGxFxdxCxDxDxhbadExEx&#8221;;    export LSCOLORS</p>
<p>COLOR1=&#8221;\[\033[1;35m\]&#8221; ### Bright Purple<br />
COLOR2=&#8221;\[\033[0;34m\]&#8221; ### Dark Blue<br />
COLOR3=&#8221;\[\033[0;35m\]&#8221; ### Purple (Magenta)<br />
COLOR4=&#8221;\[\033[0m\]&#8220;    ### Blank<br />
COLOR5=&#8221;\[\033[1;37m\]&#8221; ### Bright White<br />
COLOR6=&#8221;\[\033[1;31m\]&#8221; ### Red<br />
COLOR7=&#8221;\[\033[1;33m\]&#8221; ### Bright Yellow<br />
COLOR8=&#8221;\[\033[1;32m\]&#8221; ### Light Green<br />
COLOR9=&#8221;\[\033[0;36m\]&#8221; ### Cyan (Aqua)<br />
COLOR10=&#8221;\[\033[1;34m\]&#8221; ### Blue<br />
TTY=&#8221;$(tty | sed s#&#8221;/dev/&#8221;#&#8221;"#g)&#8221;<br />
export PS1=&#8221;$COLOR2/&#8211;$COLOR10($COLOR2\u$COLOR10@$COLOR2\h$COLOR4$COLOR10)$COLOR7:$COLOR5[$COLOR4\w$COLOR5]$COLOR2-$COLOR5[$COLOR4$TTY$COLOR5]$COLOR2-$COLOR10($COLOR4\$(date +%I:%M%P)$COLOR10)\n$COLOR2\-$COLOR10&gt;$COLOR4 &#8221;</p>
<p># START bash completion &#8212; do not remove this line<br />
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}<br />
if [ "$PS1" ] &amp;&amp; [ $bmajor -eq 2 ] &amp;&amp; [ $bminor '&gt;' 04 ] \<br />
&amp;&amp; [ -f /etc/bash_completion ]; then # interactive shell<br />
# Source completion code<br />
. /etc/bash_completion<br />
fi</p>
<p># freebsd<br />
if [ -f /usr/local/etc/bash_completion ]; then<br />
. /usr/local/etc/bash_completion<br />
fi</p>
<p>unset bash bmajor bminor<br />
# END bash completion &#8212; do not remove this line</p>
<p>export VISUAL=nano</p>
<p># commands</p>
<p>alias list=&#8221;atacontrol list&#8221;<br />
alias detach1=&#8221;atacontrol detach ata3&#8243;<br />
alias detach2=&#8221;atacontrol detach ata4&#8243;<br />
alias attach1=&#8221;atacontrol detach ata3 &amp;&amp; atacontrol attach ata3&#8243;<br />
alias attach2=&#8221;atacontrol detach ata4 &amp;&amp; atacontrol attach ata4&#8243;<br />
alias smart1=&#8221;smartctl -s on /dev/ad6 2&amp;&gt;/dev/null ; smartctl -data -a /dev/ad6 2&gt;&amp;1| more&#8221;<br />
alias smart2=&#8221;smartctl -s on /dev/ad8 2&amp;&gt;/dev/null ; smartctl -data -a /dev/ad8 2&gt;&amp;1 | more&#8221;<br />
alias copy=&#8221;recoverdisk -w /root/disk.txt /dev/ad6 /dev/ad8&#8243;<br />
alias restartcopy=&#8221;recoverdisk -r /root/disk.txt -w /root/disk.txt /dev/ad6 /dev/ad8&#8243;<br />
alias part1=&#8221;fdisk-linux -l /dev/ad6&#8243;<br />
alias part2=&#8221;fdisk-linux -l /dev/ad8&#8243;<br />
alias badblocks1=&#8221;/usr/local/sbin/badblocks -vv /dev/ad6&#8243;<br />
alias badblocks2=&#8221;/usr/local/sbin/badblocks -vv /dev/ad8&#8243;<br />
alias copyhelp=&#8221;cat /etc/motd | more&#8221;</p>
<p># END BASHRC</p>
<p><strong>7)</strong> Edit /etc/motd and add</p>
<p>Quick commands:</p>
<p>HD Recovery:<br />
copy         &#8211; copy bad drive (1) to good drive (2)<br />
restartcopy  &#8211; restart a copy that has failed (reboot / powerfailure etc)\</p>
<p>HD Test:<br />
smart1       &#8211; smartcheck bad drive (1)<br />
smart2       &#8211; smartcheck good drive (2)<br />
part1        &#8211; list partitions and drive size on bad drive (1)<br />
part2        &#8211; list partitions and drive size on good drive (2)<br />
badblocks1   &#8211; run a bad block test on bad drive (1)<br />
badblocks2   &#8211; run a bad block test on good drive (2)</p>
<p>Start / Stop<br />
attach1      &#8211; start drive 1 (bad)<br />
attach2      &#8211; start drive 2 (good)<br />
detach1      &#8211; stop drive 1 (bad)<br />
detach2      &#8211; stop drive 2 (good)</p>
<p>Misc<br />
list         &#8211; list all drives</p>
<p>Linux Tools<br />
e2fsck       &#8211; fsck for linux</p>
<p>Windows Tools<br />
ntfsfix      &#8211; fix for dirty windows filesystem</p>
<p>FreeBSD Tools<br />
fsck         &#8211; fsck for freebsd</p>
<p>Mount<br />
mount -t ext2fs &#8211; ext2/3 linux</p>
<p>List This Help<br />
copyhelp</p>
<p><strong>That&#8217;s it</strong>. Now you are done with the setup. Hopefully that was easy for you.</p>
<p>Ok, so how can you use this? Log into the server when both drives are in the proper location and run</p>
<p>copy</p>
<p>Here are some real work examples:</p>
<p><strong>Copy and restartcopy</strong></p>
<p>/&#8211;(root@recover):[~]-[pts/0]-(03:20P)<br />
\-&gt; copy<br />
Bigsize = 1048576, medsize = 32768, minsize = 512<br />
start    size     block-len state          done     remaining    % done<br />
3145728 1048576  500104716288     0       3145728  500104716288   0.00063<br />
4194304 1048576 failed (Input/output error)<br />
174063616 1048576  499933798400     0     173015040  499934846976   0.03460^C<br />
Saving worklist &#8230; done.<br />
/&#8211;(root@recover):[~]-[pts/0]-(03:20P)<br />
\-&gt; restartcopy<br />
Bigsize = 1048576, medsize = 32768, minsize = 512<br />
Reading worklist &#8230; done.<br />
start    size     block-len state          done     remaining    % done<br />
333447168 1048576  499774414848     0     332398592  499775463424   0.06647^C</p>
<p><strong>attaching a drive:</strong></p>
<p>/&#8211;(root@recover):[~]-[pts/0]-(03:19P)<br />
\-&gt; attach1<br />
Master:  ad6 &lt;SAMSUNG HD502HJ/1AJ10001&gt; SATA revision 2.x<br />
Slave:       no device present<br />
/&#8211;(root@recover):[~]-[pts/0]-(03:19P)<br />
\-&gt; attach2<br />
Master:  ad8 &lt;WDC WD3200AAJS-00L7A0/01.03E01&gt; SATA revision 2.x<br />
Slave:       no device present<br />
/&#8211;(root@recover):[~]-[pts/0]-(03:19P)<br />
\-&gt; list<br />
ATA channel 0:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 1:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 2:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 3:<br />
Master:  ad6 &lt;SAMSUNG HD502HJ/1AJ10001&gt; SATA revision 2.x<br />
Slave:       no device present<br />
ATA channel 4:<br />
Master:  ad8 &lt;WDC WD3200AAJS-00L7A0/01.03E01&gt; SATA revision 2.x<br />
Slave:       no device present<br />
ATA channel 5:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 6:<br />
Master:      no device present<br />
Slave:       no device present</p>
<p><strong>Detach a drive:</strong><br />
/&#8211;(root@recover):[~]-[pts/0]-(03:18P)<br />
\-&gt; detach1<br />
/&#8211;(root@recover):[~]-[pts/0]-(03:19P)<br />
\-&gt; detach2<br />
/&#8211;(root@recover):[~]-[pts/0]-(03:19P)<br />
\-&gt; list<br />
ATA channel 0:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 1:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 2:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 3:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 4:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 5:<br />
Master:      no device present<br />
Slave:       no device present<br />
ATA channel 6:<br />
Master:      no device present</p>
<p>Now it is safe to remove it.</p>
<p><strong>Show partitions (it also will show the drive model and size)</strong></p>
<p>\-&gt; part1</p>
<p>Disk /dev/ad6: 500.1 GB, 500107862016 bytes<br />
255 heads, 63 sectors/track, 60801 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>Device Boot    Start       End    Blocks   Id  System<br />
/dev/ad6s1   *         1     60800 488375968+   7  HPFS/NTFS</p>
<p>As you can see in the help section there are other options as well. With any command that uses 1 or 2 at the end, 1 is assumed to be the bad drive and 2 is assumed to be the good drive.</p>
<p>Finally here are some pictures of my set up:</p>

<a href='http://quags.net/archives/5/blog1' title='blog1'><img width="150" height="150" src="http://quags.net/wp-content/uploads/2010/08/blog1-150x150.jpg" class="attachment-thumbnail" alt="blog1" title="blog1" /></a>
<a href='http://quags.net/archives/5/blog2' title='blog2'><img width="150" height="150" src="http://quags.net/wp-content/uploads/2010/08/blog2-150x150.jpg" class="attachment-thumbnail" alt="blog2" title="blog2" /></a>
<a href='http://quags.net/archives/5/blog3' title='blog3'><img width="150" height="150" src="http://quags.net/wp-content/uploads/2010/08/blog3-150x150.jpg" class="attachment-thumbnail" alt="blog3" title="blog3" /></a>

]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/5/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

