<?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>maduixa &#187; disc dur</title>
	<atom:link href="http://blog.jau.cat/tag/disc-dur/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jau.cat</link>
	<description>Blog personal d&#039;en minterior amb gust a maduixa</description>
	<lastBuildDate>Sun, 16 Oct 2011 22:02:20 +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>Copiar el MBR d&#8217;un disc a un altre</title>
		<link>http://blog.jau.cat/2010/06/19/copiar-el-mbr-dun-disc-a-un-altre/</link>
		<comments>http://blog.jau.cat/2010/06/19/copiar-el-mbr-dun-disc-a-un-altre/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 11:58:09 +0000</pubDate>
		<dc:creator>minterior</dc:creator>
				<category><![CDATA[Programari]]></category>
		<category><![CDATA[com es fa]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[disc dur]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[MBR]]></category>

		<guid isPermaLink="false">http://blog.jau.cat/?p=359</guid>
		<description><![CDATA[Amb la següent comanda podem copiar el MBR (Master Boot Record) d&#8217;un disc a un altre: L&#8217;explicació d&#8217;aquesta és: llegeix i escriu (copia) només un bloc de 512 bytes del disc sdx al disc sdy. Això pot ser útil quan per alguna raó perdem la taula de particions d&#8217;un disc dur o d&#8217;un pen drive, [...]]]></description>
			<content:encoded><![CDATA[<p>Amb la següent comanda podem copiar el <strong>MBR</strong> (<a title="MBR a la Wikipedia (en castellà)" href="http://es.wikipedia.org/wiki/Master_Boot_Record">Master Boot Record</a>) d&#8217;un disc a un altre:</p>
<pre class="brush: bash; title: ; notranslate">dd if=/dev/sdx of=/dev/sdy bs=512 count=1</pre>
<p>L&#8217;explicació d&#8217;aquesta és: llegeix i escriu (copia) <strong>només un bloc</strong> de<strong> 512 bytes</strong> del disc sdx al disc sdy.</p>
<p>Això pot ser útil quan per alguna raó perdem la <strong>taula de particions</strong> d&#8217;un disc dur o d&#8217;un pen drive, i d&#8217;aquesta manera restablim el MBR a partir d&#8217;un altre disc. He vist moltes vegades que un disc dur que no té cap partició, el sistema operatiu Windows no el reconeix. Això vol dir que el disc, per exemple /dev/sdx, no conté /dev/sdx1, /dev/sdx2&#8230; que seria cadascuna de les particions; ho podem comprovar si teclegem al terminal:</p>
<pre class="brush: bash; title: ; notranslate">ls /dev/sdx*</pre>
<p>només ens apareix l&#8217;arrel del disc /dev/sdx.</p>
<p>Una altra manera de crear particions és amb els programes cfdisk o fdisk, tot seguint les instruccions que indiquen.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jau.cat/2010/06/19/copiar-el-mbr-dun-disc-a-un-altre/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mini benchmark de reiserfs</title>
		<link>http://blog.jau.cat/2010/03/27/mini-benchmark-de-reiserfs/</link>
		<comments>http://blog.jau.cat/2010/03/27/mini-benchmark-de-reiserfs/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 12:09:33 +0000</pubDate>
		<dc:creator>minterior</dc:creator>
				<category><![CDATA[Programari]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[cp]]></category>
		<category><![CDATA[disc dur]]></category>
		<category><![CDATA[reiserfs]]></category>

		<guid isPermaLink="false">http://blog.jau.cat/?p=306</guid>
		<description><![CDATA[Després d&#8217;haver  dels dos discos durs, i d&#8217;haver comprovat que el disc important no té , l&#8217;he formatat. He creat el sistema de fitxers reiserfs amb: He passat totes les dades d&#8217;un disc dur (de la marca Seagate) a un altre (Western Digital), tots dos SATA i de 500 GB. Primer he mirat la quantitat [...]]]></description>
			<content:encoded><![CDATA[<p>Després d&#8217;haver <a href="http://blog.jau.cat/2010/03/24/gnu-ddrescue-per-recuperar-dades-de-discs-durs/" title="GNU ddrescue per recuperar dades de discs durs">recuperat totes les dades</a> dels dos discos durs, i d&#8217;haver comprovat que el disc important no té <a href="http://blog.jau.cat/2010/03/26/comprovar-sectors-danyats-dun-disc-dur-amb-badblocks/" title="Comprovar sectors danyats d'un disc dur amb badblocks">errors de maquinari</a>, l&#8217;he formatat. He creat el sistema de fitxers <strong>reiserfs</strong> amb:</p>
<pre class="brush: bash; title: ; notranslate">cfdisk /dev/sda1 #crear la partició de forma interactiva
mkreiserfs /dev/sda1 #formatejar amb reiserfs</pre>
<p>He passat totes les dades d&#8217;un <strong>disc dur</strong> (de la marca Seagate) a un altre (Western Digital), tots dos <strong>SATA</strong> i de 500 GB. Primer he mirat la quantitat de dades que havia de passar, en <a title="Kilo binari byte a la Viquipèdia" href="http://ca.wikipedia.org/wiki/Kibibyte">kibibytes</a> (KiB) i en <a title="Giga binari byte a la Viquipèdia" href="http://ca.wikipedia.org/wiki/Gibibyte">gibibytes</a> (GiB):</p>
<pre class="brush: plain; title: ; notranslate">minterior@jau:/media/recuperat$ du -sc
309201518       .
309201518       total
minterior@jau:/media/recuperat$ du -sch
295G    .
295G    total</pre>
<p>Podem comprovar l&#8217;equivalència: 309201518 KiB / 1024 / 1024 = 294,877546 GiB ≈ 295 GiB</p>
<p>La còpia l&#8217;he feta des del terminal, anteposant la comanda <em>time</em> a la comanda <em>cp -rp</em> per obtenir el temps de duració de la còpia, que ha estat:</p>
<pre class="brush: plain; title: ; notranslate">15.63user 2163.99system 1:54:07elapsed 31%CPU (0avgtext+0avgdata 0maxresident)k
618162424inputs+617982328outputs (1major+347minor)pagefaults 0swaps</pre>
<p>Quasi <strong>dues hores</strong>. Per tant ha estat 6847 segons (1*3600 + 54*60 + 7) per escriure 316.622.354.432 bytes (309201518 * 1024), el que és una velocitat de:</p>
<p>46242493.71 bytes/s ≈ 46,2425 MB/s = 44,1003 <a title="Mega binari byte a la Viquipèdia" href="http://ca.wikipedia.org/wiki/Mebibyte">MiB</a>/s</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jau.cat/2010/03/27/mini-benchmark-de-reiserfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comprovar sectors danyats d&#8217;un disc dur amb badblocks</title>
		<link>http://blog.jau.cat/2010/03/26/comprovar-sectors-danyats-dun-disc-dur-amb-badblocks/</link>
		<comments>http://blog.jau.cat/2010/03/26/comprovar-sectors-danyats-dun-disc-dur-amb-badblocks/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 20:48:37 +0000</pubDate>
		<dc:creator>minterior</dc:creator>
				<category><![CDATA[Maquinari]]></category>
		<category><![CDATA[Programari]]></category>
		<category><![CDATA[badblocks]]></category>
		<category><![CDATA[com es fa]]></category>
		<category><![CDATA[disc dur]]></category>
		<category><![CDATA[GNU/Linux]]></category>

		<guid isPermaLink="false">http://blog.jau.cat/?p=307</guid>
		<description><![CDATA[Un cop dels , volia comprovar si aquests tenien sectors danyats. Ho he fet amb l&#8217;eina de Linux badblocks. Es pot executar de forma destructiva o no-destructiva, i jo he triat la primera perquè no tenia dades al disc que hagués de conservar. Per tant he executat: Les opcions triades volen dir: Si observeu la [...]]]></description>
			<content:encoded><![CDATA[<p>Un cop <a href="http://blog.jau.cat/2010/03/24/gnu-ddrescue-per-recuperar-dades-de-discs-durs/">recuperades les dades</a> dels <a href="http://blog.jau.cat/2010/02/21/dos-discs-durs-comprats-alhora-amb-errors/">discs durs que tenien problemes</a>, volia comprovar si aquests tenien sectors danyats. Ho he fet amb l&#8217;eina de Linux <strong>badblocks</strong>. Es pot executar de forma destructiva o no-destructiva, i jo he triat la primera perquè no tenia dades al disc que hagués de conservar. Per tant he executat:</p>
<pre class="brush: bash; title: ; notranslate">badblocks -wvs -o badblocks-sda.log /dev/sda</pre>
<p>Les opcions triades volen dir:</p>
<pre class="brush: plain; title: ; notranslate">
-w    test de lectura i escriptura DESTRUCTIU.
-v    mostra més informació
-s    mostra el progrés
-o    fitxer on escriure la llista de blocs defectuosos
</pre>
<p>Si observeu la comanda, no he indicat cap partició sinó tot el disc sencer (/dev/sda), la qual cosa combinada amb l&#8217;opció <em>-w</em> implica que el <a title="Master Boot Record a la Wikipedia (en castellà)" href="http://es.wikipedia.org/wiki/Master_Boot_Record">MBR</a>, particions existents i dades, <strong>seran destruïts</strong>.</p>
<p>Si no voleu perdre cap dada del disc i fer també el test de lectura i escriptura canvieu l&#8217;opció <em>-w</em> per <em>-n</em>. Si no en poseu cap de les dues el test serà de <strong>només lectura</strong>. Per a més informació i opcions recordeu mirar el manual escrivint al terminal:</p>
<pre class="brush: bash; title: ; notranslate">man badblocks</pre>
<p>En el meu cas, després d&#8217;esperar unes quantes hores, vaig tenir sort i cap sector del disc dur estava danyat. <img src='http://blog.jau.cat/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Sort! <img src='http://blog.jau.cat/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jau.cat/2010/03/26/comprovar-sectors-danyats-dun-disc-dur-amb-badblocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GNU ddrescue per recuperar dades de discs durs</title>
		<link>http://blog.jau.cat/2010/03/24/gnu-ddrescue-per-recuperar-dades-de-discs-durs/</link>
		<comments>http://blog.jau.cat/2010/03/24/gnu-ddrescue-per-recuperar-dades-de-discs-durs/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 22:43:19 +0000</pubDate>
		<dc:creator>minterior</dc:creator>
				<category><![CDATA[Maquinari]]></category>
		<category><![CDATA[Programari]]></category>
		<category><![CDATA[com es fa]]></category>
		<category><![CDATA[dades]]></category>
		<category><![CDATA[ddrescue]]></category>
		<category><![CDATA[disc dur]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[recuperació]]></category>

		<guid isPermaLink="false">http://blog.jau.cat/?p=291</guid>
		<description><![CDATA[L&#8217;altre dia (uf, ja fa un mes d&#8217;això!) vaig explicar la mala sort que vaig tenir quan  dels tres que tinc al meu ordinador. Abans d&#8217;ahir vaig començar les tasques de recuperació de dades, amb el programa GNU ddrescue. Al mateix manual en línia de ddrescue hi ha exemples molt útils, el primer dels quals [...]]]></description>
			<content:encoded><![CDATA[<p>L&#8217;altre dia (uf, ja fa un mes d&#8217;això!) vaig explicar la mala sort que vaig tenir quan <a href="http://blog.jau.cat/2010/02/21/dos-discs-durs-comprats-alhora-amb-errors/">dos discs durs tenien errors</a> dels tres que tinc al meu ordinador. Abans d&#8217;ahir vaig començar les tasques de recuperació de dades, amb el programa GNU ddrescue. Al mateix <a href="http://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Examples">manual en línia de ddrescue</a> hi ha exemples molt útils, el primer dels quals és el que necessito jo. Anem per feina.</p>
<p>Recordo que l&#8217;objectiu és recuperar les dades de dos discos idèntics de 500 GB a un tercer disc auxiliar de la mateixa capacitat, que em va deixar un bon amic meu. És obvi que l&#8217;auxiliar ha de ser de la mateixa capacitat o major que el disc que volem recuperar. Primer ho intentaré amb un disc i després amb l&#8217;altre. El paràmetre de ddrescue <em>-n</em> o <em>&#8211;no-split</em> no intenta dividir o reintentar blocs fallits, i això faig a la primera passada:</p>
<pre class="brush: plain; title: ; notranslate">root@jau:~# ddrescue -n /dev/sda /dev/sdb ddrescue-sda-a-sdb.log

Press Ctrl-C to interrupt
Initial status (read from logfile)
rescued:         0 B,  errsize:       0 B,  errors:       0
Current status
rescued:   500107 MB,  errsize:    143 kB,  current rate:    10265 B/s
ipos:       29744 kB,   errors:      36,    average rate:   14150 kB/s
opos:       29744 kB,     time from last successful read:       0 s
Finished</pre>
<p>El procés ha trigat unes <strong>10 hores</strong>. Cosa que podem comprovar a partir de les dades informatives anteriors:<br />
500107 MB / 14,150 MB/s / 3600 s/h ≈ 9,8 hores.</p>
<p>Tot seguit executo ddrescue amb les opcions <em>-d</em> o <em>&#8211;direct</em> , que usa accés directe al disc d&#8217;entrada, i <em>-r</em> o <em>&#8211;max-retries=&lt;n&gt;</em>, que surt després de n intents. Li passo el mateix nom de fitxer de log que a la comanda anterior i així ddrescue sap que només ha de buscar els sectors on ha tingut problemes durant la primera lectura:<br />
<span id="more-291"></span></p>
<pre class="brush: plain; title: ; notranslate">root@jau:~# ddrescue -dr3 /dev/sda /dev/sdb ddrescue-sda-a-sdb.log

Press Ctrl-C to interrupt
Initial status (read from logfile)
rescued:   500107 MB,  errsize:    143 kB,  errors:      36
Current status
rescued:   500107 MB,  errsize:   17920 B,  current rate:        0 B/s
   ipos:    34765 MB,   errors:      35,    average rate:       48 B/s
   opos:    34765 MB,     time from last successful read:    23.7 m
Finished</pre>
<p>Després de 3 intents i uns <strong>45 minuts</strong> més, he passat de 143 kB amb errors a 17,92 kB. No està malament.</p>
<p>A partir d&#8217;ara ja treballarem amb el disc rèplica de l&#8217;afectat; sdb en aquest cas. Ara toca refer la taula de particions del disc:</p>
<pre class="brush: bash; title: ; notranslate">fdisk /dev/sdb</pre>
<p>Teclejo:</p>
<p><strong>p</strong> imprimeix la taula de particions, per veure si aquesta és correcta. Té una única partició, com esperava.<br />
<strong> w</strong> escriu la taula al disc i surt, ﻿per desar-la i sortir.</p>
<p>A continuació cal revisar el sistema de fitxers d&#8217;aquesta partició. En el meu cas ja sé que els dos discos durs tenien el sistema de fitxers <a title="ReiserFS a la Wikipedia (en castellà)" href="http://es.wikipedia.org/wiki/ReiserFS">reisersfs</a>. Per tant:</p>
<pre class="brush: plain; title: ; notranslate">reiserfsck -f --logfile reiserfsck-check-sdb1.log /dev/sdb1
reiserfsck 3.6.21 (2009 www.namesys.com)

*************************************************************
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to reiserfs-list@namesys.com, **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will read-only check consistency of the filesystem on /dev/sdb1
Will put log info to 'reiserfsck-check-sdb1.log'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
###########
reiserfsck --check started at Tue Mar 23 05:58:48 2010
###########
Replaying journal: Done.
Reiserfs journal '/dev/sdb1' in blocks [18..8211]: 0 transactions replayed
Checking internal tree.. finished
Comparing bitmaps..Fatal corruptions were found, Semantic pass skipped
1 found corruptions can be fixed only when running with --rebuild-tree
###########
reiserfsck finished at Tue Mar 23 06:09:54 2010
###########
</pre>
<p>Ha trigat poc més d&#8217;<strong>11 minuts</strong>, però ara demana executar la comanada amb l&#8217;opció <em>&#8211;rebuild-tree</em>. Som-hi:</p>
<pre class="brush: plain; title: ; notranslate">
reiserfsck -f --rebuild-tree --logfile reiserfsck-rebuild-tree-sdb1.log /dev/sdb1
reiserfsck 3.6.21 (2009 www.namesys.com)

*************************************************************
** Do not  run  the  program  with  --rebuild-tree  unless **
** something is broken and MAKE A BACKUP  before using it. **
** If you have bad sectors on a drive  it is usually a bad **
** idea to continue using it. Then you probably should get **
** a working hard drive, copy the file system from the bad **
** drive  to the good one -- dd_rescue is  a good tool for **
** that -- and only then run this program.                 **
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to reiserfs-list@namesys.com, **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will rebuild the filesystem (/dev/sdb1) tree
Will put log info to 'reiserfsck-rebuild-tree-sdb1.log'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
Replaying journal: Done.
Reiserfs journal '/dev/sdb1' in blocks [18..8211]: 0 transactions replayed
###########
reiserfsck --rebuild-tree started at Tue Mar 23 06:21:26 2010
###########

Pass 0:
Loading on-disk bitmap .. ok, 113159770 blocks marked used
Skipping 11937 blocks (super block, journal, bitmaps) 113147833 blocks will be read
0%....20%....                                                   left 0, 16287 /seccseccccc
	&quot;r5&quot; hash is selected
Flushing..finished
	Read blocks (but not data blocks) 113147833
		Leaves among those 112068
		Objectids found 3049

Pass 1 (will try to insert 112068 leaves):
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100%                          left 0, 98 /sec
Flushing..finished
	112068 leaves read
		112048 inserted
		20 not inserted

Pass 2:
0%....20%....40%....60%....80%....100%                          left 0, 40 /sec
Flushing..finished
	Leaves inserted item by item 20
Pass 3 (semantic):
Flushing..finished
	Files found: 2809
	Directories found: 198
	Symlinks found: 34
Pass 3a (looking for lost dir/files):
Looking for lost directories:
Looking for lost files:3 /sec
Flushing..finished18, 74 /sec
	Objects without names 7
	Files linked to /lost+found 7
Pass 4 - finished done 105303, 99 /sec
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Mar 23 08:54:56 2010
###########
</pre>
<p>Aquesta operació ja ha trigat bastant, unes <strong>dues hores i mitja</strong>. Muntem el nou disc ja net i polit:</p>
<pre class="brush: bash; title: ; notranslate">mount /dev/sdb1 /media/recuperat/</pre>
<p>I tot ha anat bé! Dades recuperades!!! Genial <img src='http://blog.jau.cat/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Només han calgut quasi 14 hores i una mica de paciència. Ara toca fer el mateix amb el segon disc dur&#8230; uf.</p>
<p><strong>Actualització</strong> (25-03-2010): el segon disc s&#8217;ha copiat en només 4 hores i 16 minuts, a 32,484 MB/s, i no ha tingut cap error després de la primera passada! Per tant he reescrit la taula de particions i executat només un cop reiserfsck (el rebuild tree tampoc calia). I finalment muntar la partició i veure que totes les dades estan intactes. Magnífic!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jau.cat/2010/03/24/gnu-ddrescue-per-recuperar-dades-de-discs-durs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dos discs durs comprats alhora amb errors</title>
		<link>http://blog.jau.cat/2010/02/21/dos-discs-durs-comprats-alhora-amb-errors/</link>
		<comments>http://blog.jau.cat/2010/02/21/dos-discs-durs-comprats-alhora-amb-errors/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 21:55:47 +0000</pubDate>
		<dc:creator>minterior</dc:creator>
				<category><![CDATA[Maquinari]]></category>
		<category><![CDATA[disc dur]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[reiserfs]]></category>
		<category><![CDATA[sata]]></category>

		<guid isPermaLink="false">http://blog.jau.cat/?p=235</guid>
		<description><![CDATA[Quan semblava que la setmana havia anat malament i havia acabat el divendres amb un atropellament i embenat del turmell de la cama dreta, encara podia anar pitjor. Ja ho diu l'amic l'enemic Murphy: "Si alguna cosa pot sortir malament, sortirà malament". I com vaig llegir al llibre de les lleis de Murphy: "si alguna cosa va malament, anirà pitjor".

El cas és que el dissabte, em disposava a fer feina a l'ordinador de casa, quan de sobte vaig començar a notar problemes d'accés a disc, i un sorollet sospitós. Després de comprovar que no podia escriure a la partició de dades, vaig reiniciar la màquina i van aparèixer els errors al syslog...]]></description>
			<content:encoded><![CDATA[<p>Quan semblava que la setmana havia anat malament i havia acabat el divendres amb un <a href="http://blog.jau.cat/2010/02/18/primera-vegada-que-matropellen-mentre-circulava-en-bicicleta/">atropellament</a> i <a href="http://blog.jau.cat/2010/02/20/lesionat-del-turmell-dret/">embenat del turmell</a> de la cama dreta, encara podia anar pitjor. Ja ho diu <span style="text-decoration: line-through;">l&#8217;amic</span> l&#8217;enemic <a href="http://ca.wikipedia.org/wiki/Llei_de_Murphy">Murphy</a>: &#8221;<cite>Si alguna cosa pot sortir malament, sortirà malament</cite>&#8220;. I com vaig llegir al <a href="http://img62.imageshack.us/img62/4192/laleydemurphy.jpg">llibre de les lleis de Murphy</a>: &#8220;<cite>si alguna cosa va malament, anirà pitjor</cite>&#8220;.</p>
<p>El cas és que ahir dissabte, em disposava a fer feina a l&#8217;ordinador de casa, quan de sobte vaig començar a notar problemes d&#8217;accés a disc, i un sorollet sospitós. Després de comprovar que no podia escriure a la partició de dades, vaig reiniciar la màquina i van aparèixer els errors al syslog:</p>
<div style="overflow-x: scroll; width: 450px;">
<pre>Feb 20 11:28:14 jau kernel: [  721.004020] ata2: lost interrupt (Status 0x50)
Feb 20 11:28:14 jau kernel: [  721.004052] ata2.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6 frozen
Feb 20 11:28:14 jau kernel: [  721.004066] ata2.00: cmd c8/00:08:cf:00:01/00:00:00:00:00/e0 tag 0 dma 4096 in
Feb 20 11:28:14 jau kernel: [  721.004067]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 20 11:28:14 jau kernel: [  721.004072] ata2.00: status: { DRDY }
Feb 20 11:28:14 jau kernel: [  721.004082] ata2: hard resetting link
Feb 20 11:28:14 jau kernel: [  721.340070] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Feb 20 11:28:14 jau kernel: [  721.392043] ata2.00: configured for UDMA/133
Feb 20 11:28:14 jau kernel: [  721.392050] ata2.00: device reported invalid CHS sector 0
Feb 20 11:28:14 jau kernel: [  721.392061] ata2: EH complete
Feb 20 11:28:14 jau kernel: [ 1374.388464] REISERFS (device sdb1): found reiserfs format "3.6" with standard journal
Feb 20 11:28:14 jau kernel: [ 1374.388493] REISERFS (device sdb1): using ordered data mode
Feb 20 11:28:14 jau kernel: [ 1374.388876] REISERFS (device sdb1): journal params: device sdb1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
Feb 20 11:28:14 jau kernel: [ 1374.389792] REISERFS (device sdb1): checking transaction log (sdb1)
Feb 20 11:28:14 jau kernel: [ 1377.350990] ata2.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6
Feb 20 11:28:14 jau kernel: [ 1377.350996] ata2.00: BMDMA stat 0x4
Feb 20 11:28:14 jau kernel: [ 1377.351007] ata2.00: cmd c8/00:08:d7:00:01/00:00:00:00:00/e0 tag 0 dma 4096 in
Feb 20 11:28:14 jau kernel: [ 1377.351009]          res 51/40:00:db:00:01/00:00:00:00:00/e0 Emask 0x9 (media error)
Feb 20 11:28:14 jau kernel: [ 1377.351013] ata2.00: status: { DRDY ERR }
Feb 20 11:28:14 jau kernel: [ 1377.351016] ata2.00: error: { UNC }
Feb 20 11:28:14 jau kernel: [ 1377.351027] ata2: hard resetting link
Feb 20 11:28:14 jau kernel: [ 1377.668069] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Feb 20 11:28:14 jau kernel: [ 1377.705303] ata2.00: configured for UDMA/133
Feb 20 11:28:14 jau kernel: [ 1377.705314] ata2: EH complete
Feb 20 11:28:14 jau kernel: [ 1381.012774] ata2.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6
Feb 20 11:28:14 jau kernel: [ 1381.012778] ata2.00: BMDMA stat 0x4
Feb 20 11:28:14 jau kernel: [ 1381.012787] ata2.00: cmd c8/00:08:d7:00:01/00:00:00:00:00/e0 tag 0 dma 4096 in
Feb 20 11:28:14 jau kernel: [ 1381.012789]          res 51/40:00:db:00:01/00:00:00:00:00/e0 Emask 0x9 (media error)
Feb 20 11:28:14 jau kernel: [ 1381.012793] ata2.00: status: { DRDY ERR }
Feb 20 11:28:14 jau kernel: [ 1381.012795] ata2.00: error: { UNC }
Feb 20 11:28:14 jau kernel: [ 1381.012803] ata2: hard resetting link
Feb 20 11:28:14 jau kernel: [ 1381.332067] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Feb 20 11:28:14 jau kernel: [ 1381.365077] ata2.00: configured for UDMA/133
Feb 20 11:28:14 jau kernel: [ 1381.365085] ata2: EH complete
Feb 20 11:28:14 jau kernel: [ 1384.288163] ata2.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6
Feb 20 11:28:14 jau kernel: [ 1384.288167] ata2.00: BMDMA stat 0x4
Feb 20 11:28:14 jau kernel: [ 1384.288176] ata2.00: cmd c8/00:08:d7:00:01/00:00:00:00:00/e0 tag 0 dma 4096 in
Feb 20 11:28:14 jau kernel: [ 1384.288177]          res 51/40:00:db:00:01/00:00:00:00:00/e0 Emask 0x9 (media error)
Feb 20 11:28:14 jau kernel: [ 1384.288181] ata2.00: status: { DRDY ERR }
Feb 20 11:28:14 jau kernel: [ 1384.288184] ata2.00: error: { UNC }
Feb 20 11:28:14 jau kernel: [ 1384.288191] ata2: hard resetting link
Feb 20 11:28:14 jau kernel: [ 1384.608067] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Feb 20 11:28:14 jau kernel: [ 1384.640473] ata2.00: configured for UDMA/133
Feb 20 11:28:14 jau kernel: [ 1384.640479] ata2: EH complete
Feb 20 11:28:14 jau kernel: [ 1387.682677] ata2.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6
Feb 20 11:28:14 jau kernel: [ 1387.682681] ata2.00: BMDMA stat 0x4
Feb 20 11:28:14 jau kernel: [ 1387.682690] ata2.00: cmd c8/00:08:d7:00:01/00:00:00:00:00/e0 tag 0 dma 4096 in
Feb 20 11:28:14 jau kernel: [ 1387.682692]          res 51/40:00:db:00:01/00:00:00:00:00/e0 Emask 0x9 (media error)
Feb 20 11:28:14 jau kernel: [ 1387.682696] ata2.00: status: { DRDY ERR }
Feb 20 11:28:14 jau kernel: [ 1387.682698] ata2.00: error: { UNC }
Feb 20 11:28:14 jau kernel: [ 1387.682706] ata2: hard resetting link
Feb 20 11:28:14 jau kernel: [ 1388.000071] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Feb 20 11:28:14 jau kernel: [ 1388.028998] ata2.00: configured for UDMA/133
Feb 20 11:28:14 jau kernel: [ 1388.029005] ata2: EH complete
Feb 20 11:28:14 jau kernel: [ 1391.079195] ata2.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6
Feb 20 11:28:14 jau kernel: [ 1391.079199] ata2.00: BMDMA stat 0x4
Feb 20 11:28:14 jau kernel: [ 1391.079207] ata2.00: cmd c8/00:08:d7:00:01/00:00:00:00:00/e0 tag 0 dma 4096 in
Feb 20 11:28:14 jau kernel: [ 1391.079209]          res 51/40:00:db:00:01/00:00:00:00:00/e0 Emask 0x9 (media error)
Feb 20 11:28:14 jau kernel: [ 1391.079213] ata2.00: status: { DRDY ERR }
Feb 20 11:28:14 jau kernel: [ 1391.079216] ata2.00: error: { UNC }
Feb 20 11:28:14 jau kernel: [ 1391.079223] ata2: hard resetting link
Feb 20 11:28:14 jau kernel: [ 1391.396067] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Feb 20 11:28:14 jau kernel: [ 1391.432510] ata2.00: configured for UDMA/133
Feb 20 11:28:14 jau kernel: [ 1391.432517] ata2: EH complete
Feb 20 11:28:14 jau kernel: [ 1394.354586] ata2.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6
Feb 20 11:28:14 jau kernel: [ 1394.354590] ata2.00: BMDMA stat 0x4
Feb 20 11:28:14 jau kernel: [ 1394.354598] ata2.00: cmd c8/00:08:d7:00:01/00:00:00:00:00/e0 tag 0 dma 4096 in
Feb 20 11:28:14 jau kernel: [ 1394.354600]          res 51/40:00:db:00:01/00:00:00:00:00/e0 Emask 0x9 (media error)
Feb 20 11:28:14 jau kernel: [ 1394.354603] ata2.00: status: { DRDY ERR }
Feb 20 11:28:14 jau kernel: [ 1394.354606] ata2.00: error: { UNC }
Feb 20 11:28:14 jau kernel: [ 1394.354614] ata2: hard resetting link
Feb 20 11:28:14 jau kernel: [ 1394.672066] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Feb 20 11:28:14 jau kernel: [ 1394.700908] ata2.00: configured for UDMA/133
Feb 20 11:28:14 jau kernel: [ 1394.700920] sd 1:0:0:0: [sdb] Unhandled sense code
Feb 20 11:28:14 jau kernel: [ 1394.700925] sd 1:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Feb 20 11:28:14 jau kernel: [ 1394.700930] sd 1:0:0:0: [sdb] Sense Key : Medium Error [current] [descriptor]
Feb 20 11:28:14 jau kernel: [ 1394.700937] Descriptor sense data with sense descriptors (in hex):
Feb 20 11:28:14 jau kernel: [ 1394.700940]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
Feb 20 11:28:14 jau kernel: [ 1394.700952]         00 01 00 db
Feb 20 11:28:14 jau kernel: [ 1394.700957] sd 1:0:0:0: [sdb] Add. Sense: Unrecovered read error - auto reallocate failed
Feb 20 11:28:15 jau kernel: [ 1394.700965] end_request: I/O error, dev sdb, sector 65755
Feb 20 11:28:15 jau kernel: [ 1394.700978] ata2: EH complete
Feb 20 11:28:15 jau kernel: [ 1394.701248] REISERFS error (device sdb1): vs-13070 reiserfs_read_locked_inode: i/o failure occurred trying to find stat data of [1 2 0x0 SD]
Feb 20 11:28:15 jau kernel: [ 1394.701253] REISERFS (device sdb1): Remounting filesystem read-only
Feb 20 11:28:15 jau kernel: [ 1394.701263] REISERFS (device sdb1): Using r5 hash to sort names
Feb 20 11:28:15 jau kernel: [ 1394.749441] REISERFS (device sdc5): found reiserfs format "3.6" with standard journal
Feb 20 11:28:15 jau kernel: [ 1394.749462] REISERFS (device sdc5): using ordered data mode
Feb 20 11:28:15 jau kernel: [ 1394.758307] REISERFS (device sdc5): journal params: device sdc5, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
Feb 20 11:28:15 jau kernel: [ 1394.759206] REISERFS (device sdc5): checking transaction log (sdc5)
Feb 20 11:28:15 jau kernel: [ 1394.817540] REISERFS (device sdc5): Using r5 hash to sort names
Feb 20 11:28:15 jau kernel: [ 1394.882579] REISERFS (device sdb1): found reiserfs format "3.6" with standard journal
Feb 20 11:28:15 jau kernel: [ 1394.882617] REISERFS (device sdb1): using ordered data mode
Feb 20 11:28:15 jau kernel: [ 1394.884805] REISERFS (device sdb1): journal params: device sdb1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
Feb 20 11:28:15 jau kernel: [ 1394.885733] REISERFS (device sdb1): checking transaction log (sdb1)</pre>
</div>
<p>A partir d&#8217;aquí ja no vaig poder muntar les particions dels dos discos SATA de 500 GB (cadascun amb una única partició), ni com a <em>read-only</em>. Es van intentar repetir les transaccions pendents (replay journal) amb la comanda <strong>fsck.reiserfs</strong>, però no es va arreglar la cosa. Vaig provar les opcions <strong>&#8211;fix-fixable</strong> i <strong>&#8211;rebuild-tree</strong> però tampoc es recuperava. El que és sospitós és que hagin fallat tots dos alhora, els quals també els vaig comprar al mateix moment. No sé què haurà passat.</p>
<p>De moment els he desconnectat per poder treballar amb l&#8217;ordinador, perquè afortunadament les particions <strong>/</strong> (arrel) i <strong>/home</strong> les tinc en un disc ATA que no va fallar. Ja miraré d&#8217;arreglar-ho quan pugui, sobretot per recuperar les dades que hi tenia, tot i que estic relativament tranquil perquè tinc un backup del 24 de novembre del 2009; no és molt recent, però tampoc massa antic.</p>
<p>En fi, un desastre tot plegat! Setmana per oblidar&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jau.cat/2010/02/21/dos-discs-durs-comprats-alhora-amb-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

