<?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>Werk &#187; disque</title>
	<atom:link href="http://werk.feub.net/tag/disque/feed/" rel="self" type="application/rss+xml" />
	<link>http://werk.feub.net</link>
	<description>Pourquoi werk? Rholala ^.^</description>
	<lastBuildDate>Tue, 27 Jul 2010 10:58:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Ajouter un disque dur P-ATA</title>
		<link>http://werk.feub.net/2008/12/24/ajouter-un-disque-dur-p-ata/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ajouter-un-disque-dur-p-ata</link>
		<comments>http://werk.feub.net/2008/12/24/ajouter-un-disque-dur-p-ata/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 05:11:47 +0000</pubDate>
		<dc:creator>Fabien</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[disque]]></category>
		<category><![CDATA[matériel]]></category>

		<guid isPermaLink="false">http://werk.feub.net/?p=9</guid>
		<description><![CDATA[Extension de la capacité de stockage]]></description>
			<content:encoded><![CDATA[<p>
Petit mémo pour ajouter un disque dur à sa machine. C&#8217;est une procédure plutôt générale à GNU/Linux, mais pour info elle à été réalisée sur une <a href="http://www.fedora-fr.org/" title="Fedora France">Fedora 10</a>.
</p>
<p>
Pour étendre la capacité de mon vieux serveur, j&#8217;ai acquis une carte <a href="http://fr.wikipedia.org/wiki/Peripheral_Component_Interconnect" title="Wikipedia">PCI</a> <a href="http://fr.wikipedia.org/wiki/SATA" title="Wikipedia">SATA</a> <a href="http://fr.wikipedia.org/wiki/RAID_(informatique)" title="Wikipedia">RAID</a> qui se négocie pour une bouchée de pain. Cette carte possède outre les 3 connecteurs SATA, un connecteur IDE. Voulant rapidement tester cette carte, son chipset (VT6421) étant reconnu sans problème, j&#8217;y ai ajouté un petit disque IDE de 80Go. J&#8217;en profite donc pour écrire ce petit tuto.
</p>
<h4>Vérification de la présence du disque</h4>
<p>
Cette machine possède déjà 3 disques, un <code>ls -l /dev/sd*</code> doit donc m&#8217;en afficher un quatrième :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sd<span style="color: #000000; font-weight: bold;">*</span>
brw-rw---- <span style="color: #000000;">1</span> root disk <span style="color: #000000;">8</span>,  <span style="color: #000000;">0</span> déc. <span style="color: #000000;">23</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">29</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda
brw-rw---- <span style="color: #000000;">1</span> root disk <span style="color: #000000;">8</span>,  <span style="color: #000000;">1</span> déc. <span style="color: #000000;">23</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">29</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1
brw-rw---- <span style="color: #000000;">1</span> root disk <span style="color: #000000;">8</span>,  <span style="color: #000000;">2</span> déc. <span style="color: #000000;">23</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">29</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda2
brw-rw---- <span style="color: #000000;">1</span> root disk <span style="color: #000000;">8</span>,  <span style="color: #000000;">3</span> déc. <span style="color: #000000;">23</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">29</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda3
brw-rw---- <span style="color: #000000;">1</span> root disk <span style="color: #000000;">8</span>, <span style="color: #000000;">16</span> déc. <span style="color: #000000;">23</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">29</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb
brw-rw---- <span style="color: #000000;">1</span> root disk <span style="color: #000000;">8</span>, <span style="color: #000000;">17</span> déc. <span style="color: #000000;">23</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">29</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb1
brw-rw---- <span style="color: #000000;">1</span> root disk <span style="color: #000000;">8</span>, <span style="color: #000000;">32</span> déc. <span style="color: #000000;">23</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">29</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdc
brw-rw---- <span style="color: #000000;">1</span> root disk <span style="color: #000000;">8</span>, <span style="color: #000000;">33</span> déc. <span style="color: #000000;">23</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">29</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdc1
<span style="color: #000000; font-weight: bold;">&lt;</span>strong <span style="color: #007800;">style</span>=<span style="color: #ff0000;">&quot;color:yellow&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>brw-rw---- <span style="color: #000000;">1</span> root disk <span style="color: #000000;">8</span>, <span style="color: #000000;">48</span> déc. <span style="color: #000000;">23</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">49</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdd<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<h4>Partitionnement</h4>
<p>
L&#8217;étape suivant consiste à le partitionner. Dans mon cas, je ne crée qu&#8217;une seule partition de tout le disque. Voici les étapes avec <a href="http://fr.wikipedia.org/wiki/Fdisk" title="Wikipedia">fdisk</a>, les actions étant en gras. A tout moment dans fdisk vous pouvez taper m pour afficher l&#8217;aide sur les commandes disponibles.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># &lt;strong style=&quot;color:yellow&quot;&gt;fdisk /dev/sdd&lt;/strong&gt;</span>
Le nombre de cylindres pour ce disque est initialisé à 9964.
Il n<span style="color: #ff0000;">'y a rien d'</span><span style="color: #ff0000;">'incorrect avec cela, mais c'</span>est plus grand que <span style="color: #000000;">1024</span>,
et cela pourrait causer des problèmes en fonction pour certaines configurations:
<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> logiciels qui sont exé<span style="color: #c20cb9; font-weight: bold;">cut</span>és à l<span style="color: #ff0000;">'amorçage (i.e., vieilles versions de LILO)
2) logiciels d'</span>amorçage et de partitionnement pour d<span style="color: #ff0000;">'autres SE
(i.e., DOS FDISK, OS/2 FDISK)
Commande (m pour l'</span>aide<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #000000; font-weight: bold;">&lt;</span>strong <span style="color: #007800;">style</span>=<span style="color: #ff0000;">&quot;color:yellow&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>p<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
Disque <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdd: <span style="color: #000000;">81.9</span> Go, <span style="color: #000000;">81964302336</span> octets
<span style="color: #000000;">255</span> heads, <span style="color: #000000;">63</span> sectors<span style="color: #000000; font-weight: bold;">/</span>track, <span style="color: #000000;">9964</span> cylinders
Units = cylindres of <span style="color: #000000;">16065</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">512</span> = <span style="color: #000000;">8225280</span> bytes
Disk identifier: 0x0f800000
Périphérique Amorce    Début         Fin      Blocs    Id  Système
Commande <span style="color: #7a0874; font-weight: bold;">&#40;</span>m pour l<span style="color: #ff0000;">'aide): &lt;strong style=&quot;color:yellow&quot;&gt;n&lt;/strong&gt;
Action de commande
e   étendue
p   partition primaire (1-4)
&lt;strong style=&quot;color:yellow&quot;&gt;p&lt;/strong&gt;
Numéro de partition (1-4): &lt;strong style=&quot;color:yellow&quot;&gt;1&lt;/strong&gt;
Premier cylindre (1-9964, par défaut 1):
Utilisation de la valeur par défaut 1
Last cylindre, +cylindres or +size (1-9964, par défaut 9964):
Utilisation de la valeur par défaut 9964
Commande (m pour l'</span>aide<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #000000; font-weight: bold;">&lt;</span>strong <span style="color: #007800;">style</span>=<span style="color: #ff0000;">&quot;color:yellow&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>p<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
Disque <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdd: <span style="color: #000000;">81.9</span> Go, <span style="color: #000000;">81964302336</span> octets
<span style="color: #000000;">255</span> heads, <span style="color: #000000;">63</span> sectors<span style="color: #000000; font-weight: bold;">/</span>track, <span style="color: #000000;">9964</span> cylinders
Units = cylindres of <span style="color: #000000;">16065</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">512</span> = <span style="color: #000000;">8225280</span> bytes
Disk identifier: 0x0f800000
Périphérique Amorce    Début         Fin      Blocs    Id  Système
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdd1               <span style="color: #000000;">1</span>        <span style="color: #000000;">9964</span>    <span style="color: #000000;">80035798</span>+  <span style="color: #000000;">83</span>  Linux
Commande <span style="color: #7a0874; font-weight: bold;">&#40;</span>m pour l<span style="color: #ff0000;">'aide): &lt;strong style=&quot;color:yellow&quot;&gt;w&lt;/strong&gt;
La table de partitions a été altérée!
Appel de ioctl() pour relire la table de partitions.
La nouvelle table sera utilisé lors du prochain réamorçage.
Synchronisation des disques.</span></pre></div></div>

<p>
Le disque est maintenant prêt à être formaté :
</p>
<h4>Formatage</h4>
<p>
Celui-ci va simplement être fait en <a href="http://fr.wikipedia.org/wiki/Ext3" title="Wikipedia">ext3</a> par cette commande :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># &lt;strong style=&quot;color:yellow&quot;&gt;mkfs.ext3 /dev/sdd1&lt;/strong&gt;</span>
mke2fs 1.41.3 <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">12</span>-Oct-<span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
Étiquette de système de <span style="color: #007800;">fichiers</span>=
Type de système d<span style="color: #ff0000;">'exploitation : Linux
Taille de bloc=4096 (log=2)
Taille de fragment=4096 (log=2)
5005312 i-noeuds, 20008949 blocs
1000447 blocs (5.00%) réservés pour le super utilisateur
Premier bloc de données=0
Nombre maximum de blocs du système de fichiers=0
611 groupes de blocs
32768 blocs par groupe, 32768 fragments par groupe
8192 i-noeuds par groupe
Superblocs de secours stockés sur les blocs :
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424
Écriture des tables d'</span>i-noeuds : complété
Création <span style="color: #c20cb9; font-weight: bold;">du</span> journal <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">32768</span> blocs<span style="color: #7a0874; font-weight: bold;">&#41;</span> : complété
Écriture des superblocs et de l<span style="color: #ff0000;">'information de comptabilité du système de
fichiers : complété
Le système de fichiers sera automatiquement vérifié tous les 33 montages ou
après 180 jours, selon la première éventualité. Utiliser tune2fs -c ou -i
pour écraser la valeur.</span></pre></div></div>

<p>
La partition est opérationnelle, il ne reste plus qu&#8217;à la monter. Pour ce faire, au préalable je crée un répertoire de montage data sous /mnt :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mkdir /mnt/data</span>
<span style="color: #666666; font-style: italic;"># mount /dev/sdd1 /mnt/data</span></pre></div></div>

<p>
Mon disque est accessible :
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># df -h</span>
Sys. de fich.         Tail. Occ. Disp. <span style="color: #000000; font-weight: bold;">%</span>Occ. Monté sur
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>VG1-LVroot
<span style="color: #000000;">9</span>,9G  <span style="color: #000000;">3</span>,6G  <span style="color: #000000;">5</span>,9G  <span style="color: #000000;">38</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>VG1-LVhome
26G  <span style="color: #000000;">3</span>,2G   22G  <span style="color: #000000;">13</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>home
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdc1             145G  130G  <span style="color: #000000;">7</span>,1G  <span style="color: #000000;">95</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>backup
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb1             184G  153G   22G  <span style="color: #000000;">88</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>data1
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1             236M   22M  203M  <span style="color: #000000;">10</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>boot
<span style="color: #000000; font-weight: bold;">&lt;</span>strong <span style="color: #007800;">style</span>=<span style="color: #ff0000;">&quot;color:yellow&quot;</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdd1              76G  180M   72G   <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://werk.feub.net/2008/12/24/ajouter-un-disque-dur-p-ata/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
