Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| elearning:workbooks:lpic:21:450:l105 [2022/10/04 15:19] – admin | elearning:workbooks:lpic:21:450:l105 [2022/11/01 07:27] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ~~PDF: | ||
| - | |||
| - | Version - **2022.04** | ||
| - | |||
| - | Dernière mise-à-jour : ~~LASTMOD~~ | ||
| - | |||
| - | ======Topic 5: Advanced Storage Device Administration====== | ||
| - | |||
| ~~PDF: | ~~PDF: | ||
| Ligne 13: | Ligne 5: | ||
| Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
| - | ======Topic | + | ======Topic |
| - | + | ||
| - | =====Contenu du Module===== | + | |
| - | * **LCF504 - Gestion des Disques, des Systèmes de Fichiers et du Swap** | + | * **Topic 204: Advanced Storage Device Administration** |
| - | * Contenu du Module | + | |
| * Logical Volume Manager (LVM) | * Logical Volume Manager (LVM) | ||
| * LAB #1 - Volumes Logiques Linéaires | * LAB #1 - Volumes Logiques Linéaires | ||
| Ligne 31: | Ligne 20: | ||
| * LAB #7 - Volumes Logiques en Bandes | * LAB #7 - Volumes Logiques en Bandes | ||
| * LAB #8 - Gérer les Métadonnées | * LAB #8 - Gérer les Métadonnées | ||
| - | * Raid Logiciel | + | * RAID Logiciel |
| + | * Concepts RAID | ||
| + | * Disques en miroir | ||
| + | * Bandes de données | ||
| + | * Types de RAID | ||
| + | * RAID 0 - Concaténation | ||
| + | * RAID 0 - Striping | ||
| + | * RAID 1 - Miroir | ||
| + | * RAID 1+0 - Striping en Miroir | ||
| + | * RAID 2 - Miroir avec Contrôle d' | ||
| + | * RAID 3 et 4 - Striping avec Parité | ||
| + | * RAID 5 - Striping avec Parité Distribuée | ||
| + | * Au délà de RAID 5 | ||
| * LAB #9 - Mise en Place du RAID 5 Logiciel | * LAB #9 - Mise en Place du RAID 5 Logiciel | ||
| - | * Concepts RAID | + | * 9.1 - Préparer le disque |
| - | * Créer une Unité RAID | + | * 9.2 - Créer une Unité RAID |
| - | * Remplacer une Unité Défaillante | + | * 9.3 - Remplacer une Unité Défaillante |
| + | * LAB #10 - autofs | ||
| =====Logical Volume Manager (LVM)===== | =====Logical Volume Manager (LVM)===== | ||
| - | ====LAB #3 - Volumes Logiques Linéaires==== | + | ====LAB #1 - Volumes Logiques Linéaires==== |
| 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**. | ||
| - | Nous allons travailler sous RHEL/CentOS 8 avec les partitions suivantes | + | Sous Debian 11, installez le paquet lvm2 : |
| < | < | ||
| - | /dev/sdb6 1644544 2054143 | + | root@debian11: |
| - | /dev/sdb7 2056192 2670591 | + | </ |
| - | /dev/sdb9 3698688 4517887 | + | |
| + | Nous allons travailler avec les partitions suivantes : | ||
| + | |||
| + | < | ||
| + | /dev/sdc6 1644544 2054143 | ||
| + | /dev/sdc7 2056192 2670591 | ||
| + | /dev/sdc9 3698688 4517887 | ||
| </ | </ | ||
| Ligne 54: | Ligne 62: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgscan |
| - | Found volume group " | + | root@debian11: |
| </ | </ | ||
| Ligne 61: | Ligne 69: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgscan --help |
| vgscan - Search for all volume groups | vgscan - Search for all volume groups | ||
| vgscan | vgscan | ||
| - | [ --ignorelockingfailure ] | + | |
| - | [ --mknodes ] | + | [ --mknodes ] |
| - | [ --notifydbus ] | + | [ --notifydbus ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| - | | + | |
| - | Variables in option or position args are capitalized, | + | |
| - | e.g. PV, VG, LV, Size, Number, String, Tag. | + | |
| - | + | ||
| - | PV | + | |
| - | Physical Volume name, a device path under /dev. | + | |
| - | For commands managing physical extents, a PV positional arg | + | |
| - | generally accepts a suffix indicating a range (or multiple ranges) | + | |
| - | of PEs. When the first PE is omitted, it defaults to the start of | + | |
| - | the device, and when the last PE is omitted it defaults to the end. | + | |
| - | PV[:PE-PE]... is start and end range (inclusive), | + | |
| - | PV[: | + | |
| - | + | ||
| - | LV | + | |
| - | Logical Volume name. See lvm(8) for valid names. An LV positional | + | |
| - | arg generally includes the VG name and LV name, e.g. VG/LV. | + | |
| - | LV followed by _< | + | |
| - | required. (raid represents raid< | + | |
| - | The _new suffix indicates that the LV name is new. | + | |
| - | + | ||
| - | Tag | + | |
| - | Tag name. See lvm(8) for information about tag names and using | + | |
| - | tags in place of a VG, LV or PV. | + | |
| - | + | ||
| - | Select | + | |
| - | Select indicates that a required positional arg can be omitted | + | |
| - | if the --select option is used. No arg appears in this position. | + | |
| - | + | ||
| - | Size[UNIT] | + | |
| - | Size is an input number that accepts an optional unit. | + | |
| - | Input units are always treated as base two values, regardless of | + | |
| - | capitalization, | + | |
| - | The default input unit is specified by letter, followed by |UNIT. | + | |
| - | UNIT represents other possible input units: BbBsSkKmMgGtTpPeE. | + | |
| - | (This should not be confused with the output control --units, where | + | |
| - | capital letters mean multiple of 1000.) | + | |
| </ | </ | ||
| Ligne 130: | Ligne 103: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# pvcreate /dev/sdc6 /dev/sdc7 /dev/sdc9 |
| - | Physical volume "/dev/sdb6" successfully created. | + | Physical volume "/dev/sdc6" successfully created. |
| - | Physical volume "/dev/sdb7" successfully created. | + | Physical volume "/dev/sdc7" successfully created. |
| - | Physical volume "/dev/sdb9" successfully created. | + | Physical volume "/dev/sdc9" successfully created. |
| </ | </ | ||
| Ligne 139: | Ligne 112: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# pvcreate --help |
| pvcreate - Initialize physical volume(s) for use by LVM | pvcreate - Initialize physical volume(s) for use by LVM | ||
| pvcreate PV ... | pvcreate PV ... | ||
| - | [ -f|--force ] | + | |
| - | [ -M|--metadatatype lvm2 ] | + | [ -M|--metadatatype lvm2 ] |
| - | [ -u|--uuid String ] | + | [ -u|--uuid String ] |
| - | [ -Z|--zero y|n ] | + | [ -Z|--zero y|n ] |
| - | [ --dataalignment Size[k|UNIT] ] | + | [ --dataalignment Size[k|UNIT] ] |
| - | [ --dataalignmentoffset Size[k|UNIT] ] | + | [ --dataalignmentoffset Size[k|UNIT] ] |
| - | [ --bootloaderareasize Size[m|UNIT] ] | + | [ --bootloaderareasize Size[m|UNIT] ] |
| - | [ --labelsector Number ] | + | [ --labelsector Number ] |
| - | [ --pvmetadatacopies 0|1|2 ] | + | [ --pvmetadatacopies 0|1|2 ] |
| - | [ --metadatasize Size[m|UNIT] ] | + | [ --metadatasize Size[m|UNIT] ] |
| - | [ --metadataignore y|n ] | + | [ --metadataignore y|n ] |
| - | [ --norestorefile ] | + | [ --norestorefile ] |
| - | [ --setphysicalvolumesize Size[m|UNIT] ] | + | [ --setphysicalvolumesize Size[m|UNIT] ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ --restorefile String ] | + | [ --restorefile String ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| - | | + | |
| - | Variables in option or position args are capitalized, | + | |
| - | e.g. PV, VG, LV, Size, Number, String, Tag. | + | |
| - | + | ||
| - | PV | + | |
| - | Physical Volume name, a device path under /dev. | + | |
| - | For commands managing physical extents, a PV positional arg | + | |
| - | generally accepts a suffix indicating a range (or multiple ranges) | + | |
| - | of PEs. When the first PE is omitted, it defaults to the start of | + | |
| - | the device, and when the last PE is omitted it defaults to the end. | + | |
| - | PV[:PE-PE]... is start and end range (inclusive), | + | |
| - | PV[: | + | |
| - | + | ||
| - | LV | + | |
| - | Logical Volume name. See lvm(8) for valid names. An LV positional | + | |
| - | arg generally includes the VG name and LV name, e.g. VG/LV. | + | |
| - | LV followed by _< | + | |
| - | required. (raid represents raid< | + | |
| - | The _new suffix indicates that the LV name is new. | + | |
| - | + | ||
| - | Tag | + | |
| - | Tag name. See lvm(8) for information about tag names and using | + | |
| - | tags in place of a VG, LV or PV. | + | |
| - | + | ||
| - | Select | + | |
| - | Select indicates that a required positional arg can be omitted | + | |
| - | if the --select option is used. No arg appears in this position. | + | |
| - | + | ||
| - | Size[UNIT] | + | |
| - | Size is an input number that accepts an optional unit. | + | |
| - | Input units are always treated as base two values, regardless of | + | |
| - | capitalization, | + | |
| - | The default input unit is specified by letter, followed by |UNIT. | + | |
| - | UNIT represents other possible input units: BbBsSkKmMgGtTpPeE. | + | |
| - | (This should not be confused with the output control --units, where | + | |
| - | capital letters mean multiple of 1000.) | + | |
| </ | </ | ||
| Ligne 217: | Ligne 155: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# pvdisplay /dev/sdc6 /dev/sdc7 /dev/sdc9 |
| - | "/dev/sdb6" is a new physical volume of " | + | "/dev/sdc6" is a new physical volume of " |
| --- NEW Physical volume --- | --- NEW Physical volume --- | ||
| - | PV Name /dev/sdb6 | + | PV Name /dev/sdc6 |
| VG Name | VG Name | ||
| PV Size | PV Size | ||
| Ligne 228: | Ligne 166: | ||
| Free PE 0 | Free PE 0 | ||
| Allocated PE 0 | Allocated PE 0 | ||
| - | PV UUID xsAjLA-sUEU-dexm-H7G1-Dsi4-q6qW-8Tqkay | + | PV UUID 2Nmw8z-bVaE-Y1AJ-NjgJ-iS4U-x3i7-Anjofh |
| - | "/dev/sdb7" is a new physical volume of " | + | "/dev/sdc7" is a new physical volume of " |
| --- NEW Physical volume --- | --- NEW Physical volume --- | ||
| - | PV Name /dev/sdb7 | + | PV Name /dev/sdc7 |
| VG Name | VG Name | ||
| PV Size | PV Size | ||
| Ligne 240: | Ligne 178: | ||
| Free PE 0 | Free PE 0 | ||
| Allocated PE 0 | Allocated PE 0 | ||
| - | PV UUID WpssK3-sThn-3nS0-80O3-NcW3-23e0-gxejn4 | + | PV UUID VARemm-RCo9-qP7f-0gGP-I6Ym-b494-RXfNjC |
| - | "/dev/sdb9" is a new physical volume of " | + | "/dev/sdc9" is a new physical volume of " |
| --- NEW Physical volume --- | --- NEW Physical volume --- | ||
| - | PV Name /dev/sdb9 | + | PV Name /dev/sdc9 |
| VG Name | VG Name | ||
| PV Size | PV Size | ||
| Ligne 252: | Ligne 190: | ||
| Free PE 0 | Free PE 0 | ||
| Allocated PE 0 | Allocated PE 0 | ||
| - | PV UUID rqaB99-3UdD-pJxE-Z1Eo-h9yv-tZ41-r4UJSY | + | PV UUID Q3Vqjd-rGf1-2Ovs-SOAn-0gY2-eGKr-qmyCY2 |
| </ | </ | ||
| Ligne 258: | Ligne 196: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# pvdisplay --help |
| pvdisplay - Display various attributes of physical volume(s) | pvdisplay - Display various attributes of physical volume(s) | ||
| pvdisplay | pvdisplay | ||
| - | [ -a|--all ] | + | |
| - | [ -c|--colon ] | + | [ -c|--colon ] |
| - | [ -C|--columns ] | + | [ -C|--columns ] |
| - | [ -m|--maps ] | + | [ -m|--maps ] |
| - | [ -o|--options String ] | + | [ -o|--options String ] |
| - | [ -S|--select String ] | + | [ -S|--select String ] |
| - | [ -s|--short ] | + | [ -s|--short ] |
| - | [ -O|--sort String ] | + | [ -O|--sort String ] |
| - | [ --aligned ] | + | [ --aligned ] |
| - | [ --binary ] | + | [ --binary ] |
| - | [ --configreport log|vg|lv|pv|pvseg|seg ] | + | [ --configreport log|vg|lv|pv|pvseg|seg ] |
| - | [ --foreign ] | + | [ --foreign ] |
| - | [ --ignorelockingfailure ] | + | [ --ignorelockingfailure ] |
| - | [ --logonly ] | + | [ --logonly ] |
| - | [ --noheadings ] | + | [ --noheadings ] |
| - | [ --nosuffix ] | + | [ --nosuffix ] |
| - | [ --readonly ] | + | [ --readonly ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ --separator String ] | + | [ --separator String ] |
| - | [ --shared ] | + | [ --shared ] |
| - | [ --unbuffered ] | + | [ --unbuffered ] |
| - | [ --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ] | + | [ --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV|Tag ... ] | + | [ PV|Tag ... ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| - | | + | |
| - | Variables in option or position args are capitalized, | + | |
| - | e.g. PV, VG, LV, Size, Number, String, Tag. | + | |
| - | + | ||
| - | PV | + | |
| - | Physical Volume name, a device path under /dev. | + | |
| - | For commands managing physical extents, a PV positional arg | + | |
| - | generally accepts a suffix indicating a range (or multiple ranges) | + | |
| - | of PEs. When the first PE is omitted, it defaults to the start of | + | |
| - | the device, and when the last PE is omitted it defaults to the end. | + | |
| - | PV[:PE-PE]... is start and end range (inclusive), | + | |
| - | PV[: | + | |
| - | + | ||
| - | LV | + | |
| - | Logical Volume name. See lvm(8) for valid names. An LV positional | + | |
| - | arg generally includes the VG name and LV name, e.g. VG/LV. | + | |
| - | LV followed by _< | + | |
| - | required. (raid represents raid< | + | |
| - | The _new suffix indicates that the LV name is new. | + | |
| - | + | ||
| - | Tag | + | |
| - | Tag name. See lvm(8) for information about tag names and using | + | |
| - | tags in place of a VG, LV or PV. | + | |
| - | + | ||
| - | Select | + | |
| - | Select indicates that a required positional arg can be omitted | + | |
| - | if the --select option is used. No arg appears in this position. | + | |
| - | + | ||
| - | Size[UNIT] | + | |
| - | Size is an input number that accepts an optional unit. | + | |
| - | Input units are always treated as base two values, regardless of | + | |
| - | capitalization, | + | |
| - | The default input unit is specified by letter, followed by |UNIT. | + | |
| - | UNIT represents other possible input units: BbBsSkKmMgGtTpPeE. | + | |
| - | (This should not be confused with the output control --units, where | + | |
| - | capital letters mean multiple of 1000.) | + | |
| </ | </ | ||
| Ligne 346: | Ligne 249: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgcreate -s 8M vg0 /dev/sdc6 /dev/sdc7 /dev/sdc9 |
| Volume group " | Volume group " | ||
| </ | </ | ||
| Ligne 353: | Ligne 256: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgcreate --help |
| vgcreate - Create a volume group | vgcreate - Create a volume group | ||
| vgcreate VG_new PV ... | vgcreate VG_new PV ... | ||
| - | [ -A|--autobackup y|n ] | + | |
| - | [ -c|--clustered y|n ] | + | [ -c|--clustered y|n ] |
| - | [ -l|--maxlogicalvolumes Number ] | + | [ -l|--maxlogicalvolumes Number ] |
| - | [ -p|--maxphysicalvolumes Number ] | + | [ -p|--maxphysicalvolumes Number ] |
| - | [ -M|--metadatatype lvm2 ] | + | [ -M|--metadatatype lvm2 ] |
| - | [ -s|--physicalextentsize Size[m|UNIT] ] | + | [ -s|--physicalextentsize Size[m|UNIT] ] |
| - | [ -f|--force ] | + | [ -f|--force ] |
| - | [ -Z|--zero y|n ] | + | [ -Z|--zero y|n ] |
| - | [ --addtag Tag ] | + | [ --addtag Tag ] |
| - | [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit ] | + | [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit ] |
| - | [ --metadataprofile String ] | + | [ --metadataprofile String ] |
| - | [ --labelsector Number ] | + | [ --labelsector Number ] |
| - | [ --metadatasize Size[m|UNIT] ] | + | [ --metadatasize Size[m|UNIT] ] |
| - | [ --pvmetadatacopies 0|1|2 ] | + | [ --pvmetadatacopies 0|1|2 ] |
| - | [ --vgmetadatacopies all|unmanaged|Number ] | + | [ --vgmetadatacopies all|unmanaged|Number ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ --dataalignment Size[k|UNIT] ] | + | [ --dataalignment Size[k|UNIT] ] |
| - | [ --dataalignmentoffset Size[k|UNIT] ] | + | [ --dataalignmentoffset Size[k|UNIT] ] |
| - | [ --shared ] | + | [ --shared ] |
| - | [ --systemid String ] | + | [ --systemid String ] |
| - | [ --locktype sanlock|dlm|none ] | + | [ --locktype sanlock|dlm|none ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| Use --longhelp to show all options and advanced commands. | Use --longhelp to show all options and advanced commands. | ||
| Ligne 402: | Ligne 305: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgdisplay vg0 |
| --- Volume group --- | --- Volume group --- | ||
| VG Name vg0 | VG Name vg0 | ||
| Ligne 422: | Ligne 325: | ||
| Alloc PE / Size 0 / 0 | Alloc PE / Size 0 / 0 | ||
| Free PE / Size 110 / 880.00 MiB | Free PE / Size 110 / 880.00 MiB | ||
| - | VG UUID 6cO8IX-xhvn-5J4z-Em2t-7RAq-u3y8-1cVZln | + | VG UUID d7zxKd-eVpl-Zrp1-sN0e-HbyL-zjIV-2xpDua |
| </ | </ | ||
| Ligne 428: | Ligne 331: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgdisplay --help |
| vgdisplay - Display volume group information | vgdisplay - Display volume group information | ||
| vgdisplay | vgdisplay | ||
| - | [ -A|--activevolumegroups ] | + | |
| - | [ -c|--colon ] | + | [ -c|--colon ] |
| - | [ -C|--columns ] | + | [ -C|--columns ] |
| - | [ -o|--options String ] | + | [ -o|--options String ] |
| - | [ -S|--select String ] | + | [ -S|--select String ] |
| - | [ -s|--short ] | + | [ -s|--short ] |
| - | [ -O|--sort String ] | + | [ -O|--sort String ] |
| - | [ --aligned ] | + | [ --aligned ] |
| - | [ --binary ] | + | [ --binary ] |
| - | [ --configreport log|vg|lv|pv|pvseg|seg ] | + | [ --configreport log|vg|lv|pv|pvseg|seg ] |
| - | [ --foreign ] | + | [ --foreign ] |
| - | [ --ignorelockingfailure ] | + | [ --ignorelockingfailure ] |
| - | [ --logonly ] | + | [ --logonly ] |
| - | [ --noheadings ] | + | [ --noheadings ] |
| - | [ --nosuffix ] | + | [ --nosuffix ] |
| - | [ --readonly ] | + | [ --readonly ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ --shared ] | + | [ --shared ] |
| - | [ --separator String ] | + | [ --separator String ] |
| - | [ --unbuffered ] | + | [ --unbuffered ] |
| - | [ --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ] | + | [ --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ VG|Tag ... ] | + | [ VG|Tag ... ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| Use --longhelp to show all options and advanced commands. | Use --longhelp to show all options and advanced commands. | ||
| Ligne 480: | Ligne 383: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvcreate -L 350 -n lv0 vg0 |
| Rounding up size to full physical extent 352.00 MiB | Rounding up size to full physical extent 352.00 MiB | ||
| Logical volume " | Logical volume " | ||
| </ | </ | ||
| - | <WRAP center round important | + | <WRAP center round important> |
| - | **Important** -Notez que la taille du LV est un multiple du PE. | + | Notez que la taille du LV est un multiple du PE. |
| </ | </ | ||
| Ligne 492: | Ligne 395: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvcreate --help |
| lvcreate - Create a logical volume | lvcreate - Create a logical volume | ||
| Create a linear LV. | Create a linear LV. | ||
| lvcreate -L|--size Size[m|UNIT] VG | lvcreate -L|--size Size[m|UNIT] VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ --type linear ] | + | [ --type linear ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a striped LV (infers --type striped). | Create a striped LV (infers --type striped). | ||
| lvcreate -i|--stripes Number -L|--size Size[m|UNIT] VG | lvcreate -i|--stripes Number -L|--size Size[m|UNIT] VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a raid1 or mirror LV (infers --type raid1|mirror). | Create a raid1 or mirror LV (infers --type raid1|mirror). | ||
| lvcreate -m|--mirrors Number -L|--size Size[m|UNIT] VG | lvcreate -m|--mirrors Number -L|--size Size[m|UNIT] VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -R|--regionsize Size[m|UNIT] ] | + | [ -R|--regionsize Size[m|UNIT] ] |
| - | [ --mirrorlog core|disk ] | + | [ --mirrorlog core|disk ] |
| - | [ --minrecoveryrate Size[k|UNIT] ] | + | [ --minrecoveryrate Size[k|UNIT] ] |
| - | [ --maxrecoveryrate Size[k|UNIT] ] | + | [ --maxrecoveryrate Size[k|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a raid LV (a specific raid level must be used, e.g. raid1). | Create a raid LV (a specific raid level must be used, e.g. raid1). | ||
| lvcreate --type raid -L|--size Size[m|UNIT] VG | lvcreate --type raid -L|--size Size[m|UNIT] VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -m|--mirrors Number ] | + | [ -m|--mirrors Number ] |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ -R|--regionsize Size[m|UNIT] ] | + | [ -R|--regionsize Size[m|UNIT] ] |
| - | [ --minrecoveryrate Size[k|UNIT] ] | + | [ --minrecoveryrate Size[k|UNIT] ] |
| - | [ --maxrecoveryrate Size[k|UNIT] ] | + | [ --maxrecoveryrate Size[k|UNIT] ] |
| - | [ --raidintegrity y|n ] | + | [ --raidintegrity y|n ] |
| - | [ --raidintegritymode String ] | + | [ --raidintegritymode String ] |
| - | [ --raidintegrityblocksize Number ] | + | [ --raidintegrityblocksize Number ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a raid10 LV. | Create a raid10 LV. | ||
| lvcreate -m|--mirrors Number -i|--stripes Number -L|--size Size[m|UNIT] VG | lvcreate -m|--mirrors Number -i|--stripes Number -L|--size Size[m|UNIT] VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ -R|--regionsize Size[m|UNIT] ] | + | [ -R|--regionsize Size[m|UNIT] ] |
| - | [ --minrecoveryrate Size[k|UNIT] ] | + | [ --minrecoveryrate Size[k|UNIT] ] |
| - | [ --maxrecoveryrate Size[k|UNIT] ] | + | [ --maxrecoveryrate Size[k|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a COW snapshot LV of an origin LV. | Create a COW snapshot LV of an origin LV. | ||
| lvcreate -s|--snapshot -L|--size Size[m|UNIT] LV | lvcreate -s|--snapshot -L|--size Size[m|UNIT] LV | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ --type snapshot ] | + | [ --type snapshot ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a thin pool. | Create a thin pool. | ||
| lvcreate --type thin-pool -L|--size Size[m|UNIT] VG | lvcreate --type thin-pool -L|--size Size[m|UNIT] VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ --thinpool LV_new ] | + | [ --thinpool LV_new ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ --discards passdown|nopassdown|ignore ] | + | [ --discards passdown|nopassdown|ignore ] |
| - | [ --errorwhenfull y|n ] | + | [ --errorwhenfull y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a cache pool. | Create a cache pool. | ||
| lvcreate --type cache-pool -L|--size Size[m|UNIT] VG | lvcreate --type cache-pool -L|--size Size[m|UNIT] VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -H|--cache ] | + | [ -H|--cache ] |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ --cachemode writethrough|writeback|passthrough ] | + | [ --cachemode writethrough|writeback|passthrough ] |
| - | [ --cachepolicy String ] | + | [ --cachepolicy String ] |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ --cachemetadataformat auto|1|2 ] | + | [ --cachemetadataformat auto|1|2 ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a thin LV in a thin pool (infers --type thin). | Create a thin LV in a thin pool (infers --type thin). | ||
| lvcreate -V|--virtualsize Size[m|UNIT] --thinpool LV_thinpool VG | lvcreate -V|--virtualsize Size[m|UNIT] --thinpool LV_thinpool VG | ||
| - | [ -T|--thin ] | + | |
| - | [ --type thin ] | + | [ --type thin ] |
| - | [ --discards passdown|nopassdown|ignore ] | + | [ --discards passdown|nopassdown|ignore ] |
| - | [ --errorwhenfull y|n ] | + | [ --errorwhenfull y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Create a thin LV that is a snapshot of an existing thin LV | Create a thin LV that is a snapshot of an existing thin LV | ||
| (infers --type thin). | (infers --type thin). | ||
| lvcreate -s|--snapshot LV_thin | lvcreate -s|--snapshot LV_thin | ||
| - | [ --type thin ] | + | |
| - | [ --discards passdown|nopassdown|ignore ] | + | [ --discards passdown|nopassdown|ignore ] |
| - | [ --errorwhenfull y|n ] | + | [ --errorwhenfull y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Create a thin LV that is a snapshot of an external origin LV. | Create a thin LV that is a snapshot of an external origin LV. | ||
| lvcreate --type thin --thinpool LV_thinpool LV | lvcreate --type thin --thinpool LV_thinpool LV | ||
| - | [ -T|--thin ] | + | |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ --discards passdown|nopassdown|ignore ] | + | [ --discards passdown|nopassdown|ignore ] |
| - | [ --errorwhenfull y|n ] | + | [ --errorwhenfull y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Create a LV that returns VDO when used. | Create a LV that returns VDO when used. | ||
| lvcreate --type vdo -L|--size Size[m|UNIT] VG | lvcreate --type vdo -L|--size Size[m|UNIT] VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -V|--virtualsize Size[m|UNIT] ] | + | [ -V|--virtualsize Size[m|UNIT] ] |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ --vdo ] | + | [ --vdo ] |
| - | [ --vdopool LV_new ] | + | [ --vdopool LV_new ] |
| - | [ --compression y|n ] | + | [ --compression y|n ] |
| - | [ --deduplication y|n ] | + | [ --deduplication y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a thin LV, first creating a thin pool for it, | Create a thin LV, first creating a thin pool for it, | ||
| where the new thin pool is named by the --thinpool arg. | where the new thin pool is named by the --thinpool arg. | ||
| lvcreate --type thin -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT] --thinpool LV_new | lvcreate --type thin -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT] --thinpool LV_new | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -T|--thin ] | + | [ -T|--thin ] |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ --discards passdown|nopassdown|ignore ] | + | [ --discards passdown|nopassdown|ignore ] |
| - | [ --errorwhenfull y|n ] | + | [ --errorwhenfull y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a new LV, then attach the specified cachepool | Create a new LV, then attach the specified cachepool | ||
| which converts the new LV to type cache. | which converts the new LV to type cache. | ||
| lvcreate --type cache -L|--size Size[m|UNIT] --cachepool LV_cachepool VG | lvcreate --type cache -L|--size Size[m|UNIT] --cachepool LV_cachepool VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -H|--cache ] | + | [ -H|--cache ] |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ --cachemode writethrough|writeback|passthrough ] | + | [ --cachemode writethrough|writeback|passthrough ] |
| - | [ --cachepolicy String ] | + | [ --cachepolicy String ] |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ --cachemetadataformat auto|1|2 ] | + | [ --cachemetadataformat auto|1|2 ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a new LV, then attach the specified cachevol | Create a new LV, then attach the specified cachevol | ||
| which converts the new LV to type cache. | which converts the new LV to type cache. | ||
| lvcreate --type cache -L|--size Size[m|UNIT] --cachevol LV VG | lvcreate --type cache -L|--size Size[m|UNIT] --cachevol LV VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ --cachemode writethrough|writeback|passthrough ] | + | [ --cachemode writethrough|writeback|passthrough ] |
| - | [ --cachepolicy String ] | + | [ --cachepolicy String ] |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ --cachemetadataformat auto|1|2 ] | + | [ --cachemetadataformat auto|1|2 ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a new LV, then attach a cachevol created from | Create a new LV, then attach a cachevol created from | ||
| Ligne 671: | Ligne 574: | ||
| new LV to type cache. | new LV to type cache. | ||
| lvcreate --type cache -L|--size Size[m|UNIT] --cachedevice PV VG | lvcreate --type cache -L|--size Size[m|UNIT] --cachedevice PV VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ --cachemode writethrough|writeback|passthrough ] | + | [ --cachemode writethrough|writeback|passthrough ] |
| - | [ --cachepolicy String ] | + | [ --cachepolicy String ] |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ --cachemetadataformat auto|1|2 ] | + | [ --cachemetadataformat auto|1|2 ] |
| - | [ --cachesize Size[m|UNIT] ] | + | [ --cachesize Size[m|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a new LV, then attach the specified cachevol | Create a new LV, then attach the specified cachevol | ||
| which converts the new LV to type writecache. | which converts the new LV to type writecache. | ||
| lvcreate --type writecache -L|--size Size[m|UNIT] --cachevol LV VG | lvcreate --type writecache -L|--size Size[m|UNIT] --cachevol LV VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Create a new LV, then attach a cachevol created from | Create a new LV, then attach a cachevol created from | ||
| Ligne 697: | Ligne 600: | ||
| new LV to type writecache. | new LV to type writecache. | ||
| lvcreate --type writecache -L|--size Size[m|UNIT] --cachedevice PV VG | lvcreate --type writecache -L|--size Size[m|UNIT] --cachedevice PV VG | ||
| - | [ -l|--extents Number[PERCENT] ] | + | |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ --cachesize Size[m|UNIT] ] | + | [ --cachesize Size[m|UNIT] ] |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Common options for command: | Common options for command: | ||
| - | [ -a|--activate y|n|ay ] | + | |
| - | [ -A|--autobackup y|n ] | + | [ -A|--autobackup y|n ] |
| - | [ -C|--contiguous y|n ] | + | [ -C|--contiguous y|n ] |
| - | [ -M|--persistent y|n ] | + | [ -M|--persistent y|n ] |
| - | [ -j|--major Number ] | + | [ -j|--major Number ] |
| - | [ -k|--setactivationskip y|n ] | + | [ -k|--setactivationskip y|n ] |
| - | [ -K|--ignoreactivationskip ] | + | [ -K|--ignoreactivationskip ] |
| - | [ -n|--name String ] | + | [ -n|--name String ] |
| - | [ -p|--permission rw|r ] | + | [ -p|--permission rw|r ] |
| - | [ -r|--readahead auto|none|Number ] | + | [ -r|--readahead auto|none|Number ] |
| - | [ -W|--wipesignatures y|n ] | + | [ -W|--wipesignatures y|n ] |
| - | [ -Z|--zero y|n ] | + | [ -Z|--zero y|n ] |
| - | [ --addtag Tag ] | + | [ --addtag Tag ] |
| - | [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit ] | + | [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit ] |
| - | [ --ignoremonitoring ] | + | [ --ignoremonitoring ] |
| - | [ --metadataprofile String ] | + | [ --metadataprofile String ] |
| - | [ --minor Number ] | + | [ --minor Number ] |
| - | [ --monitor y|n ] | + | [ --monitor y|n ] |
| - | [ --nosync ] | + | [ --nosync ] |
| - | [ --noudevsync ] | + | [ --noudevsync ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| Use --longhelp to show all options and advanced commands. | Use --longhelp to show all options and advanced commands. | ||
| Ligne 750: | Ligne 653: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# mkdir /mnt/lvm |
| </ | </ | ||
| Ligne 756: | Ligne 659: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# mke2fs -j / |
| - | mke2fs 1.45.6 (20-Mar-2020) | + | mke2fs 1.46.2 (28-Feb-2021) |
| + | Discarding device blocks: done | ||
| Creating filesystem with 360448 1k blocks and 90112 inodes | Creating filesystem with 360448 1k blocks and 90112 inodes | ||
| - | Filesystem UUID: 87b6d526-d379-4e0c-8984-94811f1cee33 | + | Filesystem UUID: f6c32097-8d4b-4e65-8880-4b733350193a |
| Superblock backups stored on blocks: | Superblock backups stored on blocks: | ||
| - | 8193, 24577, 40961, 57345, 73729, 204801, 221185 | + | |
| Allocating group tables: done | Allocating group tables: done | ||
| Writing inode tables: done | Writing inode tables: done | ||
| Creating journal (8192 blocks): done | Creating journal (8192 blocks): done | ||
| - | Writing superblocks and filesystem accounting information: | + | Writing superblocks and filesystem accounting information: |
| </ | </ | ||
| Ligne 772: | Ligne 676: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# mount -t ext3 / |
| </ | </ | ||
| - | Vous allez maintenant copier le contenu | + | Vous allez maintenant copier le contenu |
| - | Saisissez donc la commande | + | Saisissez donc la commande |
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# cp -a /home /mnt/lvm |
| </ | </ | ||
| Ligne 786: | Ligne 690: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# ls -l /mnt/lvm |
| - | total 14 | + | total 13 |
| - | drwxr-xr-x. 5 root root 1024 Apr 20 14:35 home | + | drwxr-xr-x |
| - | drwx------. 2 root root 12288 May 26 17:00 lost+found | + | drwx------ 2 root root 12288 Apr 26 15:44 lost+found |
| </ | </ | ||
| Ligne 795: | Ligne 699: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# df -h /mnt/lvm |
| Filesystem | Filesystem | ||
| - | / | + | / |
| </ | </ | ||
| - | Dans la cas de notre exemple, la taille est de **333 Mo** avec **17 Mo** occupé. | + | Dans la cas de notre exemple, la taille est de **331 Mo** avec **1,2 Mo** occupé. |
| - | ====LAB #4 - Etendre un Volume Logique à Chaud==== | + | ====LAB #2 - Etendre un Volume Logique à Chaud==== |
| Pour agrandir un volume logique, le paquet **lvm2** contient les commandes **lvextend** et **resize2fs** : | Pour agrandir un volume logique, le paquet **lvm2** contient les commandes **lvextend** et **resize2fs** : | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvextend -L +100M / |
| Rounding size to boundary between physical extents: 104.00 MiB. | Rounding size to boundary between physical extents: 104.00 MiB. | ||
| Size of logical volume vg0/lv0 changed from 352.00 MiB (44 extents) to 456.00 MiB (57 extents). | Size of logical volume vg0/lv0 changed from 352.00 MiB (44 extents) to 456.00 MiB (57 extents). | ||
| Ligne 813: | Ligne 717: | ||
| </ | </ | ||
| - | <WRAP center round important | + | <WRAP center round important> |
| **Important** - Notez que l' | **Important** - Notez que l' | ||
| </ | </ | ||
| Ligne 820: | Ligne 724: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvextend --help |
| lvextend - Add space to a logical volume | lvextend - Add space to a logical volume | ||
| Extend an LV by a specified size. | Extend an LV by a specified size. | ||
| lvextend -L|--size [+]Size[m|UNIT] LV | lvextend -L|--size [+]Size[m|UNIT] LV | ||
| - | [ -l|--extents [+]Number[PERCENT] ] | + | |
| - | [ -r|--resizefs ] | + | [ -r|--resizefs ] |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ --poolmetadatasize [+]Size[m|UNIT] ] | + | [ --poolmetadatasize [+]Size[m|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Extend an LV by specified PV extents. | Extend an LV by specified PV extents. | ||
| lvextend LV PV ... | lvextend LV PV ... | ||
| - | [ -r|--resizefs ] | + | |
| - | [ -i|--stripes Number ] | + | [ -i|--stripes Number ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Extend a pool metadata SubLV by a specified size. | Extend a pool metadata SubLV by a specified size. | ||
| lvextend --poolmetadatasize [+]Size[m|UNIT] LV_thinpool | lvextend --poolmetadatasize [+]Size[m|UNIT] LV_thinpool | ||
| - | [ -i|--stripes Number ] | + | |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Extend an LV according to a predefined policy. | Extend an LV according to a predefined policy. | ||
| lvextend --usepolicies LV_snapshot_thinpool | lvextend --usepolicies LV_snapshot_thinpool | ||
| - | [ -r|--resizefs ] | + | |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Common options for command: | Common options for command: | ||
| - | [ -A|--autobackup y|n ] | + | |
| - | [ -f|--force ] | + | [ -f|--force ] |
| - | [ -m|--mirrors Number ] | + | [ -m|--mirrors Number ] |
| - | [ -n|--nofsck ] | + | [ -n|--nofsck ] |
| - | [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit ] | + | [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit ] |
| - | [ --nosync ] | + | [ --nosync ] |
| - | [ --noudevsync ] | + | [ --noudevsync ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ --type linear|striped|snapshot|mirror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool ] | + | [ --type linear|striped|snapshot|mirror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| Use --longhelp to show all options and advanced commands. | Use --longhelp to show all options and advanced commands. | ||
| Ligne 886: | Ligne 790: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# df -h /mnt/lvm |
| - | resize2fs 1.45.6 (20-Mar-2020) | + | Filesystem |
| + | / | ||
| + | root@debian11: | ||
| + | resize2fs 1.46.2 (28-Feb-2021) | ||
| Filesystem at / | Filesystem at / | ||
| old_desc_blocks = 2, new_desc_blocks = 2 | old_desc_blocks = 2, new_desc_blocks = 2 | ||
| Ligne 896: | Ligne 803: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# df -h /mnt/lvm |
| Filesystem | Filesystem | ||
| - | / | + | / |
| </ | </ | ||
| Vous noterez que la taille a augmentée mais que les données sont toujours présentes. | Vous noterez que la taille a augmentée mais que les données sont toujours présentes. | ||
| - | ====LAB #5 - Snapshots==== | + | ====LAB #3 - Snapshots==== |
| Un snapshot est un instantané d'un système de fichiers. Dans cet exemple, vous allez créer un snapshot de votre lv0 : | Un snapshot est un instantané d'un système de fichiers. Dans cet exemple, vous allez créer un snapshot de votre lv0 : | ||
| Ligne 910: | Ligne 817: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# dd if=/ |
| 10+0 records in | 10+0 records in | ||
| 10+0 records out | 10+0 records out | ||
| - | 10485760 bytes (10 MB, 10 MiB) copied, 0.0281282 | + | 10485760 bytes (10 MB, 10 MiB) copied, 0.023862 |
| </ | </ | ||
| Ligne 919: | Ligne 826: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvcreate -s -L 20M -n testsnap / |
| Rounding up size to full physical extent 24.00 MiB | Rounding up size to full physical extent 24.00 MiB | ||
| Logical volume " | Logical volume " | ||
| Ligne 927: | Ligne 834: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvs |
| - | LV | + | LV |
| - | root | + | lv0 vg0 owi-aos--- 456.00m |
| - | swap | + | testsnap vg0 swi-a-s--- |
| - | lv0 vg0 owi-aos--- 456.00m | + | |
| - | testsnap vg0 swi-a-s--- | + | |
| </ | </ | ||
| - | <WRAP center round important | + | <WRAP center round important> |
| **Important** - Notez que le snapshot est créé dans le même VG que le LV d' | **Important** - Notez que le snapshot est créé dans le même VG que le LV d' | ||
| </ | </ | ||
| Ligne 942: | Ligne 847: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvs --help |
| lvs - Display information about logical volumes | lvs - Display information about logical volumes | ||
| lvs | lvs | ||
| - | [ -H|--history ] | + | |
| - | [ -a|--all ] | + | [ -a|--all ] |
| - | [ -o|--options String ] | + | [ -o|--options String ] |
| - | [ -S|--select String ] | + | [ -S|--select String ] |
| - | [ -O|--sort String ] | + | [ -O|--sort String ] |
| - | [ --segments ] | + | [ --segments ] |
| - | [ --aligned ] | + | [ --aligned ] |
| - | [ --binary ] | + | [ --binary ] |
| - | [ --configreport log|vg|lv|pv|pvseg|seg ] | + | [ --configreport log|vg|lv|pv|pvseg|seg ] |
| - | [ --foreign ] | + | [ --foreign ] |
| - | [ --ignorelockingfailure ] | + | [ --ignorelockingfailure ] |
| - | [ --logonly ] | + | [ --logonly ] |
| - | [ --nameprefixes ] | + | [ --nameprefixes ] |
| - | [ --noheadings ] | + | [ --noheadings ] |
| - | [ --nosuffix ] | + | [ --nosuffix ] |
| - | [ --readonly ] | + | [ --readonly ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ --rows ] | + | [ --rows ] |
| - | [ --separator String ] | + | [ --separator String ] |
| - | [ --shared ] | + | [ --shared ] |
| - | [ --unbuffered ] | + | [ --unbuffered ] |
| - | [ --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ] | + | [ --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ] |
| - | [ --unquoted ] | + | [ --unquoted ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ VG|LV|Tag ... ] | + | [ VG|LV|Tag ... ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| Use --longhelp to show all options and advanced commands. | Use --longhelp to show all options and advanced commands. | ||
| Ligne 994: | Ligne 899: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# mkdir / |
| </ | </ | ||
| Ligne 1000: | Ligne 905: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# mount / |
| </ | </ | ||
| Ligne 1006: | Ligne 911: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# ls -l /mnt/lvm |
| - | total 10296 | + | total 10294 |
| - | -rw-r--r--. 1 root root 10485760 | + | -rw-r--r-- 1 root root 10485760 |
| - | drwxr-xr-x. 3 root root | + | drwxr-xr-x 3 root root |
| - | drwx------. 2 root root 12288 Jun 24 04:20 lost+found | + | drwx------ 2 root root 12288 Apr 26 15:44 lost+found |
| - | [root@centos8 | + | root@debian11:~# ls -l / |
| - | total 10296 | + | total 10294 |
| - | -rw-r--r--. 1 root root 10485760 | + | -rw-r--r-- 1 root root 10485760 |
| - | drwxr-xr-x. 3 root root | + | drwxr-xr-x 3 root root |
| - | drwx------. 2 root root 12288 Jun 24 04:20 lost+found | + | drwx------ 2 root root 12288 Apr 26 15:44 lost+found |
| </ | </ | ||
| Ligne 1021: | Ligne 926: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian8:~# rm / |
| - | rm: remove regular file '/ | + | |
| </ | </ | ||
| Ligne 1028: | Ligne 932: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# df -Ph /mnt/lvm |
| Filesystem | Filesystem | ||
| - | / | + | / |
| - | + | root@debian11:~# df -Ph / | |
| - | [root@centos8 | + | |
| Filesystem | Filesystem | ||
| - | / | + | / |
| - | + | ||
| - | [root@centos8 ~]# lvs | + | |
| - | LV | + | |
| - | root | + | |
| - | swap | + | |
| - | lv0 vg0 owi-aos--- 456.00m | + | |
| - | testsnap vg0 swi-aos--- | + | |
| </ | </ | ||
| - | <WRAP center round todo 60%> | + | <WRAP center round todo> |
| **A Faire** - Restaurez le fichier 10M à partir du snapshot. | **A Faire** - Restaurez le fichier 10M à partir du snapshot. | ||
| </ | </ | ||
| - | ====LAB #6 - Suppression des Volumes==== | + | ====LAB #4 - Suppression des Volumes==== |
| La suppression d'un volume logique se fait grace à la commande **lvremove** : | La suppression d'un volume logique se fait grace à la commande **lvremove** : | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# umount / |
| - | [root@centos8 | + | |
| + | root@debian11:~# lvremove / | ||
| Do you really want to remove active logical volume vg0/ | Do you really want to remove active logical volume vg0/ | ||
| Logical volume " | Logical volume " | ||
| - | [root@centos8 | + | |
| - | [root@centos8 | + | root@debian11:~# umount /mnt/lvm |
| + | |||
| + | root@debian11:~# lvremove / | ||
| Do you really want to remove active logical volume vg0/lv0? [y/n]: y | Do you really want to remove active logical volume vg0/lv0? [y/n]: y | ||
| Logical volume " | Logical volume " | ||
| </ | </ | ||
| - | <WRAP center round important | + | <WRAP center round important> |
| **Important** - Notez que cette opération necéssite à ce que le volume logique soit démonté. | **Important** - Notez que cette opération necéssite à ce que le volume logique soit démonté. | ||
| </ | </ | ||
| Ligne 1070: | Ligne 969: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvremove --help |
| lvremove - Remove logical volume(s) from the system | lvremove - Remove logical volume(s) from the system | ||
| lvremove VG|LV|Tag|Select ... | lvremove VG|LV|Tag|Select ... | ||
| - | [ -A|--autobackup y|n ] | + | |
| - | [ -f|--force ] | + | [ -f|--force ] |
| - | [ -S|--select String ] | + | [ -S|--select String ] |
| - | [ --nohistory ] | + | [ --nohistory ] |
| - | [ --noudevsync ] | + | [ --noudevsync ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| - | Use --longhelp to show all options and advanced commands | + | Use --longhelp to show all options and advanced commands. |
| </ | </ | ||
| Ligne 1104: | Ligne 1003: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgremove vg0 |
| Volume group " | Volume group " | ||
| </ | </ | ||
| Ligne 1111: | Ligne 1010: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgremove --help |
| vgremove - Remove volume group(s) | vgremove - Remove volume group(s) | ||
| vgremove VG|Tag|Select ... | vgremove VG|Tag|Select ... | ||
| - | [ -f|--force ] | + | |
| - | [ -S|--select String ] | + | [ -S|--select String ] |
| - | [ --noudevsync ] | + | [ --noudevsync ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| Use --longhelp to show all options and advanced commands. | Use --longhelp to show all options and advanced commands. | ||
| Ligne 1143: | Ligne 1042: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# pvremove /dev/sdc6 /dev/sdc7 /dev/sdc9 |
| - | Labels on physical volume "/dev/sdb6" successfully wiped. | + | Labels on physical volume "/dev/sdc6" successfully wiped. |
| - | Labels on physical volume "/dev/sdb7" successfully wiped. | + | Labels on physical volume "/dev/sdc7" successfully wiped. |
| - | Labels on physical volume "/dev/sdb9" successfully wiped. | + | Labels on physical volume "/dev/sdc9" successfully wiped. |
| </ | </ | ||
| Ligne 1152: | Ligne 1051: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# pvremove --help |
| pvremove - Remove LVM label(s) from physical volume(s) | pvremove - Remove LVM label(s) from physical volume(s) | ||
| pvremove PV ... | pvremove PV ... | ||
| - | [ -f|--force ] | + | |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| Use --longhelp to show all options and advanced commands. | Use --longhelp to show all options and advanced commands. | ||
| </ | </ | ||
| - | ====LAB #7 - Volumes Logiques en Miroir==== | + | ====LAB #5 - Volumes Logiques en Miroir==== |
| Re-créez maintenant votre Volume Group : | Re-créez maintenant votre Volume Group : | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# pvcreate /dev/sdc6 /dev/sdc7 /dev/sdc9 |
| - | Physical volume "/dev/sdb6" successfully created. | + | Physical volume "/dev/sdc6" successfully created. |
| - | Physical volume "/dev/sdb7" successfully created. | + | Physical volume "/dev/sdc7" successfully created. |
| - | Physical volume "/dev/sdb9" successfully created. | + | Physical volume "/dev/sdc9" successfully created |
| + | </ | ||
| - | [root@centos8 | + | Créez le VG **vg0** : |
| + | |||
| + | < | ||
| + | root@debian11:~# vgcreate -s 8M vg0 /dev/sdc6 /dev/sdc7 /dev/sdc9 | ||
| Volume group " | Volume group " | ||
| </ | </ | ||
| Ligne 1196: | Ligne 1099: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvcreate -m 1 -L 100M -n lv1 vg0 |
| Rounding up size to full physical extent 104.00 MiB | Rounding up size to full physical extent 104.00 MiB | ||
| Logical volume " | Logical volume " | ||
| Ligne 1204: | Ligne 1107: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvdisplay -m / |
| --- Logical volume --- | --- Logical volume --- | ||
| LV Path / | LV Path / | ||
| LV Name lv1 | LV Name lv1 | ||
| VG Name vg0 | VG Name vg0 | ||
| - | LV UUID | + | LV UUID |
| LV Write Access | LV Write Access | ||
| - | LV Creation host, time centos8.ittraining.loc, 2021-06-02 07:37:28 -0400 | + | LV Creation host, time debian11, 2022-04-26 16:21:16 +0200 |
| LV Status | LV Status | ||
| # open 0 | # open 0 | ||
| Ligne 1220: | Ligne 1123: | ||
| Allocation | Allocation | ||
| Read ahead sectors | Read ahead sectors | ||
| - | - currently set to 8192 | + | - currently set to 256 |
| - | Block device | + | Block device |
| --- Segments --- | --- Segments --- | ||
| Logical extents 0 to 12: | Logical extents 0 to 12: | ||
| - | Type raid1 | + | Type raid1 |
| - | Monitoring monitored | + | Monitoring |
| Raid Data LV 0 | Raid Data LV 0 | ||
| - | Logical volume lv1_rimage_0 | + | Logical volume |
| - | Logical extents 0 to 12 | + | Logical extents |
| Raid Data LV 1 | Raid Data LV 1 | ||
| - | Logical volume lv1_rimage_1 | + | Logical volume |
| - | Logical extents 0 to 12 | + | Logical extents |
| - | Raid Metadata LV 0 lv1_rmeta_0 | + | Raid Metadata LV 0 lv1_rmeta_0 |
| - | Raid Metadata LV 1 lv1_rmeta_1 | + | Raid Metadata LV 1 lv1_rmeta_1 |
| </ | </ | ||
| Ligne 1240: | Ligne 1143: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# pvdisplay -m /dev/sdc6 /dev/sdc7 /dev/sdc9 |
| --- Physical volume --- | --- Physical volume --- | ||
| - | PV Name /dev/sdb6 | + | PV Name /dev/sdc6 |
| VG Name vg0 | VG Name vg0 | ||
| PV Size | PV Size | ||
| Ligne 1250: | Ligne 1153: | ||
| Free PE 10 | Free PE 10 | ||
| Allocated PE 14 | Allocated PE 14 | ||
| - | PV UUID lxuKRI-l3Dd-jhsv-OWtw-au2c-0ti0-XGnt1E | + | PV UUID 1JO10Q-CM90-tKxI-OsM6-0vbe-3eDG-S10H6d |
| --- Physical Segments --- | --- Physical Segments --- | ||
| Physical extent 0 to 0: | Physical extent 0 to 0: | ||
| - | Logical volume / | + | Logical volume |
| - | Logical extents 0 to 0 | + | Logical extents |
| Physical extent 1 to 13: | Physical extent 1 to 13: | ||
| - | Logical volume / | + | Logical volume |
| - | Logical extents 0 to 12 | + | Logical extents |
| Physical extent 14 to 23: | Physical extent 14 to 23: | ||
| FREE | FREE | ||
| --- Physical volume --- | --- Physical volume --- | ||
| - | PV Name /dev/sdb7 | + | PV Name /dev/sdc7 |
| VG Name vg0 | VG Name vg0 | ||
| PV Size | PV Size | ||
| Ligne 1271: | Ligne 1174: | ||
| Free PE 23 | Free PE 23 | ||
| Allocated PE 14 | Allocated PE 14 | ||
| - | PV UUID QDmfcX-Pv8o-hapq-TJOI-RaPH-qecT-VUMY4v | + | PV UUID GEkOIP-S7ce-8S1G-K0TX-ocxE-Ud6y-IY3fOZ |
| --- Physical Segments --- | --- Physical Segments --- | ||
| Physical extent 0 to 0: | Physical extent 0 to 0: | ||
| - | Logical volume / | + | Logical volume |
| - | Logical extents 0 to 0 | + | Logical extents |
| Physical extent 1 to 13: | Physical extent 1 to 13: | ||
| - | Logical volume / | + | Logical volume |
| - | Logical extents 0 to 12 | + | Logical extents |
| Physical extent 14 to 36: | Physical extent 14 to 36: | ||
| FREE | FREE | ||
| --- Physical volume --- | --- Physical volume --- | ||
| - | PV Name /dev/sdb9 | + | PV Name /dev/sdc9 |
| VG Name vg0 | VG Name vg0 | ||
| PV Size | PV Size | ||
| Ligne 1292: | Ligne 1195: | ||
| Free PE 49 | Free PE 49 | ||
| Allocated PE 0 | Allocated PE 0 | ||
| - | PV UUID ZTQV1b-Ha76-BQtB-zJEU-kfyK-ausJ-CxnRwg | + | PV UUID J7UiEX-m983-j1fp-rU7x-TuCh-MFKh-s1O5M0 |
| --- Physical Segments --- | --- Physical Segments --- | ||
| Physical extent 0 to 48: | Physical extent 0 to 48: | ||
| FREE | FREE | ||
| + | </ | ||
| + | |||
| + | En regardant la sortie de la commande **lsblk**, on observe : | ||
| + | |||
| + | < | ||
| + | root@debian11: | ||
| + | NAME | ||
| + | sda 8:0 0 | ||
| + | sdb 8:16 | ||
| + | ├─sdb1 | ||
| + | ├─sdb2 | ||
| + | └─sdb5 | ||
| + | sdc 8:32 | ||
| + | ├─sdc1 | ||
| + | ├─sdc2 | ||
| + | ├─sdc3 | ||
| + | ├─sdc4 | ||
| + | ├─sdc5 | ||
| + | ├─sdc6 | ||
| + | │ ├─vg0-lv1_rmeta_0 | ||
| + | │ │ └─vg0-lv1 | ||
| + | │ └─vg0-lv1_rimage_0 254:1 0 104M 0 lvm | ||
| + | │ | ||
| + | ├─sdc7 | ||
| + | │ ├─vg0-lv1_rmeta_1 | ||
| + | │ │ └─vg0-lv1 | ||
| + | │ └─vg0-lv1_rimage_1 254:3 0 104M 0 lvm | ||
| + | │ | ||
| + | ├─sdc8 | ||
| + | ├─sdc9 | ||
| + | ├─sdc10 | ||
| + | ├─sdc11 | ||
| + | └─sdc12 | ||
| + | sr0 | ||
| </ | </ | ||
| Ligne 1302: | Ligne 1239: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvconvert -m 0 / |
| Are you sure you want to convert raid1 LV vg0/lv1 to type linear losing all resilience? [y/n]: y | Are you sure you want to convert raid1 LV vg0/lv1 to type linear losing all resilience? [y/n]: y | ||
| Logical volume vg0/lv1 successfully converted. | Logical volume vg0/lv1 successfully converted. | ||
| + | root@debian11: | ||
| + | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
| + | sda | ||
| + | sdb | ||
| + | ├─sdb1 | ||
| + | ├─sdb2 | ||
| + | └─sdb5 | ||
| + | sdc | ||
| + | ├─sdc1 | ||
| + | ├─sdc2 | ||
| + | ├─sdc3 | ||
| + | ├─sdc4 | ||
| + | ├─sdc5 | ||
| + | ├─sdc6 | ||
| + | │ └─vg0-lv1 254:4 0 104M 0 lvm | ||
| + | ├─sdc7 | ||
| + | ├─sdc8 | ||
| + | ├─sdc9 | ||
| + | ├─sdc10 | ||
| + | ├─sdc11 | ||
| + | └─sdc12 | ||
| + | sr0 11:0 1 378M 0 rom | ||
| </ | </ | ||
| Ligne 1310: | Ligne 1269: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvconvert -m 1 / |
| Are you sure you want to convert linear LV vg0/lv1 to raid1 with 2 images enhancing resilience? [y/n]: y | Are you sure you want to convert linear LV vg0/lv1 to raid1 with 2 images enhancing resilience? [y/n]: y | ||
| Logical volume vg0/lv1 successfully converted. | Logical volume vg0/lv1 successfully converted. | ||
| + | root@debian11: | ||
| + | NAME | ||
| + | sda 8:0 0 | ||
| + | sdb 8:16 | ||
| + | ├─sdb1 | ||
| + | ├─sdb2 | ||
| + | └─sdb5 | ||
| + | sdc 8:32 | ||
| + | ├─sdc1 | ||
| + | ├─sdc2 | ||
| + | ├─sdc3 | ||
| + | ├─sdc4 | ||
| + | ├─sdc5 | ||
| + | ├─sdc6 | ||
| + | │ ├─vg0-lv1_rmeta_0 | ||
| + | │ │ └─vg0-lv1 | ||
| + | │ └─vg0-lv1_rimage_0 254:1 0 104M 0 lvm | ||
| + | │ | ||
| + | ├─sdc7 | ||
| + | │ ├─vg0-lv1_rmeta_1 | ||
| + | │ │ └─vg0-lv1 | ||
| + | │ └─vg0-lv1_rimage_1 254:3 0 104M 0 lvm | ||
| + | │ | ||
| + | ├─sdc8 | ||
| + | ├─sdc9 | ||
| + | ├─sdc10 | ||
| + | ├─sdc11 | ||
| + | └─sdc12 | ||
| + | sr0 | ||
| </ | </ | ||
| Ligne 1318: | Ligne 1306: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvconvert -m 0 / |
| Are you sure you want to convert raid1 LV vg0/lv1 to type linear losing all resilience? [y/n]: y | Are you sure you want to convert raid1 LV vg0/lv1 to type linear losing all resilience? [y/n]: y | ||
| Logical volume vg0/lv1 successfully converted. | Logical volume vg0/lv1 successfully converted. | ||
| Ligne 1326: | Ligne 1314: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvconvert --help |
| lvconvert - Change logical volume layout | lvconvert - Change logical volume layout | ||
| Convert LV to linear. | Convert LV to linear. | ||
| lvconvert --type linear LV | lvconvert --type linear LV | ||
| - | [ COMMON_OPTIONS ] | + | |
| - | [ PV ... ] | + | [ PV ... ] |
| Convert LV to striped. | Convert LV to striped. | ||
| lvconvert --type striped LV | lvconvert --type striped LV | ||
| - | [ -I|--stripesize Size[k|UNIT] ] | + | |
| - | [ -R|--regionsize Size[m|UNIT] ] | + | [ -R|--regionsize Size[m|UNIT] ] |
| - | [ -i|--interval Number ] | + | [ -i|--interval Number ] |
| - | [ --stripes Number ] | + | [ --stripes Number ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Convert LV to type mirror (also see type raid1), | Convert LV to type mirror (also see type raid1), | ||
| lvconvert --type mirror LV | lvconvert --type mirror LV | ||
| - | [ -m|--mirrors [+|-]Number ] | + | |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ -R|--regionsize Size[m|UNIT] ] | + | [ -R|--regionsize Size[m|UNIT] ] |
| - | [ -i|--interval Number ] | + | [ -i|--interval Number ] |
| - | [ --stripes Number ] | + | [ --stripes Number ] |
| - | [ --mirrorlog core|disk ] | + | [ --mirrorlog core|disk ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Convert LV to raid or change raid layout | Convert LV to raid or change raid layout | ||
| (a specific raid level must be used, e.g. raid1). | (a specific raid level must be used, e.g. raid1). | ||
| lvconvert --type raid LV | lvconvert --type raid LV | ||
| - | [ -m|--mirrors [+|-]Number ] | + | |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ -R|--regionsize Size[m|UNIT] ] | + | [ -R|--regionsize Size[m|UNIT] ] |
| - | [ -i|--interval Number ] | + | [ -i|--interval Number ] |
| - | [ --stripes Number ] | + | [ --stripes Number ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Convert LV to raid1 or mirror, or change number of mirror images. | Convert LV to raid1 or mirror, or change number of mirror images. | ||
| lvconvert -m|--mirrors [+|-]Number LV | lvconvert -m|--mirrors [+|-]Number LV | ||
| - | [ -R|--regionsize Size[m|UNIT] ] | + | |
| - | [ -i|--interval Number ] | + | [ -i|--interval Number ] |
| - | [ --mirrorlog core|disk ] | + | [ --mirrorlog core|disk ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Convert raid LV to change number of stripe images. | Convert raid LV to change number of stripe images. | ||
| lvconvert --stripes Number LV_raid | lvconvert --stripes Number LV_raid | ||
| - | [ -i|--interval Number ] | + | |
| - | [ -R|--regionsize Size[m|UNIT] ] | + | [ -R|--regionsize Size[m|UNIT] ] |
| - | [ -I|--stripesize Size[k|UNIT] ] | + | [ -I|--stripesize Size[k|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Convert raid LV to change the stripe size. | Convert raid LV to change the stripe size. | ||
| lvconvert -I|--stripesize Size[k|UNIT] LV_raid | lvconvert -I|--stripesize Size[k|UNIT] LV_raid | ||
| - | [ -i|--interval Number ] | + | |
| - | [ -R|--regionsize Size[m|UNIT] ] | + | [ -R|--regionsize Size[m|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Split images from a raid1 or mirror LV and use them to create a new LV. | Split images from a raid1 or mirror LV and use them to create a new LV. | ||
| lvconvert --splitmirrors Number -n|--name LV_new LV_cache_mirror_raid1 | lvconvert --splitmirrors Number -n|--name LV_new LV_cache_mirror_raid1 | ||
| - | [ COMMON_OPTIONS ] | + | |
| - | [ PV ... ] | + | [ PV ... ] |
| Split images from a raid1 LV and track changes to origin for later merge. | Split images from a raid1 LV and track changes to origin for later merge. | ||
| lvconvert --splitmirrors Number --trackchanges LV_cache_raid1 | lvconvert --splitmirrors Number --trackchanges LV_cache_raid1 | ||
| - | [ COMMON_OPTIONS ] | + | |
| - | [ PV ... ] | + | [ PV ... ] |
| Merge LV images that were split from a raid1 LV. | Merge LV images that were split from a raid1 LV. | ||
| lvconvert --mergemirrors VG|LV_linear_raid|Tag ... | lvconvert --mergemirrors VG|LV_linear_raid|Tag ... | ||
| - | [ COMMON_OPTIONS ] | + | |
| Convert LV to a thin LV, using the original LV as an external origin. | Convert LV to a thin LV, using the original LV as an external origin. | ||
| lvconvert --type thin --thinpool LV LV_linear_striped_thin_cache_raid | lvconvert --type thin --thinpool LV LV_linear_striped_thin_cache_raid | ||
| - | [ -T|--thin ] | + | |
| - | [ -r|--readahead auto|none|Number ] | + | [ -r|--readahead auto|none|Number ] |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ -Z|--zero y|n ] | + | [ -Z|--zero y|n ] |
| - | [ --originname LV_new ] | + | [ --originname LV_new ] |
| - | [ --poolmetadata LV ] | + | [ --poolmetadata LV ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ --metadataprofile String ] | + | [ --metadataprofile String ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Attach a cache pool to an LV, converts the LV to type cache. | Attach a cache pool to an LV, converts the LV to type cache. | ||
| lvconvert --type cache --cachepool LV LV_linear_striped_thinpool_vdo_vdopool_vdopooldata_raid | lvconvert --type cache --cachepool LV LV_linear_striped_thinpool_vdo_vdopool_vdopooldata_raid | ||
| - | [ -H|--cache ] | + | |
| - | [ -Z|--zero y|n ] | + | [ -Z|--zero y|n ] |
| - | [ -r|--readahead auto|none|Number ] | + | [ -r|--readahead auto|none|Number ] |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ --cachemetadataformat auto|1|2 ] | + | [ --cachemetadataformat auto|1|2 ] |
| - | [ --cachemode writethrough|writeback|passthrough ] | + | [ --cachemode writethrough|writeback|passthrough ] |
| - | [ --cachepolicy String ] | + | [ --cachepolicy String ] |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ --poolmetadata LV ] | + | [ --poolmetadata LV ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ --metadataprofile String ] | + | [ --metadataprofile String ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Attach a writecache to an LV, converts the LV to type writecache. | Attach a writecache to an LV, converts the LV to type writecache. | ||
| lvconvert --type writecache --cachevol LV LV_linear_striped_raid | lvconvert --type writecache --cachevol LV LV_linear_striped_raid | ||
| - | [ --cachesettings String ] | + | |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Attach a cache to an LV, converts the LV to type cache. | Attach a cache to an LV, converts the LV to type cache. | ||
| lvconvert --type cache --cachevol LV LV_linear_striped_thinpool_raid | lvconvert --type cache --cachevol LV LV_linear_striped_thinpool_raid | ||
| - | [ -H|--cache ] | + | |
| - | [ -Z|--zero y|n ] | + | [ -Z|--zero y|n ] |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ --cachemetadataformat auto|1|2 ] | + | [ --cachemetadataformat auto|1|2 ] |
| - | [ --cachemode writethrough|writeback|passthrough ] | + | [ --cachemode writethrough|writeback|passthrough ] |
| - | [ --cachepolicy String ] | + | [ --cachepolicy String ] |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Add a writecache to an LV, using a specified cache device. | Add a writecache to an LV, using a specified cache device. | ||
| lvconvert --type writecache --cachedevice PV LV_linear_striped_raid | lvconvert --type writecache --cachedevice PV LV_linear_striped_raid | ||
| - | [ --cachesize Size[m|UNIT] ] | + | |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Add a cache to an LV, using a specified cache device. | Add a cache to an LV, using a specified cache device. | ||
| lvconvert --type cache --cachedevice PV LV_linear_striped_thinpool_raid | lvconvert --type cache --cachedevice PV LV_linear_striped_thinpool_raid | ||
| - | [ --cachesize Size[m|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ --cachesettings String ] | + | |
| - | [ COMMON_OPTIONS ] | + | [ --cachesettings String ] |
| + | [ COMMON_OPTIONS ] | ||
| Convert LV to type thin-pool. | Convert LV to type thin-pool. | ||
| lvconvert --type thin-pool LV_linear_striped_cache_raid | lvconvert --type thin-pool LV_linear_striped_cache_raid | ||
| - | [ -I|--stripesize Size[k|UNIT] ] | + | |
| - | [ -r|--readahead auto|none|Number ] | + | [ -r|--readahead auto|none|Number ] |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ -Z|--zero y|n ] | + | [ -Z|--zero y|n ] |
| - | [ --stripes Number ] | + | [ --stripes Number ] |
| - | [ --discards passdown|nopassdown|ignore ] | + | [ --discards passdown|nopassdown|ignore ] |
| - | [ --poolmetadata LV ] | + | [ --poolmetadata LV ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ --metadataprofile String ] | + | [ --metadataprofile String ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Convert LV to type cache-pool. | Convert LV to type cache-pool. | ||
| lvconvert --type cache-pool LV_linear_striped_raid | lvconvert --type cache-pool LV_linear_striped_raid | ||
| - | [ -Z|--zero y|n ] | + | |
| - | [ -r|--readahead auto|none|Number ] | + | [ -r|--readahead auto|none|Number ] |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ --cachemetadataformat auto|1|2 ] | + | [ --cachemetadataformat auto|1|2 ] |
| - | [ --cachemode writethrough|writeback|passthrough ] | + | [ --cachemode writethrough|writeback|passthrough ] |
| - | [ --cachepolicy String ] | + | [ --cachepolicy String ] |
| - | [ --cachesettings String ] | + | [ --cachesettings String ] |
| - | [ --poolmetadata LV ] | + | [ --poolmetadata LV ] |
| - | [ --poolmetadatasize Size[m|UNIT] ] | + | [ --poolmetadatasize Size[m|UNIT] ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ --metadataprofile String ] | + | [ --metadataprofile String ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Convert LV to type vdopool. | Convert LV to type vdopool. | ||
| lvconvert --type vdo-pool LV_linear_striped_cache_raid | lvconvert --type vdo-pool LV_linear_striped_cache_raid | ||
| - | [ -n|--name LV_new ] | + | |
| - | [ -V|--virtualsize Size[m|UNIT] ] | + | [ -V|--virtualsize Size[m|UNIT] ] |
| - | [ --compression y|n ] | + | [ --compression y|n ] |
| - | [ --deduplication y|n ] | + | [ --deduplication y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Detach a cache from an LV. | Detach a cache from an LV. | ||
| lvconvert --splitcache LV_thinpool_cache_cachepool_vdopool_writecache | lvconvert --splitcache LV_thinpool_cache_cachepool_vdopool_writecache | ||
| - | [ COMMON_OPTIONS ] | + | [ --cachesettings String ] |
| + | | ||
| Merge thin LV into its origin LV. | Merge thin LV into its origin LV. | ||
| lvconvert --mergethin LV_thin ... | lvconvert --mergethin LV_thin ... | ||
| - | [ COMMON_OPTIONS ] | + | |
| Merge COW snapshot LV into its origin. | Merge COW snapshot LV into its origin. | ||
| lvconvert --mergesnapshot LV_snapshot ... | lvconvert --mergesnapshot LV_snapshot ... | ||
| - | [ -i|--interval Number ] | + | |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Combine a former COW snapshot (second arg) with a former | Combine a former COW snapshot (second arg) with a former | ||
| origin LV (first arg) to reverse a splitsnapshot command. | origin LV (first arg) to reverse a splitsnapshot command. | ||
| lvconvert --type snapshot LV LV_linear_striped | lvconvert --type snapshot LV LV_linear_striped | ||
| - | [ -s|--snapshot ] | + | |
| - | [ -c|--chunksize Size[k|UNIT] ] | + | [ -c|--chunksize Size[k|UNIT] ] |
| - | [ -Z|--zero y|n ] | + | [ -Z|--zero y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Replace failed PVs in a raid or mirror LV. | Replace failed PVs in a raid or mirror LV. | ||
| Ligne 1523: | Ligne 1513: | ||
| Repair a cache pool. | Repair a cache pool. | ||
| lvconvert --repair LV_thinpool_cache_cachepool_mirror_raid | lvconvert --repair LV_thinpool_cache_cachepool_mirror_raid | ||
| - | [ -i|--interval Number ] | + | |
| - | [ --usepolicies ] | + | [ --usepolicies ] |
| - | [ --poolmetadataspare y|n ] | + | [ --poolmetadataspare y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Replace specific PV(s) in a raid LV with another PV. | Replace specific PV(s) in a raid LV with another PV. | ||
| lvconvert --replace PV LV_raid | lvconvert --replace PV LV_raid | ||
| - | [ COMMON_OPTIONS ] | + | |
| - | [ PV ... ] | + | [ PV ... ] |
| Poll LV to continue conversion. | Poll LV to continue conversion. | ||
| lvconvert --startpoll LV_mirror_raid | lvconvert --startpoll LV_mirror_raid | ||
| - | [ COMMON_OPTIONS ] | + | |
| Add or remove data integrity checksums to raid images. | Add or remove data integrity checksums to raid images. | ||
| lvconvert --raidintegrity y|n LV_raid | lvconvert --raidintegrity y|n LV_raid | ||
| - | [ --raidintegritymode String ] | + | |
| - | [ --raidintegrityblocksize Number ] | + | [ --raidintegrityblocksize Number ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| - | [ PV ... ] | + | [ PV ... ] |
| Common options for command: | Common options for command: | ||
| - | [ -b|--background ] | + | |
| - | [ -f|--force ] | + | [ -f|--force ] |
| - | [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit ] | + | [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit ] |
| - | [ --noudevsync ] | + | [ --noudevsync ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| Use --longhelp to show all options and advanced commands. | Use --longhelp to show all options and advanced commands. | ||
| </ | </ | ||
| - | ====LAB #8 - Modifier les Attributs LVM==== | + | ====LAB #6 - Modifier les Attributs LVM==== |
| - | En cas de présence | + | Pour consulter les attributs |
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvs |
| - | LV | + | LV |
| - | root cl_centos8 -wi-ao---- | + | lv1 vg0 -wi-a----- 104.00m |
| - | swap cl_centos8 -wi-ao---- | + | |
| - | lv1 vg0 -wi-a----- 104.00m | + | |
| </ | </ | ||
| - | <WRAP center round important | + | <WRAP center round important> |
| Consultez **[[http:// | Consultez **[[http:// | ||
| </ | </ | ||
| - | La commande | + | La commande |
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgs |
| - | VG | + | VG #PV #LV #SN Attr |
| - | | + | |
| - | vg0 | + | |
| </ | </ | ||
| - | <WRAP center round important | + | <WRAP center round important> |
| Consultez **[[http:// | Consultez **[[http:// | ||
| </ | </ | ||
| - | La commande | + | La commande |
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# pvs |
| - | PV | + | PV |
| - | /dev/sda2 cl_centos8 lvm2 a-- < | + | /dev/sdc6 vg0 lvm2 a-- 192.00m |
| - | / | + | /dev/sdc7 vg0 lvm2 a-- 296.00m 296.00m |
| - | /dev/sdb7 | + | /dev/sdc9 vg0 lvm2 a-- 392.00m 392.00m |
| - | /dev/sdb9 | + | |
| </ | </ | ||
| - | <WRAP center round important | + | <WRAP center round important> |
| Consultez **[[http:// | Consultez **[[http:// | ||
| </ | </ | ||
| Ligne 1619: | Ligne 1605: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvs |
| + | LV | ||
| + | lv1 vg0 -wi-a----- 104.00m | ||
| + | root@debian11: | ||
| + | root@debian11: | ||
| + | LV | ||
| + | lv1 vg0 -wi------- 104.00m | ||
| </ | </ | ||
| - | Pour faire l' | + | L'opération |
| - | < | + | < |
| - | [root@centos8 | + | root@debian11:~# lvchange -a y / |
| + | root@debian11: | ||
| + | LV | ||
| + | lv1 vg0 -wi-a----- 104.00m | ||
| </ | </ | ||
| Ligne 1631: | Ligne 1626: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvchange --help |
| lvchange - Change the attributes of logical volume(s) | lvchange - Change the attributes of logical volume(s) | ||
| Ligne 1638: | Ligne 1633: | ||
| required, after which the others are optional. | required, after which the others are optional. | ||
| lvchange | lvchange | ||
| - | ( -C|--contiguous y|n, | + | |
| - | | + | -p|--permission rw|r, |
| - | | + | -r|--readahead auto|none|Number, |
| - | | + | -k|--setactivationskip y|n, |
| - | | + | -Z|--zero y|n, |
| - | | + | -M|--persistent n, |
| - | --addtag Tag, | + | |
| - | --deltag Tag, | + | |
| - | --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit, | + | |
| - | --compression y|n, | + | |
| - | --deduplication y|n, | + | |
| - | --detachprofile, | + | |
| - | --metadataprofile String, | + | |
| - | --profile String, | + | |
| - | --errorwhenfull y|n, | + | |
| - | --discards passdown|nopassdown|ignore, | + | |
| - | --cachemode writethrough|writeback|passthrough, | + | |
| - | --cachepolicy String, | + | |
| - | --cachesettings String, | + | |
| - | --minrecoveryrate Size[k|UNIT], | + | |
| - | --maxrecoveryrate Size[k|UNIT], | + | |
| - | --writebehind Number, | + | |
| - | --writemostly PV[:t|n|y] ) | + | |
| - | VG|LV|Tag|Select ... | + | |
| - | [ -a|--activate y|n|ay ] | + | [ -a|--activate y|n|ay ] |
| - | [ --poll y|n ] | + | [ --poll y|n ] |
| - | [ --monitor y|n ] | + | [ --monitor y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Resyncronize a mirror or raid LV. | Resyncronize a mirror or raid LV. | ||
| Use to reset ' | Use to reset ' | ||
| lvchange --resync VG|LV_mirror_raid|Tag|Select ... | lvchange --resync VG|LV_mirror_raid|Tag|Select ... | ||
| - | [ -a|--activate y|n|ay ] | + | |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Resynchronize or check a raid LV. | Resynchronize or check a raid LV. | ||
| lvchange --syncaction check|repair VG|LV_raid|Tag|Select ... | lvchange --syncaction check|repair VG|LV_raid|Tag|Select ... | ||
| - | [ COMMON_OPTIONS ] | + | |
| Reconstruct data on specific PVs of a raid LV. | Reconstruct data on specific PVs of a raid LV. | ||
| lvchange --rebuild PV VG|LV_raid|Tag|Select ... | lvchange --rebuild PV VG|LV_raid|Tag|Select ... | ||
| - | [ COMMON_OPTIONS ] | + | |
| Activate or deactivate an LV. | Activate or deactivate an LV. | ||
| lvchange -a|--activate y|n|ay VG|LV|Tag|Select ... | lvchange -a|--activate y|n|ay VG|LV|Tag|Select ... | ||
| - | [ -P|--partial ] | + | |
| - | [ -K|--ignoreactivationskip ] | + | [ -K|--ignoreactivationskip ] |
| - | [ --activationmode partial|degraded|complete ] | + | [ --activationmode partial|degraded|complete ] |
| - | [ --poll y|n ] | + | [ --poll y|n ] |
| - | [ --monitor y|n ] | + | [ --monitor y|n ] |
| - | [ --ignorelockingfailure ] | + | [ --ignorelockingfailure ] |
| - | [ --sysinit ] | + | [ --sysinit ] |
| - | [ --readonly ] | + | [ --readonly ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Reactivate an LV using the latest metadata. | Reactivate an LV using the latest metadata. | ||
| lvchange --refresh VG|LV|Tag|Select ... | lvchange --refresh VG|LV|Tag|Select ... | ||
| - | [ -P|--partial ] | + | |
| - | [ --activationmode partial|degraded|complete ] | + | [ --activationmode partial|degraded|complete ] |
| - | [ --poll y|n ] | + | [ --poll y|n ] |
| - | [ --monitor y|n ] | + | [ --monitor y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Start or stop monitoring an LV from dmeventd. | Start or stop monitoring an LV from dmeventd. | ||
| lvchange --monitor y|n VG|LV|Tag|Select ... | lvchange --monitor y|n VG|LV|Tag|Select ... | ||
| - | [ COMMON_OPTIONS ] | + | |
| Start or stop processing an LV conversion. | Start or stop processing an LV conversion. | ||
| lvchange --poll y|n VG|LV|Tag|Select ... | lvchange --poll y|n VG|LV|Tag|Select ... | ||
| - | [ --monitor y|n ] | + | |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Make the minor device number persistent for an LV. | Make the minor device number persistent for an LV. | ||
| lvchange -M|--persistent y --minor Number LV | lvchange -M|--persistent y --minor Number LV | ||
| - | [ -j|--major Number ] | + | |
| - | [ -a|--activate y|n|ay ] | + | [ -a|--activate y|n|ay ] |
| - | [ --poll y|n ] | + | [ --poll y|n ] |
| - | [ --monitor y|n ] | + | [ --monitor y|n ] |
| - | [ COMMON_OPTIONS ] | + | [ COMMON_OPTIONS ] |
| Common options for command: | Common options for command: | ||
| - | [ -A|--autobackup y|n ] | + | |
| - | [ -f|--force ] | + | [ -f|--force ] |
| - | [ -S|--select String ] | + | [ -S|--select String ] |
| - | [ --ignoremonitoring ] | + | [ --ignoremonitoring ] |
| - | [ --noudevsync ] | + | [ --noudevsync ] |
| - | [ --reportformat basic|json ] | + | [ --reportformat basic|json ] |
| Common options for lvm: | Common options for lvm: | ||
| - | [ -d|--debug ] | + | |
| - | [ -h|--help ] | + | [ -h|--help ] |
| - | [ -q|--quiet ] | + | [ -q|--quiet ] |
| - | [ -v|--verbose ] | + | [ -v|--verbose ] |
| - | [ -y|--yes ] | + | [ -y|--yes ] |
| - | [ -t|--test ] | + | [ -t|--test ] |
| - | [ --commandprofile String ] | + | [ --commandprofile String ] |
| - | [ --config String ] | + | [ --config String ] |
| - | [ --driverloaded y|n ] | + | [ --driverloaded y|n ] |
| - | [ --nolocking ] | + | [ --nolocking ] |
| - | [ --lockopt String ] | + | [ --lockopt String ] |
| - | [ --longhelp ] | + | [ --longhelp ] |
| - | [ --profile String ] | + | [ --profile String ] |
| - | [ --version ] | + | [ --version ] |
| Use --longhelp to show all options and advanced commands. | Use --longhelp to show all options and advanced commands. | ||
| </ | </ | ||
| - | ====LAB #9 - Volumes Logiques en Bandes==== | + | ====LAB #7 - Volumes Logiques en Bandes==== |
| - | Un volume logique en bandes est créé pour augmenter, comme dans le cas du RAID, les performances des entrées et sorties. Pour créer ce volume, la commande **lvcreate** prend deux option | + | Un volume logique en bandes est créé pour augmenter, comme dans le cas du RAID, les performances des entrées et sorties. Pour créer ce volume, la commande **lvcreate** prend deux options |
| * **-i** - indique le nombre de volumes de bandes, | * **-i** - indique le nombre de volumes de bandes, | ||
| Ligne 1755: | Ligne 1750: | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvcreate -i2 -I64 -n lv2 -L 100M vg0 /dev/sdc7 /dev/sdc9 |
| Rounding up size to full physical extent 104.00 MiB | Rounding up size to full physical extent 104.00 MiB | ||
| - | Rounding size 104.00 MiB (13 extents) up to stripe boundary size 112.00 MiB(14 extents). | + | Rounding size 104.00 MiB (13 extents) up to stripe boundary size 112.00 MiB (14 extents). |
| Logical volume " | Logical volume " | ||
| </ | </ | ||
| - | Constatez la présence de vos bandes sur /dev/sda7 et sur /dev/sda9 : | + | Constatez la présence de vos bandes sur /dev/sdc7 et sur /dev/sdc9 : |
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvdisplay -m / |
| --- Logical volume --- | --- Logical volume --- | ||
| LV Path / | LV Path / | ||
| LV Name lv2 | LV Name lv2 | ||
| VG Name vg0 | VG Name vg0 | ||
| - | LV UUID | + | LV UUID |
| LV Write Access | LV Write Access | ||
| - | LV Creation host, time centos8.ittraining.loc, 2021-06-02 07:47:38 -0400 | + | LV Creation host, time debian11, 2022-04-26 16:33:17 +0200 |
| LV Status | LV Status | ||
| - | # open 0 | + | # open 0equivalente |
| LV Size 112.00 MiB | LV Size 112.00 MiB | ||
| Current LE 14 | Current LE 14 | ||
| Ligne 1779: | Ligne 1774: | ||
| Allocation | Allocation | ||
| Read ahead sectors | Read ahead sectors | ||
| - | - currently set to 8192 | + | - currently set to 512 |
| - | Block device | + | Block device |
| --- Segments --- | --- Segments --- | ||
| Logical extents 0 to 13: | Logical extents 0 to 13: | ||
| - | Type striped | + | Type striped |
| - | Stripes 2 | + | Stripes |
| - | Stripe size 64.00 KiB | + | Stripe size |
| Stripe 0: | Stripe 0: | ||
| - | Physical volume / | + | Physical volume |
| - | Physical extents 0 to 6 | + | Physical extents |
| Stripe 1: | Stripe 1: | ||
| - | Physical volume / | + | Physical volume |
| - | Physical extents 0 to 6 | + | Physical extents |
| + | root@debian11: | ||
| + | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
| + | sda | ||
| + | sdb | ||
| + | ├─sdb1 | ||
| + | ├─sdb2 | ||
| + | └─sdb5 | ||
| + | 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 | ||
| + | ├─sdc9 | ||
| + | │ └─vg0-lv2 254:1 0 112M 0 lvm | ||
| + | ├─sdc10 | ||
| + | ├─sdc11 | ||
| + | └─sdc12 | ||
| + | sr0 11:0 1 378M 0 rom | ||
| </ | </ | ||
| + | |||
| Utilisez maintenant la commande **lvs** pour visualiser les volumes physiques utilisés par le volume logique : | Utilisez maintenant la commande **lvs** pour visualiser les volumes physiques utilisés par le volume logique : | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# lvs -o +devices |
| - | LV | + | LV |
| - | root cl_centos8 -wi-ao---- | + | lv1 vg0 -wi-a----- 104.00m |
| - | swap cl_centos8 -wi-ao---- | + | lv2 vg0 -wi-a----- 112.00m |
| - | lv1 vg0 -wi-a----- 104.00m | + | |
| - | lv2 vg0 -wi-a----- 112.00m | + | |
| </ | </ | ||
| - | ====LAB #10 - Gérer les Métadonnées==== | + | ====LAB #8 - Gérer les Métadonnées==== |
| Les métadonnées pour chaque Volume Group sont stockés dans un fichier texte au nom du Volume Group dans le répertoire **/ | Les métadonnées pour chaque Volume Group sont stockés dans un fichier texte au nom du Volume Group dans le répertoire **/ | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# cat / |
| - | # Generated by LVM2 version 2.03.09(2)-RHEL8 | + | # Generated by LVM2 version 2.03.11(2) (2021-01-08): Tue Apr 26 16:33:17 2022 |
| contents = "Text Format Volume Group" | contents = "Text Format Volume Group" | ||
| version = 1 | version = 1 | ||
| - | description = " | + | description = " |
| - | creation_host = "centos8.ittraining.loc" # Linux centos8.ittraining.loc 4.18.0-240.22.1.el8_3.x86_64 #1 SMP Thu Apr 8 19:01:30 UTC 2021 x86_64 | + | creation_host = "debian11" |
| - | creation_time = 1622634458 # Wed Jun 2 07:47:38 2021 | + | creation_time = 1650983597 |
| vg0 { | vg0 { | ||
| - | id = "TDXUip-c3yg-J83l-Z30x-zcsJ-Rbvl-gjFvfd" | + | |
| - | seqno = 11 | + | seqno = 11 |
| - | format = " | + | format = " |
| - | status = [" | + | status = [" |
| - | flags = [] | + | flags = [] |
| - | extent_size = 16384 # 8 Megabytes | + | extent_size = 16384 |
| - | max_lv = 0 | + | max_lv = 0 |
| - | max_pv = 0 | + | max_pv = 0 |
| - | metadata_copies = 0 | + | metadata_copies = 0 |
| - | physical_volumes { | + | |
| - | pv0 { | + | |
| - | id = "lxuKRI-l3Dd-jhsv-OWtw-au2c-0ti0-XGnt1E" | + | id = "1JO10Q-CM90-tKxI-OsM6-0vbe-3eDG-S10H6d" |
| - | device = "/dev/sdb6" # Hint only | + | device = "/dev/sdc6" |
| - | status = [" | + | |
| - | flags = [] | + | flags = [] |
| - | dev_size = 409600 # 200 Megabytes | + | dev_size = 409600 |
| - | pe_start = 2048 | + | pe_start = 2048 |
| - | pe_count = 24 # 192 Megabytes | + | pe_count = 24 |
| - | } | + | } |
| - | pv1 { | + | |
| - | id = "QDmfcX-Pv8o-hapq-TJOI-RaPH-qecT-VUMY4v" | + | id = "GEkOIP-S7ce-8S1G-K0TX-ocxE-Ud6y-IY3fOZ" |
| - | device = "/dev/sdb7" # Hint only | + | device = "/dev/sdc7" |
| - | status = [" | + | |
| - | flags = [] | + | flags = [] |
| - | dev_size = 614400 # 300 Megabytes | + | dev_size = 614400 |
| - | pe_start = 2048 | + | pe_start = 2048 |
| - | pe_count = 37 # 296 Megabytes | + | pe_count = 37 |
| - | } | + | } |
| - | pv2 { | + | |
| - | id = "ZTQV1b-Ha76-BQtB-zJEU-kfyK-ausJ-CxnRwg" | + | id = "J7UiEX-m983-j1fp-rU7x-TuCh-MFKh-s1O5M0" |
| - | device = "/dev/sdb9" # Hint only | + | device = "/dev/sdc9" |
| - | status = [" | + | |
| - | flags = [] | + | flags = [] |
| - | dev_size = 819200 # 400 Megabytes | + | dev_size = 819200 |
| - | pe_start = 2048 | + | pe_start = 2048 |
| - | pe_count = 49 # 392 Megabytes | + | pe_count = 49 |
| - | } | + | } |
| - | } | + | } |
| - | logical_volumes { | + | |
| - | lv1 { | + | |
| - | id = "lJQQWs-n05T-pxzi-Zq2R-UzRI-kYZf-hsNPYQ" | + | id = "2AQE1P-kcp7-5w5O-9i3M-Ge6L-OSa7-HDmKii" |
| - | status = [" | + | status = [" |
| - | flags = [] | + | flags = [] |
| - | creation_time = 1622633848 # 2021-06-02 07:37:28 -0400 | + | creation_time = 1650982876 |
| - | creation_host = "centos8.ittraining.loc" | + | creation_host = "debian11" |
| - | segment_count = 1 | + | segment_count = 1 |
| - | segment1 { | + | |
| - | start_extent = 0 | + | start_extent = 0 |
| - | extent_count = 13 # 104 Megabytes | + | extent_count = 13 |
| - | type = " | + | |
| - | stripe_count = 1 # linear | + | stripe_count = 1 # linear |
| - | stripes = [ | + | |
| - | " | + | " |
| - | ] | + | ] |
| - | } | + | } |
| - | } | + | } |
| - | lv2 { | + | |
| - | id = "MmXbPt-ZF8u-rnIv-3YU9-m64J-RCz2-6NzAuG" | + | id = "gtqCux-8FIn-gCLc-35oB-TTsC-k7AZ-3PHIJI" |
| - | status = [" | + | status = [" |
| - | flags = [] | + | flags = [] |
| - | creation_time = 1622634458 # 2021-06-02 07:47:38 -0400 | + | creation_time = 1650983597 |
| - | creation_host = "centos8.ittraining.loc" | + | creation_host = "debian11" |
| - | segment_count = 1 | + | segment_count = 1 |
| - | segment1 { | + | |
| - | start_extent = 0 | + | start_extent = 0 |
| - | extent_count = 14 # 112 Megabytes | + | extent_count = 14 |
| - | type = " | + | |
| - | stripe_count = 2 | + | stripe_count = 2 |
| - | stripe_size = 128 # 64 Kilobytes | + | stripe_size = 128 |
| - | stripes = [ | + | |
| - | " | + | " |
| - | " | + | " |
| - | ] | + | ] |
| - | } | + | } |
| - | } | + | } |
| - | } | + | } |
| } | } | ||
| </ | </ | ||
| + | |||
| Des archives sont créées lors de chaque modification d'un groupe de volumes et elles sont placés dans le répertoire **/ | Des archives sont créées lors de chaque modification d'un groupe de volumes et elles sont placés dans le répertoire **/ | ||
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# ls / |
| - | vg0_00000-427117660.vg vg0_00002-2064899457.vg | + | vg0_00000-267942700.vg vg0_00004-458787361.vg vg0_00008-297779072.vg vg0_00012-1101644815.vg |
| - | vg0_00001-1993147316.vg | + | vg0_00001-854434220.vg vg0_00005-1786773709.vg |
| - | </ | + | vg0_00002-520659205.vg vg0_00006-196117920.vg vg0_00010-550024633.vg |
| + | vg0_00003-1606608177.vg | ||
| - | La commande **vgcfgbackup** est utilisée pour sauvegarder les métadonnées manuellement dans le fichier **/ | + | root@debian11:~# vgcfgrestore --list vg0 |
| - | + | ||
| - | La commande **vgcfgrestore** permet de restaurer une sauvegarde. Sans l' | + | |
| - | + | ||
| - | < | + | |
| - | [root@centos8 ~]# vgcfgbackup vg0 | + | |
| - | Volume group " | + | |
| - | </ | + | |
| - | + | ||
| - | Il est aussi possible de modifier l' | + | |
| - | + | ||
| - | < | + | |
| - | [root@centos8 ~]# vgcfgbackup -f / | + | |
| - | Volume group " | + | |
| - | </ | + | |
| - | + | ||
| - | Par contre, toute sauvegarde en dehors des répertoires par défaut n'est pas visible dans la sortie de la commande **vgcfgrestore --list** : | + | |
| - | + | ||
| - | < | + | |
| - | [root@centos8 | + | |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed May 26 10:43:14 2021 | + | Backup Time: Tue Apr 26 13:54:06 2022 |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed May 26 16:56:31 2021 | + | Backup Time: Tue Apr 26 13:55:59 2022 |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed May 26 22:12:15 2021 | + | Backup Time: Tue Apr 26 15:47:38 2022 |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed May 26 22:19:25 2021 | + | Backup Time: Tue Apr 26 15:53:12 2022 |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed May 26 22:38:37 2021 | + | Backup Time: Tue Apr 26 16:15:45 2022 |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed May 26 22:42:18 2021 | + | Backup Time: Tue Apr 26 16:16:19 2022 |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed May 26 22:43:49 2021 | + | Backup Time: Tue Apr 26 16:17:28 2022 |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed Jun 2 07:37:07 2021 | + | Backup Time: |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed Jun 2 07:37:28 2021 | + | Backup Time: |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed Jun 2 07:41:04 2021 | + | Backup Time: |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed Jun 2 07:41:53 2021 | + | Backup Time: |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed Jun 2 07:42:23 2021 | + | Backup Time: |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed Jun 2 07:47:38 2021 | + | Backup Time: |
| - | File: / | + | File: |
| - | VG name: vg0 | + | VG name: vg0 |
| - | Description: | + | Description: |
| - | Backup Time: Wed Jun 2 07:50:57 2021 | + | Backup Time: |
| </ | </ | ||
| - | =====LAB #20 - Créer un Système de Fichiers ISO===== | + | La commande **vgcfgbackup** est utilisée pour sauvegarder les métadonnées manuellement dans le fichier **/ |
| - | ====La Commande mkisofs==== | + | La commande **vgcfgrestore** permet |
| - | + | ||
| - | Pour créer un fichier ISO à partir d'une arborescence | + | |
| < | < | ||
| - | [root@centos8 | + | root@debian11:~# vgcfgbackup vg0 |
| - | [root@centos8 tmp]# mkisofs -r -T -o tmp.iso . | + | |
| - | I: -input-charset not specified, using utf-8 (detected in locale settings) | + | |
| - | Total translation table size: 1827 | + | |
| - | Total rockridge attributes bytes: 1976 | + | |
| - | Total directory bytes: 14336 | + | |
| - | Path table size(bytes): | + | |
| - | Max brk space used 1c000 | + | |
| - | 186 extents written (0 MB) | + | |
| - | </ | + | |
| - | Le fichier ISO peut être monter en utilisant un périphérique de type **loop** : | + | root@debian11:~# ls /etc/ |
| - | + | vg0 | |
| - | < | + | |
| - | [root@centos8 tmp]# mount tmp.iso /mnt -o loop | + | |
| - | mount: /mnt: WARNING: device write-protected, | + | |
| - | [root@centos8 tmp]# ls /mnt | + | |
| - | systemd-private-192104a9224f499286f5adb5754e9e04-chronyd.service-FI2YXs | + | |
| - | [root@centos8 tmp]# ls | + | |
| - | systemd-private-192104a9224f499286f5adb5754e9e04-chronyd.service-FI2YXs | + | |
| </ | </ | ||
| - | Démontez maintenant le fichier ISO : | + | Il est aussi possible de modifier l' |
| < | < | ||
| - | [root@centos8 tmp]# cd ~ | + | root@debian11:~# vgcfgbackup |
| - | [root@centos8 ~]# umount / | + | Volume |
| - | </ | + | |
| - | + | ||
| - | ====Options de la Commande mkisofs==== | + | |
| - | + | ||
| - | Les options de cette commande sont : | + | |
| - | + | ||
| - | < | + | |
| - | [root@centos8 | + | |
| - | Usage: genisoimage [options] file... | + | |
| - | Options: | + | |
| - | -nobak | + | |
| - | -no-bak | + | |
| - | -abstract FILE Set Abstract filename | + | |
| - | -A ID, -appid ID Set Application ID | + | |
| - | -biblio FILE Set Bibliographic filename | + | |
| - | -cache-inodes | + | |
| - | -no-cache-inodes | + | |
| - | -check-oldnames | + | |
| - | -check-session FILE Check all ISO9660 names from previous session | + | |
| - | -copyright FILE Set Copyright filename | + | |
| - | -debug | + | |
| - | -b FILE, -eltorito-boot FILE | + | |
| - | Set El Torito boot image name | + | |
| - | -e FILE, -efi-boot FILE Set EFI boot image name | + | |
| - | -eltorito-alt-boot | + | |
| - | -B FILES, -sparc-boot FILES Set sparc boot image names | + | |
| - | -sunx86-boot FILES Set sunx86 boot image names | + | |
| - | -G FILE, -generic-boot FILE Set generic boot image name | + | |
| - | -sparc-label label text Set sparc boot disk label | + | |
| - | -sunx86-label label text Set sunx86 boot disk label | + | |
| - | -c FILE, -eltorito-catalog FILE | + | |
| - | Set El Torito boot catalog name | + | |
| - | -C PARAMS, -cdrecord-params PARAMS | + | |
| - | Magic paramters from cdrecord | + | |
| - | -d, -omit-period | + | |
| - | -dir-mode mode Make the mode of all directories this mode. | + | |
| - | -D, -disable-deep-relocation | + | |
| - | Disable deep directory relocation (violates ISO9660) | + | |
| - | -file-mode mode Make the mode of all plain files this mode. | + | |
| - | | + | |
| - | -gid gid Make the group owner of all files this gid. | + | |
| - | -graft-points | + | |
| - | -root DIR Set root directory for all new files and directories | + | |
| - | -old-root DIR Set root directory in previous session that is searched for files | + | |
| - | -help Print option help | + | |
| - | -hide GLOBFILE | + | |
| - | -hide-list FILE File with list of ISO9660/RR files to hide | + | |
| - | | + | |
| - | -hidden-list FILE File with list of ISO9660 files with hidden attribute | + | |
| - | -hide-joliet GLOBFILE | + | |
| - | -hide-joliet-list FILE File with list of Joliet files to hide | + | |
| - | -hide-joliet-trans-tbl | + | |
| - | -hide-rr-moved | + | |
| - | -gui Switch behaviour for GUI | + | |
| - | -i ADD_FILES | + | |
| - | -input-charset CHARSET | + | |
| - | -output-charset CHARSET | + | |
| - | -iso-level LEVEL Set ISO9660 conformance level (1..3) or 4 for ISO9660 version 2 | + | |
| - | -J, -joliet | + | |
| - | -joliet-long | + | |
| - | -jcharset CHARSET | + | |
| - | -l, -full-iso9660-filenames Allow full 31 character filenames for ISO9660 names | + | |
| - | -max-iso9660-filenames | + | |
| - | -allow-limited-size | + | |
| - | -allow-leading-dots | + | |
| - | -ldots | + | |
| - | -L, -allow-leading-dots | + | |
| - | -log-file LOG_FILE | + | |
| - | -m GLOBFILE, -exclude GLOBFILE | + | |
| - | Exclude file name | + | |
| - | -exclude-list FILE File with list of file names to exclude | + | |
| - | -pad Pad output to a multiple of 32k (default) | + | |
| - | -no-pad | + | |
| - | -M FILE, -prev-session FILE Set path to previous session to merge | + | |
| - | -dev SCSIdev | + | |
| - | -N, -omit-version-number | + | |
| - | -new-dir-mode mode Mode used when creating new directories. | + | |
| - | -force-rr | + | |
| - | -no-rr | + | |
| - | -no-split-symlink-components | + | |
| - | Inhibit splitting symlink components | + | |
| - | -no-split-symlink-fields | + | |
| - | -o FILE, -output FILE Set output file name | + | |
| - | -path-list FILE File with list of pathnames to process | + | |
| - | -p PREP, -preparer PREP | + | |
| - | -print-size | + | |
| - | -publisher PUB Set Volume publisher | + | |
| - | -P PUB, -publisher PUB Set Volume publisher | + | |
| - | -quiet | + | |
| - | -r, -rational-rock | + | |
| - | -R, -rock | + | |
| - | -s TYPE, -sectype TYPE Set output sector type to e.g. data/ | + | |
| - | -alpha-boot FILE Set alpha boot image name (relative to image root) | + | |
| - | -hppa-cmdline CMDLINE | + | |
| - | -hppa-kernel-32 FILE Set hppa 32-bit image name (relative to image root) | + | |
| - | -hppa-kernel-64 FILE Set hppa 64-bit image name (relative to image root) | + | |
| - | -hppa-bootloader FILE Set hppa boot loader file name (relative to image root) | + | |
| - | -hppa-ramdisk FILE Set hppa ramdisk file name (relative to image root) | + | |
| - | -mips-boot FILE Set mips boot image name (relative to image root) | + | |
| - | -mipsel-boot FILE Set mipsel boot image name (relative to image root) | + | |
| - | -jigdo-jigdo FILE | + | |
| - | -jigdo-template FILE Produce a jigdo .template file as well as the .iso | + | |
| - | -jigdo-min-file-size SIZE | + | |
| - | -jigdo-force-md5 PATTERN | + | |
| - | -jigdo-exclude PATTERN | + | |
| - | -jigdo-map PATTERN1=PATTERN2 | + | |
| - | Pattern(s) to map paths (e.g. Debian=/ | + | |
| - | -md5-list FILE File containing MD5 sums of the files that should be checked | + | |
| - | -jigdo-template-compress ALGORITHM | + | |
| - | Choose to use gzip or bzip2 compression for template data; default is gzip | + | |
| - | -checksum_algorithm_iso alg1, | + | |
| - | Specify the checksum types desired for the output image | + | |
| - | -checksum_algorithm_template alg1, | + | |
| - | Specify the checksum types desired for the output jigdo template | + | |
| - | -sort FILE Sort file content locations according to rules in FILE | + | |
| - | -split-output | + | |
| - | -stream-file-name FILE_NAME Set the stream file ISO9660 name (incl. version) | + | |
| - | -stream-media-size # Set the size of your CD media in sectors | + | |
| - | -sysid ID Set System ID | + | |
| - | -T, -translation-table | + | |
| - | -table-name TABLE_NAME | + | |
| - | -ucs-level LEVEL Set Joliet UCS level (1..3) | + | |
| - | -udf Generate UDF file system | + | |
| - | -dvd-video | + | |
| - | -uid uid Make the owner of all files this uid. | + | |
| - | -U, -untranslated-filenames Allow Untranslated filenames (for HPUX & AIX - violates ISO9660). Forces -l, -d, -N, -allow-leading-dots, | + | |
| - | -relaxed-filenames | + | |
| - | -no-iso-translate | + | |
| - | -allow-lowercase | + | |
| - | -allow-multidot | + | |
| - | -use-fileversion LEVEL Use file version # from filesystem | + | |
| - | -v, -verbose | + | |
| - | -version | + | |
| - | -V ID, -volid ID Set Volume ID | + | |
| - | -volset ID Set Volume set ID | + | |
| - | -volset-size # Set Volume set size | + | |
| - | -volset-seqno # Set Volume set sequence number | + | |
| - | -x FILE, -old-exclude FILE Exclude file name(depreciated) | + | |
| - | -hard-disk-boot | + | |
| - | -no-emul-boot | + | |
| - | -no-boot | + | |
| - | -boot-load-seg # Set load segment for boot image | + | |
| - | -boot-load-size # Set numbers of load sectors | + | |
| - | -boot-info-table | + | |
| - | -XA | + | |
| - | -xa | + | |
| - | -z, -transparent-compression | + | |
| - | Enable transparent compression of files | + | |
| - | -hfs-type TYPE Set HFS default TYPE | + | |
| - | -hfs-creator CREATOR | + | |
| - | -g, -apple | + | |
| - | -h, -hfs Create ISO9660/HFS hybrid | + | |
| - | -map MAPPING_FILE | + | |
| - | -H MAPPING_FILE, | + | |
| - | Map file extensions to HFS TYPE/ | + | |
| - | -magic FILE Magic file for HFS TYPE/ | + | |
| - | -probe | + | |
| - | -mac-name | + | |
| - | -no-mac-files | + | |
| - | -boot-hfs-file FILE Set HFS boot image name | + | |
| - | -part | + | |
| - | -cluster-size SIZE Cluster size for PC Exchange Macintosh files | + | |
| - | -auto FILE Set HFS AutoStart file name | + | |
| - | -no-desktop | + | |
| - | -hide-hfs GLOBFILE | + | |
| - | -hide-hfs-list FILE List of HFS files to hide | + | |
| - | -hfs-volid HFS_VOLID | + | |
| - | -icon-position | + | |
| - | -root-info FILE | + | |
| - | -input-hfs-charset CHARSET | + | |
| - | -output-hfs-charset CHARSET Output charset for HFS file name conversion | + | |
| - | -hfs-unlock | + | |
| - | -hfs-bless FOLDER_NAME | + | |
| - | -hfs-parms PARAMETERS | + | |
| - | -prep-boot FILE PReP boot image file -- up to 4 are allowed | + | |
| - | -chrp-boot | + | |
| - | --cap Look for AUFS CAP Macintosh files | + | |
| - | --netatalk | + | |
| - | --double | + | |
| - | --ethershare | + | |
| - | --exchange | + | |
| - | --sgi Look for SGI Macintosh files | + | |
| - | --macbin | + | |
| - | --single | + | |
| - | --ushare | + | |
| - | --xinet | + | |
| - | --dave | + | |
| - | --sfm Look for SFM Macintosh files | + | |
| - | --osx-double | + | |
| - | --osx-hfs | + | |
| - | Report problems to debburn-devel@lists.alioth.debian.org. | + | root@debian11:~# ls /tmp |
| + | systemd-private-7644749265b24b9a8f6a8695c083cfaa-ModemManager.service-KFBiWe | ||
| + | systemd-private-7644749265b24b9a8f6a8695c083cfaa-systemd-logind.service-3fbzgg | ||
| + | systemd-private-7644749265b24b9a8f6a8695c083cfaa-systemd-timesyncd.service-Gyzrhf | ||
| + | vg0_backup | ||
| </ | </ | ||
| Ligne 2387: | Ligne 2185: | ||
| * //Disk Striping with Triple Distributed Parity// | * //Disk Striping with Triple Distributed Parity// | ||
| - | =====RAID Logiciel | + | ====LAB #9 - Mise en Place du RAID 5 Logiciel==== |
| - | ====Préparation du disque==== | + | ===9.1 - Préparer le disque=== |
| - | ===Partitionnement=== | + | Rappelez-vous avoir modifié les types de 4 partitions du disque |
| - | + | ||
| - | Suite à votre LAB de la leçon | + | |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# fdisk -l |
| + | 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 | ||
| - | Disk /dev/sda: 21.5 GB, 21474836480 | + | Device |
| - | Units = sectors of 1 * 512 = 512 bytes | + | / |
| + | / | ||
| + | / | ||
| + | |||
| + | |||
| + | Disk /dev/sdb: 64 GiB, 68719476736 | ||
| + | Disk model: QEMU HARDDISK | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| Sector size (logical/ | Sector size (logical/ | ||
| I/O size (minimum/ | I/O size (minimum/ | ||
| - | Disk label type: dos | ||
| - | Disk identifier: 0x000c5a90 | ||
| - | | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | </ | ||
| - | ====Mise en Place du RAID 5 Logiciel==== | + | 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 : | Dans le cas de cet exemple les quatre partitions concernées par la mise en place d'un RAID 5 sont : | ||
| < | < | ||
| - | /dev/sda5 25085952 | + | /dev/sdc5 618496 1642495 1024000 |
| - | /dev/sda8 27140096 | + | /dev/sdc8 |
| - | /dev/sda10 | + | /dev/sdc10 4519936 5543935 1024000 |
| - | /dev/sda11 | + | /dev/sdc11 5545984 6569983 1024000 |
| </ | </ | ||
| + | |||
| + | ===9.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 : | La création d'une unité RAID avec la commande **mdadm** se fait grâce aux options passées en arguments à la commande : | ||
| Ligne 2437: | Ligne 2272: | ||
| </ | </ | ||
| - | Par exemple, saisissez la commande suivante | + | Sous Debian 11, mdadm n'est pas installé par défaut |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# apt-get -y install mdadm |
| + | </ | ||
| + | |||
| + | 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: Defaulting to version 1.2 metadata | ||
| mdadm: array /dev/md1 started. | mdadm: array /dev/md1 started. | ||
| Ligne 2451: | Ligne 2295: | ||
| | -n | - -raid-devices=< | | -n | - -raid-devices=< | ||
| - | Les autres | + | Les options de la commande **mdadm** |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# mdadm --help-options |
| Any parameter that does not start with ' | Any parameter that does not start with ' | ||
| or, for --examine-bitmap, | or, for --examine-bitmap, | ||
| Ligne 2487: | Ligne 2331: | ||
| </ | </ | ||
| - | Les //modes majeurs// de la commande **mdadm** | + | La commande **mdadm** |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# mdadm --help |
| mdadm is used for building, managing, and monitoring | mdadm is used for building, managing, and monitoring | ||
| Linux md devices (aka RAID arrays) | Linux md devices (aka RAID arrays) | ||
| Ligne 2523: | Ligne 2367: | ||
| </ | </ | ||
| - | Dernièrement, | + | Chaque sous-commande bénéficie d' |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# mdadm --create |
| - | Usage: mdadm --assemble | + | Usage: |
| - | | + | |
| - | This usage assembles one or more raid arrays from pre-existing | + | This usage will initialise a new md array, |
| - | components. | + | |
| - | For each array, | + | |
| - | the array, | + | place of the relevant device name. |
| - | of ways. | + | |
| - | The md device is given on the command line, is found listed in the | + | |
| - | config file, or can be deduced from the array identity. | + | raid superblocks or filesystems. |
| - | The array identity is determined either from the --uuid, --name, or | + | the variance in device |
| - | --super-minor commandline arguments, from the config file, | + | If any discrepancy |
| - | or from the first component device on the command line. | + | before |
| + | caution. | ||
| - | The different combinations of these are as follows: | + | If the --size option is given then only that many kilobytes of each |
| - | If the --scan option is not given, then only devices and identities | + | |
| - | listed on the command line are considered. | + | |
| - | The first device | + | |
| - | | + | other levels. |
| - | | + | |
| - | only devices with a superblock which matches that identity | + | |
| - | | + | |
| - | If the --scan option | + | Options that are valid with --create (-C) are: |
| - | every array listed | + | --bitmap= |
| - | The identity | + | : or an internal bitmap if ' |
| - | After these arrays are assembled, mdadm will look for other devices | + | --chunk= |
| - | that could form further arrays and tries to assemble them. | + | --rounding= |
| - | be disabled using the ' | + | --level= |
| + | --parity= | ||
| + | | ||
| + | --raid-devices= | ||
| + | --spare-devices= | ||
| + | --size= | ||
| + | --data-offset= | ||
| + | : of array data. | ||
| + | --force | ||
| + | : insert a missing drive for RAID5. | ||
| + | | ||
| + | : devices are present or some look odd. | ||
| + | --readonly | ||
| + | | ||
| + | | ||
| + | --delay= | ||
| + | | ||
| + | --consistency-policy= : Specify | ||
| + | -k : maintains consistency in case of unexpected shutdown. | ||
| + | </ | ||
| - | If the --scan option is given as well as one or more devices, then | + | Les //modes majeurs// de la commande **mdadm** peuvent être visualisés grâce à la commande suivante : |
| - | Those devices are md devices that are to be assembled. | + | |
| - | and components are determined from the config file. | + | |
| - | | + | < |
| - | it but not activate it unless | + | root@debian8: |
| - | behaviour even with --scan, add --no-degraded. Note that "all of the | + | mdadm is used for building, managing, and monitoring |
| - | components" | + | Linux md devices (aka RAID arrays) |
| - | | + | Usage: mdadm --create device options... |
| - | the missing | + | Create a new array from unused devices. |
| - | | + | |
| + | | ||
| + | | ||
| + | Create or assemble an array without metadata. | ||
| + | | ||
| + | make changes to an existing array. | ||
| + | | ||
| + | | ||
| + | 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 | ||
| + | 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. | ||
| - | Options that are valid with --assemble (-A) are: | + | For detailed help on the above major modes use --help after the mode |
| - | --bitmap= | + | e.g. |
| - | --uuid= | + | mdadm --assemble |
| - | have this uuid are excluded | + | For general help on options use |
| - | --super-minor= -m : minor number to look for in super-block when | + | mdadm --help-options |
| - | | + | |
| - | | + | |
| - | --config= | + | |
| - | --scan | + | |
| - | --run | + | |
| - | for a full array are present | + | |
| - | --force | + | |
| - | : out-of-date. This involves modifying the superblocks. | + | |
| - | --update= | + | |
| - | | + | |
| - | --readonly | + | |
| </ | </ | ||
| Ligne 2591: | Ligne 2456: | ||
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# cat / |
| Personalities : [raid6] [raid5] [raid4] | Personalities : [raid6] [raid5] [raid4] | ||
| - | md1 : active raid5 sda11[3] sda8[1] sda5[0] | + | md1 : active raid5 sdc10[3] sdc8[1] sdc5[0] |
| - | | + | |
| | | ||
| unused devices: < | unused devices: < | ||
| Ligne 2602: | Ligne 2467: | ||
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# mdadm --query /dev/md1 |
| - | / | + | / |
| </ | </ | ||
| Ligne 2609: | Ligne 2474: | ||
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# mdadm --detail /dev/md1 |
| /dev/md1: | /dev/md1: | ||
| - | | + | Version : 1.2 |
| - | Creation Time : Tue Aug 2 15:10:12 2016 | + | |
| - | | + | Raid Level : raid5 |
| - | | + | Array Size : 1019904 |
| - | Used Dev Size : 510976 | + | |
| - | | + | Raid Devices : 3 |
| - | Total Devices : 3 | + | |
| - | Persistence : Superblock is persistent | + | |
| - | | + | Update Time : Sun May 1 13:27:53 2022 |
| - | State : clean | + | |
| - | | + | Active Devices : 3 |
| - | Working Devices : 3 | + | |
| - | | + | Failed Devices : 0 |
| - | Spare Devices : 0 | + | |
| - | Layout : left-symmetric | + | |
| - | | + | Chunk Size : 512K |
| - | Name : centos7.fenestros.loc:1 (local to host centos7.fenestros.loc) | + | Consistency Policy : resync |
| - | | + | |
| - | | + | |
| + | UUID : c0f945a0:f65b2136:b7913f8a:3707ffa2 | ||
| + | Events : 18 | ||
| Number | 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. | 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. | ||
| - | <WRAP center round todo> | + | Cependant, il necéssaire de renseigner le fichier **/ |
| - | Recherchez la signification des termes Layout, Chunk size, Major et Minor. | + | |
| - | </WRAP> | + | <code> |
| + | 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, specify devices to scan, using | ||
| + | # 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 / | ||
| + | ARRAY /dev/md1 metadata=1.2 name=debian11: | ||
| + | </code> | ||
| - | Cependant, il necéssaire de renseigner le fichier **/ | + | Mettez |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# update-initramfs |
| - | [root@centos7 ~]# mdadm --detail | + | update-initramfs: Generating |
| - | [root@centos7 ~]# cat /etc/mdadm.conf | + | |
| - | DEVICES /dev/sda5 /dev/sda8 / | + | |
| - | ARRAY /dev/md1 metadata=1.2 name=centos7.fenestros.loc: | + | |
| </ | </ | ||
| Ligne 2659: | Ligne 2557: | ||
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# mdadm --examine /dev/sdc5 |
| - | /dev/sda5: | + | /dev/sdc5: |
| Magic : a92b4efc | Magic : a92b4efc | ||
| Version : 1.2 | Version : 1.2 | ||
| Feature Map : 0x0 | Feature Map : 0x0 | ||
| - | Array UUID : fd8bac53:1457a4f4:30feab84:e0f9d8e0 | + | Array UUID : c0f945a0:f65b2136:b7913f8a:3707ffa2 |
| - | Name : centos7.fenestros.loc:1 (local to host centos7.fenestros.loc) | + | Name : debian11:1 (local to host debian11) |
| - | Creation Time : Tue Aug 2 15:10:12 2016 | + | Creation Time : Sun May 1 13:27:48 2022 |
| Raid Level : raid5 | Raid Level : raid5 | ||
| Raid Devices : 3 | Raid Devices : 3 | ||
| - | Avail Dev Size : 1021952 | + | Avail Dev Size : 1019904 |
| - | Array Size : 1021952 | + | Array Size : 1019904 |
| - | Data Offset : 2048 sectors | + | Data Offset : 4096 sectors |
| Super Offset : 8 sectors | Super Offset : 8 sectors | ||
| - | | + | |
| State : clean | State : clean | ||
| - | Device UUID : 4569e15e:20201bce:365776f2:75aed23f | + | Device UUID : 1d34dda2:28775dbb:53d242e9:9acba5dd |
| - | Update Time : Tue Aug 2 15:10:17 2016 | + | Update Time : Sun May 1 13:27:53 2022 |
| - | Bad Block Log : 512 entries available at offset | + | Bad Block Log : 512 entries available at offset |
| - | | + | |
| | | ||
| Ligne 2690: | Ligne 2588: | ||
| </ | </ | ||
| - | 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/sda5 est devenue défaillante : | + | ===9.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@centos7 | + | root@debian11:~# mdadm --manage --set-faulty /dev/md1 /dev/sdc5 |
| - | mdadm: set /dev/sda5 faulty in /dev/md1 | + | mdadm: set /dev/sdc5 faulty in /dev/md1 |
| </ | </ | ||
| - | L' | + | L' |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# mdadm --detail /dev/md1 |
| /dev/md1: | /dev/md1: | ||
| - | | + | Version : 1.2 |
| - | Creation Time : Tue Aug 2 15:10:12 2016 | + | |
| - | | + | Raid Level : raid5 |
| - | | + | Array Size : 1019904 |
| - | Used Dev Size : 510976 | + | |
| - | | + | Raid Devices : 3 |
| - | Total Devices : 3 | + | |
| - | Persistence : Superblock is persistent | + | |
| - | | + | Update Time : Sun May 1 13:43:24 2022 |
| - | State : clean, degraded | + | |
| - | | + | Active Devices : 2 |
| - | Working Devices : 2 | + | |
| - | | + | Failed Devices : 1 |
| - | Spare Devices : 0 | + | |
| - | Layout : left-symmetric | + | |
| - | | + | Chunk Size : 512K |
| + | |||
| + | Consistency Policy : resync | ||
| - | Name : centos7.fenestros.loc:1 (local to host centos7.fenestros.loc) | + | |
| - | | + | UUID : c0f945a0:f65b2136:b7913f8a:3707ffa2 |
| - | | + | Events : 20 |
| Number | Number | ||
| - | 0 0 0 0 removed | + | - 0 0 0 removed |
| - | | + | |
| - | | + | |
| - | | + | |
| </ | </ | ||
| - | Il est maintenant nécessaire de supprimer /dev/sda5 de notre RAID 5 : | + | Il est maintenant nécessaire de supprimer /dev/sdc5 de notre RAID 5 : |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# mdadm --manage --remove /dev/md1 /dev/sdc5 |
| - | mdadm: hot removed /dev/sda5 from /dev/md1 | + | mdadm: hot removed /dev/sdc5 from /dev/md1 |
| </ | </ | ||
| - | A l' | + | A l' |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# mdadm --detail /dev/md1 |
| /dev/md1: | /dev/md1: | ||
| - | | + | Version : 1.2 |
| - | Creation Time : Tue Aug 2 15:10:12 2016 | + | |
| - | | + | Raid Level : raid5 |
| - | | + | Array Size : 1019904 |
| - | Used Dev Size : 510976 | + | |
| - | | + | Raid Devices : 3 |
| - | Total Devices : 2 | + | |
| - | Persistence : Superblock is persistent | + | |
| - | | + | Update Time : Sun May 1 13:44:41 2022 |
| - | State : clean, degraded | + | |
| - | | + | Active Devices : 2 |
| - | Working Devices : 2 | + | |
| - | | + | Failed Devices : 0 |
| - | Spare Devices : 0 | + | |
| - | Layout : left-symmetric | + | |
| - | | + | Chunk Size : 512K |
| + | |||
| + | Consistency Policy : resync | ||
| - | Name : centos7.fenestros.loc:1 (local to host centos7.fenestros.loc) | + | |
| - | | + | UUID : c0f945a0:f65b2136:b7913f8a:3707ffa2 |
| - | | + | Events : 21 |
| Number | Number | ||
| - | 0 0 0 0 removed | + | - 0 0 0 removed |
| - | | + | |
| - | | + | |
| </ | </ | ||
| Ligne 2777: | Ligne 2681: | ||
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# cat / |
| Personalities : [raid6] [raid5] [raid4] | Personalities : [raid6] [raid5] [raid4] | ||
| - | md1 : active raid5 sda11[3] sda8[1] | + | md1 : active raid5 sdc10[3] sdc8[1] |
| - | | + | |
| | | ||
| unused devices: < | unused devices: < | ||
| Ligne 2786: | Ligne 2690: | ||
| <WRAP center round important> | <WRAP center round important> | ||
| - | Notez que le RAID a été démarré avec 2 unités au lieu de trois. | + | **iMPORTANT** - Notez que le RAID a 2 unités au lieu de trois. |
| </ | </ | ||
| - | Pour ajouter un autre disque à notre RAID afin de remplacer | + | Nous avons déjà utilisé **/dev/sdc11** pour héberger LUKs. Constatez le statut de celui-ci : |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# umount |
| - | mdadm: added /dev/sda10 | + | |
| + | root@debian11: | ||
| + | /dev/mapper/ | ||
| + | type: | ||
| + | cipher: | ||
| + | keysize: 512 bits | ||
| + | key location: keyring | ||
| + | device: | ||
| + | sector size: 512 | ||
| + | offset: | ||
| + | size: 991232 sectors | ||
| + | mode: read/write | ||
| </ | </ | ||
| - | L' | + | Avant de supprimer LUKs, il convient de supprimer la dernière passphrase |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# cryptsetup luksRemoveKey / |
| + | 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 / | ||
| + | </ | ||
| + | |||
| + | L' | ||
| + | |||
| + | < | ||
| + | root@debian11: | ||
| /dev/md1: | /dev/md1: | ||
| - | | + | Version : 1.2 |
| - | Creation Time : Tue Aug 2 15:10:12 2016 | + | |
| - | | + | Raid Level : raid5 |
| - | | + | Array Size : 1019904 |
| - | Used Dev Size : 510976 | + | |
| - | | + | Raid Devices : 3 |
| - | Total Devices : 3 | + | |
| - | Persistence : Superblock is persistent | + | |
| - | | + | Update Time : Sun May 1 14:03:05 2022 |
| - | State : clean | + | |
| - | | + | Active Devices : 2 |
| - | Working Devices : 3 | + | |
| - | | + | Failed Devices : 0 |
| - | Spare Devices : 0 | + | |
| - | Layout : left-symmetric | + | |
| - | | + | Chunk Size : 512K |
| - | Name : centos7.fenestros.loc:1 (local to host centos7.fenestros.loc) | + | Consistency Policy : resync |
| - | | + | |
| - | | + | Rebuild Status : 56% complete |
| + | |||
| + | | ||
| + | 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: | ||
| + | | ||
| + | Events : 40 | ||
| Number | Number | ||
| - | | + | |
| - | | + | |
| - | | + | |
| </ | </ | ||
| - | Naturellement, | + | Vérifiez la prise en compte |
| < | < | ||
| - | [root@centos7 | + | root@debian11:~# lsblk |
| - | [root@centos7 ~]# mdadm --detail | + | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT |
| - | [root@centos7 | + | sda |
| - | DEVICES /dev/sda10 /dev/sda8 / | + | ├─sda1 |
| - | ARRAY /dev/md1 metadata=1.2 name=centos7.fenestros.loc:1 UUID=fd8bac53: | + | ├─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:~# cat /proc/mdstatPersonalities : [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, |
| - | Copyright © 2022 Hugh Norris. | + | |
| + | < | ||
| + | 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: | ||
| + | </ | ||
| + | |||
| + | =====LAB #10 - autofs===== | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# apt install autofs | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# systemctl enable --now autofs | ||
| + | Created symlink / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# systemctl status autofs | ||
| + | ● autofs.service - Automounts filesystems on demand | ||
| + | | ||
| + | | ||
| + | Main PID: 67631 (automount) | ||
| + | Tasks: 5 (limit: 100949) | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | Oct 11 09:26:39 centos8.ittraining.loc systemd[1]: Starting Automounts filesystems on demand... | ||
| + | Oct 11 09:26:39 centos8.ittraining.loc systemd[1]: Started Automounts filesystems on demand. | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# cat / | ||
| + | # | ||
| + | # Init system options | ||
| + | # | ||
| + | # If the kernel supports using the autofs miscellanous device | ||
| + | # and you wish to use it you must set this configuration option | ||
| + | # to " | ||
| + | # | ||
| + | USE_MISC_DEVICE=" | ||
| + | # | ||
| + | # Use OPTIONS to add automount(8) command line options that | ||
| + | # will be used when the daemon is started. | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# vi / | ||
| + | [root@centos8 ~]# cat / | ||
| + | # | ||
| + | # Init system options | ||
| + | # | ||
| + | # If the kernel supports using the autofs miscellanous device | ||
| + | # and you wish to use it you must set this configuration option | ||
| + | # to " | ||
| + | # | ||
| + | USE_MISC_DEVICE=" | ||
| + | # | ||
| + | # Use OPTIONS to add automount(8) command line options that | ||
| + | # will be used when the daemon is started. | ||
| + | # | ||
| + | OPTIONS=" | ||
| + | # | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# systemctl restart autofs | ||
| + | [root@centos8 ~]# systemctl status autofs | ||
| + | ● autofs.service - Automounts filesystems on demand | ||
| + | | ||
| + | | ||
| + | Main PID: 67756 (automount) | ||
| + | Tasks: 5 (limit: 100949) | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | Oct 11 09:32:05 centos8.ittraining.loc systemd[1]: Starting Automounts filesystems on demand... | ||
| + | Oct 11 09:32:06 centos8.ittraining.loc systemd[1]: Started Automounts filesystems on demand. | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# cat / | ||
| + | # | ||
| + | # Sample auto.master file | ||
| + | # This is a ' | ||
| + | # mount-point [map-type[, | ||
| + | # For details of the format look at auto.master(5). | ||
| + | # | ||
| + | /misc / | ||
| + | # | ||
| + | # NOTE: mounts done from a hosts map will be mounted with the | ||
| + | # " | ||
| + | # | ||
| + | # | ||
| + | /net -hosts | ||
| + | # | ||
| + | # Include / | ||
| + | # The included files must conform to the format of this file. | ||
| + | # | ||
| + | +dir:/ | ||
| + | # | ||
| + | # If you have fedfs set up and the related binaries, either | ||
| + | # built as part of autofs or installed from another package, | ||
| + | # uncomment this line to use the fedfs program map to access | ||
| + | # your fedfs mounts. | ||
| + | #/ | ||
| + | # | ||
| + | # Include central master map if it can be found using | ||
| + | # nsswitch sources. | ||
| + | # | ||
| + | # Note that if there are entries for /net or /misc (as | ||
| + | # above) in the included master map any keys that are the | ||
| + | # same will not be seen as the first read key seen takes | ||
| + | # precedence. | ||
| + | # | ||
| + | +auto.master | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [root@centos8 ~]# cat / | ||
| + | # | ||
| + | # This is an automounter map and it has the following format | ||
| + | # key [ -mount-options-separated-by-comma ] location | ||
| + | # Details may be found in the autofs(5) manpage | ||
| + | |||
| + | cd -fstype=iso9660, | ||
| + | |||
| + | # the following entries are samples to pique your imagination | ||
| + | # | ||
| + | #boot | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | #jaz -fstype=ext2 | ||
| + | # | ||
| + | </ | ||
| + | ----- | ||
| + | Copyright © 2022 Hugh Norris. | ||