Oui,
Il faut écrire.
Tu crée deux partitions pour mettre quoi dedans ?
C’est pour /home et /var ?
Quand ce sera fini, donne la sortie de fdisk -l
Oui,
Il faut écrire.
Tu crée deux partitions pour mettre quoi dedans ?
C’est pour /home et /var ?
Quand ce sera fini, donne la sortie de fdisk -l
oui c’est juste pour home et var c’est juste les dossiers qui sont appelées à grossir.
Donc voila :
[code]fdisk -l
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00030481
Device Boot Start End Blocks Id System
/dev/sdb1 1 1275 10241406 fd Linux raid autodetect
/dev/sdb2 1276 1341 523875 82 Linux swap / Solaris
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000138e0
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 fd Linux raid autodetect
/dev/sda2 1276 1341 523875 82 Linux swap / Solaris
/dev/sda3 1341 37814 292969372+ 83 Linux
/dev/sda4 37814 60801 184649347+ 83 Linux
Disk /dev/md1: 10.4 GB, 10487070720 bytes
2 heads, 4 sectors/track, 2560320 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md1 doesn’t contain a valid partition table
[/code]
sdb maintenant, la même, EXACTEMENT!
Stop!
Les partitions doivent être en FD Linux raid autodetect pas en 83 Linux.
SD4 en Linux swap / Solaris non ?
Non,
sda3 et sda4 doivent être comme sda1 en FD Linux raid autodetect
Sinon impossible de mettre en Raid.
Edit: Tu as déjà une Swap!
Ok
[code]fdisk -l
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00030481
Device Boot Start End Blocks Id System
/dev/sdb1 1 1275 10241406 fd Linux raid autodetect
/dev/sdb2 1276 1341 523875 82 Linux swap / Solaris
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000138e0
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 fd Linux raid autodetect
/dev/sda2 1276 1341 523875 82 Linux swap / Solaris
/dev/sda3 1341 37814 292969372+ fd Linux raid autodetect
/dev/sda4 37814 60801 184649347+ fd Linux raid autodetect
Disk /dev/md1: 10.4 GB, 10487070720 bytes
2 heads, 4 sectors/track, 2560320 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md1 doesn’t contain a valid partition table[/code]
Bon, pareil sur sdb
Comment je fais pour aller sur sdb ??
par default je suis toujours sur sda.
edit ok : cfdisk /dev/sdb
Voila
[code] fdisk -l
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00030481
Device Boot Start End Blocks Id System
/dev/sdb1 1 1275 10241406 fd Linux raid autodetect
/dev/sdb2 1276 1341 523875 82 Linux swap / Solaris
/dev/sdb3 1341 37814 292969372+ fd Linux raid autodetect
/dev/sdb4 37814 60801 184649347+ fd Linux raid autodetect
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000138e0
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 fd Linux raid autodetect
/dev/sda2 1276 1341 523875 82 Linux swap / Solaris
/dev/sda3 1341 37814 292969372+ fd Linux raid autodetect
/dev/sda4 37814 60801 184649347+ fd Linux raid autodetect
Disk /dev/md1: 10.4 GB, 10487070720 bytes
2 heads, 4 sectors/track, 2560320 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md1 doesn’t contain a valid partition table
[/code]
Parfait!
Il faut créer les ensembles Raid maintenant:
mdadm --create --verbose /dev/md2 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3
mdadm --create --verbose /dev/md3 --level=1 --raid-devices=2 /dev/sda4 /dev/sdb4
Marche pas :
mdadm --create --verbose /dev/md2 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3
mdadm: Cannot open /dev/sda3: No such file or directory
mdadm: Cannot open /dev/sdb3: No such file or directory
mdadm: create aborted
j’avais une question pourquoi finalement avoir fait deux partitions au lieu de une ?
Moi aussi…
[quote=“lol”]
Tu crée deux partitions pour mettre quoi dedans ?
C’est pour /home et /var ?[/quote]
Re, je réfléchi à ton problème…
Un reboot ferait peut-être l’affaire.
Est-ce que dmraid est installé ?
Edit: et
Ok je me suis enméllé les pinceau ^^
J’ai refais :
[code]fdisk -l
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00030481
Device Boot Start End Blocks Id System
/dev/sdb1 1 1275 10241406 fd Linux raid autodetect
/dev/sdb2 1276 1341 523875 82 Linux swap / Solaris
/dev/sdb3 1341 60801 477618720 fd Linux raid autodetect
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000138e0
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 fd Linux raid autodetect
/dev/sda2 1276 1341 523875 82 Linux swap / Solaris
/dev/sda3 1341 60801 477618720 fd Linux raid autodetect
Disk /dev/md1: 10.4 GB, 10487070720 bytes
2 heads, 4 sectors/track, 2560320 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md1 doesn’t contain a valid partition table
[/code]
Dmraid ca me dit rien. Les seuls choses que j’ai fait concerne les mails/dns/serveur web/ftp
apt-cache policy dmraid
dmraid:
Installé : (aucun)
Candidat : 1.0.0.rc14-7
Table de version :
1.0.0.rc14-7 0
500 http://ftp.fr.debian.org lenny/main Packages
ls /dev/mapper/
control
Re,
Pas de soucis:
Même commande, mais je n’ai pas trop d’espoir…
Si ça ne fonctionne pas, reboot (je n’aime pas trop, mais je n’ai pas d’autre idée) et repasse la commande.
Fini pour moi aujourd’hui…
La suite (en gros…)
Créer le /dev/md2
Le formater: mkfs.ext3 /dev/md2
Le monter quelquepart (/media/md2)
Copier ce que tu as dans /home vers /media/md2
Déplacer /home vers /home.old
Démonter /media/md2
Ajouter l’entrée dans le fstab pour /dev/md2 vers /home
Monter ça avec mount -a
A demain!
Edit: J’ai oublié…
Sauvegarder la conf de mdadm: mdadm --detail --scan --verbose > /etc/mdadm/mdadm.conf
Ca a marché après le soft reboot.
Gros merci lol, je vais continuer 
Fait
Créer le /dev/md2
mdadm -Cv /dev/md2 -l1 -n2 /dev/sdb3 /dev/sda3
mdadm: size set to 477618624K
mdadm: array /dev/md2 started.
Fait
Le formater: mkfs.ext3 /dev/md2
Fait
Le monter quelquepart (/media/md2)
mkdir /media/md2
mount -t ext3 /dev/md2 /media/md2
Fait
Copier ce que tu as dans /home vers /media/md2
cp -R /home/ /media/md2/
Fait
Déplacer /home vers /home.old
mv /home/ /home.old
Fait
Démonter /media/md2
umount /media/md2/
Fait
Ajouter l’entrée dans le fstab pour /dev/md2 vers /home
[code] <sys.fichiers>
/dev/md1 / ext3 errors=remount-ro 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sdb2 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/md2 /home ext3 defaults 0 0
[/code]
Fait
Monter ça avec mount -a
mkdir /home
mount -a
cp -R /home.old/ /home
Fait
Sauvegarder la conf de mdadm: mdadm --detail --scan --verbose > /etc/mdadm/mdadm.conf
disk_free_space 423.79 GB/448.35 GB
Voila je crois que c’est tous bon ![]()
Gros gros merci Lol et si je passe à madgascar promis je t’offre une biere et à l’inverse si tu passes en Lozere 
Salut,
Parfait! ![]()
N’oublie pas la coche verte pour marquer le sujet résolu.
Tu pourrais aussi changer le titre du premier message: “comment créer et monter une partition en raid1” par exemple.