Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
elearning:workbooks:debian:10:junior:l109 [2022/04/29 07:57] – created admin | elearning:workbooks:debian:10:junior:l109 [2024/04/22 13:58] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
- | Version : **2022.01** | + | Version : **2024.01** |
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
Ligne 54: | Ligne 54: | ||
* LAB #27 - Créer un Système de Fichiers Chiffré avec encryptfs | * LAB #27 - Créer un Système de Fichiers Chiffré avec encryptfs | ||
* LAB #28 - Créer un Système de Fichiers Chiffré avec LUKS | * LAB #28 - Créer un Système de Fichiers Chiffré avec LUKS | ||
+ | * Raid Logiciel | ||
+ | * LAB #29 - Mise en Place du RAID 5 Logiciel | ||
+ | * 29.1 - Préparer le disque | ||
+ | * 29.2 - Créer une Unité RAID | ||
+ | * 29.3 - Remplacer une Unité Défaillante | ||
* Le Swap | * Le Swap | ||
* Taille du swap | * Taille du swap | ||
Ligne 59: | Ligne 64: | ||
* La Commande swapon | * La Commande swapon | ||
* La Commande swapoff | * La Commande swapoff | ||
- | * LAB #29 - Créer un Fichier de Swap | + | * LAB #30 - Créer un Fichier de Swap |
=====Périphériques de stockage===== | =====Périphériques de stockage===== | ||
Ligne 157: | Ligne 162: | ||
====LAB #1 - Partitionnement de votre Disque avec fdisk==== | ====LAB #1 - Partitionnement de votre Disque avec fdisk==== | ||
- | Pour procéder au partitionnement de votre disque ou de vos disques, | + | Pour procéder au partitionnement de votre disque ou de vos disques, |
Lancez fdisk en fournissant en argument le fichier de référence de votre premier disque dur, par exemple : | Lancez fdisk en fournissant en argument le fichier de référence de votre premier disque dur, par exemple : | ||
Ligne 681: | Ligne 686: | ||
Afin de mettre en place le LVM, vous avez besoin du paquet **lvm2** et du paquet **device-mapper**. | Afin de mettre en place le LVM, vous avez besoin du paquet **lvm2** et du paquet **device-mapper**. | ||
- | Sous Debian | + | Sous Debian |
< | < | ||
Ligne 3664: | Ligne 3669: | ||
< | < | ||
- | root@debian11: | + | root@debian11: |
</ | </ | ||
Ligne 4326: | Ligne 4331: | ||
**NE PAS FAIRE** : Lors du démarrage de la machine virtuelle, le système vous demandera d' | **NE PAS FAIRE** : Lors du démarrage de la machine virtuelle, le système vous demandera d' | ||
</ | </ | ||
+ | |||
+ | =====RAID Logiciel===== | ||
+ | |||
+ | ====LAB #29 - Mise en Place du RAID 5 Logiciel==== | ||
+ | |||
+ | ===29.1 - Préparer le disque=== | ||
+ | |||
+ | Rappelez-vous avoir modifié les types de 4 partitions du disque **/ | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors | ||
+ | Disk model: QEMU HARDDISK | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disklabel type: dos | ||
+ | Disk identifier: 0xf2e3a71a | ||
+ | |||
+ | Device | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | |||
+ | Disk /dev/sdb: 64 GiB, 68719476736 bytes, 134217728 sectors | ||
+ | Disk model: QEMU HARDDISK | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | |||
+ | |||
+ | Disk /dev/sdc: 4 GiB, 4294967296 bytes, 8388608 sectors | ||
+ | Disk model: QEMU HARDDISK | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disklabel type: dos | ||
+ | Disk identifier: 0x304308a3 | ||
+ | |||
+ | Device | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | |||
+ | Disk / | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | |||
+ | |||
+ | Disk / | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | |||
+ | |||
+ | Disk / | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | </ | ||
+ | |||
+ | Dans le cas de cet exemple les quatre partitions concernées par la mise en place d'un RAID 5 sont : | ||
+ | |||
+ | < | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ===29.2 - Créer une Unité RAID=== | ||
+ | |||
+ | La création d'une unité RAID avec la commande **mdadm** se fait grâce aux options passées en arguments à la commande : | ||
+ | |||
+ | < | ||
+ | mdadm --create <unité RAID> [options] <unités physiques> | ||
+ | </ | ||
+ | |||
+ | Sous Debian 11, mdadm n'est pas installé par défaut : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | </ | ||
+ | |||
+ | Saisissez maintenant la commande suivante : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | mdadm: /dev/sdc8 appears to contain a reiserfs file system | ||
+ | size = 512000K | ||
+ | Continue creating array? y | ||
+ | mdadm: Defaulting to version 1.2 metadata | ||
+ | mdadm: array /dev/md1 started. | ||
+ | </ | ||
+ | |||
+ | Les options dans la ligne de commande sont : | ||
+ | |||
+ | ^ Option Courte ^ Option Longue ^ Description ^ | ||
+ | | -l | - -level | Le niveau RAID - **linear, 0,1,2,4 ou 5** | | ||
+ | | -n | - -raid-devices=< | ||
+ | |||
+ | Les options de la commande **mdadm** sont : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | Any parameter that does not start with ' | ||
+ | or, for --examine-bitmap, | ||
+ | The first such name is often the name of an md device. | ||
+ | names are often names of component devices. | ||
+ | |||
+ | Some common options are: | ||
+ | --help | ||
+ | mode specific help message | ||
+ | --help-options | ||
+ | --version | ||
+ | --verbose | ||
+ | --quiet | ||
+ | --brief | ||
+ | --export | ||
+ | | ||
+ | --force | ||
+ | |||
+ | --assemble | ||
+ | --build | ||
+ | --create | ||
+ | --detail | ||
+ | --examine | ||
+ | --examine-bitmap -X: Display the detail of a bitmap file | ||
+ | --examine-badblocks: | ||
+ | --monitor | ||
+ | --grow | ||
+ | --incremental -I : add/remove a single device to/from an array as appropriate | ||
+ | --query | ||
+ | | ||
+ | --auto-detect | ||
+ | </ | ||
+ | |||
+ | La commande **mdadm** utilise des sous-commandes ou //mode majeurs// : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | mdadm is used for building, managing, and monitoring | ||
+ | Linux md devices (aka RAID arrays) | ||
+ | Usage: mdadm --create device options... | ||
+ | Create a new array from unused devices. | ||
+ | mdadm --assemble device options... | ||
+ | Assemble a previously created array. | ||
+ | mdadm --build device options... | ||
+ | Create or assemble an array without metadata. | ||
+ | mdadm --manage device options... | ||
+ | make changes to an existing array. | ||
+ | mdadm --misc options... devices | ||
+ | report on or modify various md related devices. | ||
+ | mdadm --grow options device | ||
+ | resize/ | ||
+ | mdadm --incremental device | ||
+ | add/remove a device to/from an array as appropriate | ||
+ | mdadm --monitor options... | ||
+ | Monitor one or more array for significant changes. | ||
+ | mdadm device options... | ||
+ | Shorthand for --manage. | ||
+ | Any parameter that does not start with ' | ||
+ | or, for --examine-bitmap, | ||
+ | The first such name is often the name of an md device. | ||
+ | names are often names of component devices. | ||
+ | |||
+ | For detailed help on the above major modes use --help after the mode | ||
+ | e.g. | ||
+ | mdadm --assemble --help | ||
+ | For general help on options use | ||
+ | mdadm --help-options | ||
+ | </ | ||
+ | |||
+ | Chaque sous-commande bénéficie d'un aide spécifique, | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | Usage: | ||
+ | |||
+ | This usage will initialise a new md array, associate some | ||
+ | | ||
+ | array with some devices missing, use the special word ' | ||
+ | place of the relevant device name. | ||
+ | |||
+ | | ||
+ | raid superblocks or filesystems. | ||
+ | the variance in device size exceeds 1%. | ||
+ | If any discrepancy is found, the user will be prompted for confirmation | ||
+ | | ||
+ | | ||
+ | |||
+ | If the --size option is given then only that many kilobytes of each | ||
+ | | ||
+ | If no --size is given, the apparent size of the smallest drive given | ||
+ | is used for raid level 1 and greater, and the full device is used for | ||
+ | other levels. | ||
+ | |||
+ | | ||
+ | --bitmap= | ||
+ | : or an internal bitmap if ' | ||
+ | --chunk= | ||
+ | --rounding= | ||
+ | --level= | ||
+ | --parity= | ||
+ | --layout= | ||
+ | --raid-devices= | ||
+ | --spare-devices= | ||
+ | --size= | ||
+ | --data-offset= | ||
+ | : of array data. | ||
+ | --force | ||
+ | : insert a missing drive for RAID5. | ||
+ | --run -R : insist of running the array even if not all | ||
+ | : devices are present or some look odd. | ||
+ | --readonly | ||
+ | --name= | ||
+ | --bitmap-chunk= | ||
+ | --delay= | ||
+ | --write-journal= | ||
+ | --consistency-policy= : Specify the policy that determines how the array | ||
+ | -k : maintains consistency in case of unexpected shutdown. | ||
+ | </ | ||
+ | |||
+ | Les //modes majeurs// de la commande **mdadm** peuvent être visualisés grâce à la commande suivante : | ||
+ | |||
+ | < | ||
+ | root@debian8: | ||
+ | mdadm is used for building, managing, and monitoring | ||
+ | Linux md devices (aka RAID arrays) | ||
+ | Usage: mdadm --create device options... | ||
+ | Create a new array from unused devices. | ||
+ | mdadm --assemble device options... | ||
+ | Assemble a previously created array. | ||
+ | mdadm --build device options... | ||
+ | Create or assemble an array without metadata. | ||
+ | mdadm --manage device options... | ||
+ | make changes to an existing array. | ||
+ | mdadm --misc options... devices | ||
+ | report on or modify various md related devices. | ||
+ | mdadm --grow options device | ||
+ | resize/ | ||
+ | mdadm --incremental device | ||
+ | add/remove a device to/from an array as appropriate | ||
+ | mdadm --monitor options... | ||
+ | Monitor one or more array for significant changes. | ||
+ | mdadm device options... | ||
+ | Shorthand for --manage. | ||
+ | Any parameter that does not start with ' | ||
+ | or, for --examine-bitmap, | ||
+ | The first such name is often the name of an md device. | ||
+ | names are often names of component devices. | ||
+ | |||
+ | For detailed help on the above major modes use --help after the mode | ||
+ | e.g. | ||
+ | mdadm --assemble --help | ||
+ | For general help on options use | ||
+ | mdadm --help-options | ||
+ | </ | ||
+ | |||
+ | Constatez maintenant les informations concernant le RAID 5 créé : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | Personalities : [raid6] [raid5] [raid4] | ||
+ | md1 : active raid5 sdc10[3] sdc8[1] sdc5[0] | ||
+ | 1019904 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU] | ||
+ | | ||
+ | unused devices: < | ||
+ | </ | ||
+ | |||
+ | Grâce à la commande mdadm, il est possible d' | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | /dev/md1: 996.00MiB raid5 3 devices, 0 spares. Use mdadm --detail for more detail. | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | /dev/md1: | ||
+ | | ||
+ | | ||
+ | Raid Level : raid5 | ||
+ | Array Size : 1019904 (996.00 MiB 1044.38 MB) | ||
+ | Used Dev Size : 509952 (498.00 MiB 522.19 MB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 3 | ||
+ | | ||
+ | |||
+ | | ||
+ | State : clean | ||
+ | Active Devices : 3 | ||
+ | | ||
+ | Failed Devices : 0 | ||
+ | Spare Devices : 0 | ||
+ | |||
+ | Layout : left-symmetric | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | Consistency Policy : resync | ||
+ | |||
+ | Name : debian11: | ||
+ | UUID : c0f945a0: | ||
+ | Events : 18 | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Notez la ligne **Persistence : Superblock is persistent**. En effet, cette implémentation de RAID inscrit les caractéristiques du volume dans un //super bloc// persistant en début de chaque unité de type bloc dans le volume. | ||
+ | |||
+ | Cependant, il necéssaire de renseigner le fichier **/ | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | # mdadm.conf | ||
+ | # | ||
+ | # !NB! Run update-initramfs -u after updating this file. | ||
+ | # !NB! This will ensure that initramfs has an uptodate copy. | ||
+ | # | ||
+ | # Please refer to mdadm.conf(5) for information about this file. | ||
+ | # | ||
+ | |||
+ | # by default (built-in), scan all partitions (/ | ||
+ | # containers for MD superblocks. alternatively, | ||
+ | # wildcards if desired. | ||
+ | #DEVICE partitions containers | ||
+ | |||
+ | # automatically tag new arrays as belonging to the local system | ||
+ | HOMEHOST < | ||
+ | |||
+ | # instruct the monitoring daemon where to send mail alerts | ||
+ | MAILADDR root | ||
+ | |||
+ | # definitions of existing MD arrays | ||
+ | |||
+ | # This configuration was auto-generated on Sun, 01 May 2022 13:26:29 +0200 by mkconf | ||
+ | </ | ||
+ | |||
+ | Ecrasez le contenu de ce fichier avec les informations suivantes : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | root@debian11: | ||
+ | root@debian11: | ||
+ | DEVICE /dev/sdc5 /dev/sdc8 /dev/sdc10 | ||
+ | ARRAY /dev/md1 metadata=1.2 name=debian11: | ||
+ | </ | ||
+ | |||
+ | Mettez à jour l' | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | update-initramfs: | ||
+ | </ | ||
+ | |||
+ | Chaque unité peut être examinée individuellement : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | /dev/sdc5: | ||
+ | Magic : a92b4efc | ||
+ | Version : 1.2 | ||
+ | Feature Map : 0x0 | ||
+ | Array UUID : c0f945a0: | ||
+ | Name : debian11: | ||
+ | Creation Time : Sun May 1 13:27:48 2022 | ||
+ | Raid Level : raid5 | ||
+ | Raid Devices : 3 | ||
+ | |||
+ | Avail Dev Size : 1019904 (498.00 MiB 522.19 MB) | ||
+ | Array Size : 1019904 (996.00 MiB 1044.38 MB) | ||
+ | Data Offset : 4096 sectors | ||
+ | Super Offset : 8 sectors | ||
+ | | ||
+ | State : clean | ||
+ | Device UUID : 1d34dda2: | ||
+ | |||
+ | Update Time : Sun May 1 13:27:53 2022 | ||
+ | Bad Block Log : 512 entries available at offset 16 sectors | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | | ||
+ | Array State : AAA (' | ||
+ | </ | ||
+ | |||
+ | ===29.3 - Remplacer une Unité Défaillante=== | ||
+ | |||
+ | A ce stade il est intéressant de noter comment réagir lors d'une défaillance d'un disque. Dans notre cas nous allons indiquer au système que la partition /dev/sdc5 est devenue défaillante : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | mdadm: set /dev/sdc5 faulty in /dev/md1 | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | /dev/md1: | ||
+ | | ||
+ | | ||
+ | Raid Level : raid5 | ||
+ | Array Size : 1019904 (996.00 MiB 1044.38 MB) | ||
+ | Used Dev Size : 509952 (498.00 MiB 522.19 MB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 3 | ||
+ | | ||
+ | |||
+ | | ||
+ | State : clean, degraded | ||
+ | Active Devices : 2 | ||
+ | | ||
+ | Failed Devices : 1 | ||
+ | Spare Devices : 0 | ||
+ | |||
+ | Layout : left-symmetric | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | Consistency Policy : resync | ||
+ | |||
+ | Name : debian11: | ||
+ | UUID : c0f945a0: | ||
+ | Events : 20 | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | </ | ||
+ | |||
+ | Il est maintenant nécessaire de supprimer /dev/sdc5 de notre RAID 5 : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | mdadm: hot removed /dev/sdc5 from /dev/md1 | ||
+ | </ | ||
+ | |||
+ | A l' | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | /dev/md1: | ||
+ | | ||
+ | | ||
+ | Raid Level : raid5 | ||
+ | Array Size : 1019904 (996.00 MiB 1044.38 MB) | ||
+ | Used Dev Size : 509952 (498.00 MiB 522.19 MB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 2 | ||
+ | | ||
+ | |||
+ | | ||
+ | State : clean, degraded | ||
+ | Active Devices : 2 | ||
+ | | ||
+ | Failed Devices : 0 | ||
+ | Spare Devices : 0 | ||
+ | |||
+ | Layout : left-symmetric | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | Consistency Policy : resync | ||
+ | |||
+ | Name : debian11: | ||
+ | UUID : c0f945a0: | ||
+ | Events : 21 | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Constatez maintenant l' | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | Personalities : [raid6] [raid5] [raid4] | ||
+ | md1 : active raid5 sdc10[3] sdc8[1] | ||
+ | 1019904 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [_UU] | ||
+ | | ||
+ | unused devices: < | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **iMPORTANT** - Notez que le RAID a 2 unités au lieu de trois. | ||
+ | </ | ||
+ | |||
+ | Nous avons déjà utilisé **/ | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | |||
+ | root@debian11: | ||
+ | / | ||
+ | type: LUKS2 | ||
+ | cipher: | ||
+ | keysize: 512 bits | ||
+ | key location: keyring | ||
+ | device: | ||
+ | sector size: 512 | ||
+ | offset: | ||
+ | size: 991232 sectors | ||
+ | mode: read/write | ||
+ | </ | ||
+ | |||
+ | Avant de supprimer LUKs, il convient de supprimer la dernière passphrase : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | Enter passphrase to be deleted: fenestros123456789 | ||
+ | |||
+ | WARNING! | ||
+ | ======== | ||
+ | This is the last keyslot. Device will become unusable after purging this key. | ||
+ | |||
+ | Are you sure? (Type ' | ||
+ | </ | ||
+ | |||
+ | Supprimez maintenant LUKs : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | </ | ||
+ | |||
+ | Vérifiez de nouveau le statut : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | / | ||
+ | |||
+ | root@debian11: | ||
+ | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
+ | sda | ||
+ | ├─sda1 | ||
+ | ├─sda2 | ||
+ | └─sda5 | ||
+ | sdb | ||
+ | sdc | ||
+ | ├─sdc1 | ||
+ | ├─sdc2 | ||
+ | ├─sdc3 | ||
+ | ├─sdc4 | ||
+ | ├─sdc5 | ||
+ | ├─sdc6 | ||
+ | │ └─vg0-lv1 254:0 0 104M 0 lvm | ||
+ | ├─sdc7 | ||
+ | │ └─vg0-lv2 254:1 0 112M 0 lvm | ||
+ | ├─sdc8 | ||
+ | │ └─md1 | ||
+ | ├─sdc9 | ||
+ | │ └─vg0-lv2 254:1 0 112M 0 lvm | ||
+ | ├─sdc10 | ||
+ | │ └─md1 | ||
+ | ├─sdc11 | ||
+ | └─sdc12 | ||
+ | sr0 11:0 1 378M 0 rom | ||
+ | </ | ||
+ | |||
+ | Pour ajouter un autre disque à notre RAID afin de remplacer /dev/sdc5 il convient d' | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | mdadm: added /dev/sdc11 | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | /dev/md1: | ||
+ | | ||
+ | | ||
+ | Raid Level : raid5 | ||
+ | Array Size : 1019904 (996.00 MiB 1044.38 MB) | ||
+ | Used Dev Size : 509952 (498.00 MiB 522.19 MB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 3 | ||
+ | | ||
+ | |||
+ | | ||
+ | State : clean, degraded, recovering | ||
+ | Active Devices : 2 | ||
+ | | ||
+ | Failed Devices : 0 | ||
+ | Spare Devices : 1 | ||
+ | |||
+ | Layout : left-symmetric | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | Consistency Policy : resync | ||
+ | |||
+ | Rebuild Status : 56% complete | ||
+ | |||
+ | Name : debian11: | ||
+ | UUID : c0f945a0: | ||
+ | Events : 32 | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | root@debian11: | ||
+ | /dev/md1: | ||
+ | | ||
+ | | ||
+ | Raid Level : raid5 | ||
+ | Array Size : 1019904 (996.00 MiB 1044.38 MB) | ||
+ | Used Dev Size : 509952 (498.00 MiB 522.19 MB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 3 | ||
+ | | ||
+ | |||
+ | | ||
+ | State : clean | ||
+ | Active Devices : 3 | ||
+ | | ||
+ | Failed Devices : 0 | ||
+ | Spare Devices : 0 | ||
+ | |||
+ | Layout : left-symmetric | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | Consistency Policy : resync | ||
+ | |||
+ | Name : debian11: | ||
+ | UUID : c0f945a0: | ||
+ | Events : 40 | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Vérifiez la prise en compte de la configuration : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
+ | sda | ||
+ | ├─sda1 | ||
+ | ├─sda2 | ||
+ | └─sda5 | ||
+ | sdb | ||
+ | sdc | ||
+ | ├─sdc1 | ||
+ | ├─sdc2 | ||
+ | ├─sdc3 | ||
+ | ├─sdc4 | ||
+ | ├─sdc5 | ||
+ | ├─sdc6 | ||
+ | │ └─vg0-lv1 254:0 0 104M 0 lvm | ||
+ | ├─sdc7 | ||
+ | │ └─vg0-lv2 254:1 0 112M 0 lvm | ||
+ | ├─sdc8 | ||
+ | │ └─md1 | ||
+ | ├─sdc9 | ||
+ | │ └─vg0-lv2 254:1 0 112M 0 lvm | ||
+ | ├─sdc10 | ||
+ | │ └─md1 | ||
+ | ├─sdc11 | ||
+ | │ └─md1 | ||
+ | └─sdc12 | ||
+ | sr0 11:0 1 378M 0 rom | ||
+ | |||
+ | root@debian11: | ||
+ | Personalities : [raid6] [raid5] [raid4] | ||
+ | md1 : active raid5 sdc11[4] sdc10[3] sdc8[1] | ||
+ | 1019904 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU] | ||
+ | | ||
+ | unused devices: < | ||
+ | </ | ||
+ | |||
+ | Dernièrement, | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | root@debian11: | ||
+ | root@debian11: | ||
+ | DEVICE /dev/sdc11 /dev/sdc8 /dev/sdc10 | ||
+ | ARRAY /dev/md1 metadata=1.2 name=debian11: | ||
+ | </ | ||
+ | |||
+ | Mettez à jour l' | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | update-initramfs: | ||
+ | </ | ||
=====Le Swap===== | =====Le Swap===== | ||
Ligne 4460: | Ligne 5179: | ||
</ | </ | ||
- | ====LAB #29 - Créer un Fichier de Swap==== | + | ====LAB #30 - Créer un Fichier de Swap==== |
Sous Linux, vous pouvez aussi bien utiliser un fichier de swap qu'une partition. La mise en place de ce fichier est faite en utilisant la commande **dd**. | Sous Linux, vous pouvez aussi bien utiliser un fichier de swap qu'une partition. La mise en place de ce fichier est faite en utilisant la commande **dd**. | ||
Ligne 4502: | Ligne 5221: | ||
root@debian11: | root@debian11: | ||
- | root@debian11: | + | root@debian11: |
</ | </ | ||
Ligne 4511: | Ligne 5230: | ||
Filename | Filename | ||
/ | / | ||
- | /swap | + | /swap |
</ | </ | ||
Ligne 4535: | Ligne 5254: | ||
----- | ----- | ||
- | < | + | Copyright © 2024 Hugh Norris. |
- | <div align=" | + | |
- | Copyright © 2022 Hugh Norris.< | + | |
- | </ | + | |
- | </ | + | |
- | ----- | + |