adminsys:partition
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
adminsys:partition [2020/01/25 18:30] – créée tonio | adminsys:partition [2023/04/22 16:57] – [Étendre votre disque] tonio | ||
---|---|---|---|
Ligne 15: | Ligne 15: | ||
- | Disk /dev/sdb: 20 GiB, 214179869184 bytes, 39854554432 sectors | + | Disk /dev/sdc: 40 GiB, 214179869184 bytes, 39854554432 sectors |
Units: sectors of 1 * 512 = 512 bytes | Units: sectors of 1 * 512 = 512 bytes | ||
Sector size (logical/ | Sector size (logical/ | ||
I/O size (minimum/ | I/O size (minimum/ | ||
</ | </ | ||
+ | |||
+ | ===== Créer la partition et mettre la partition en type LVM: 8e ===== | ||
+ | |||
+ | < | ||
+ | fdisk / | ||
+ | fdisk /dev/sdc | ||
+ | n : new / p : primary / 1: partition / t : 8e / w : write / q : sortir | ||
+ | </ | ||
+ | |||
+ | ===== Création de la partition en " | ||
+ | |||
+ | La partition doit maintenant être transformée, | ||
+ | |||
+ | PVCREATE /physique | ||
+ | < | ||
+ | pvcreate / | ||
+ | pvcreate /dev/sdc1 | ||
+ | |||
+ | | ||
+ | </ | ||
+ | **Afficher les informations sur les volumes physiques en LVM:** | ||
+ | < | ||
+ | pvdisplay | ||
+ | |||
+ | "/ | ||
+ | --- NEW Physical volume --- | ||
+ | PV Name / | ||
+ | VG Name | ||
+ | PV Size | ||
+ | Allocatable | ||
+ | PE Size 0 | ||
+ | Total PE 0 | ||
+ | Free PE 0 | ||
+ | Allocated PE 0 | ||
+ | PV UUID | ||
+ | </ | ||
+ | |||
+ | ==== Création des volumes groupes (VG) à partir des PV ==== | ||
+ | |||
+ | VGCREATE NOMVOLUMEGROUPE /physique | ||
+ | < | ||
+ | vgcreate Nom-Volume-Groupe / | ||
+ | vgcreate VolGRDATA00 /dev/sdc1 | ||
+ | |||
+ | |||
+ | **Afficher les informations sur les groupes de volumes physiques :** | ||
+ | < | ||
+ | vgdisplay | ||
+ | </ | ||
+ | |||
+ | ===== Création des volumes logiques (LV) à partir des VG ===== | ||
+ | LVCREATE NOMVOLUMELOGIQUE VOLUMEGROUPE | ||
+ | < | ||
+ | lvcreate -n Nom-Du-Volume-Logique -L 39g Nom-Volume-Groupe | ||
+ | lvcreate -n data -L 39g VolGRDATA00 | ||
+ | </ | ||
+ | |||
+ | **Afficher les informations sur les volumes logiques :** | ||
+ | < | ||
+ | lvdisplay | ||
+ | </ | ||
+ | |||
+ | **Agrandir le volume logique:** | ||
+ | < | ||
+ | lvextend -l100%VG Nom-Volume-Groupe/ | ||
+ | lvextend -l100%VG VolGRDATA00/ | ||
+ | </ | ||
+ | |||
+ | ===== Formatage du volume logique ===== | ||
+ | |||
+ | < | ||
+ | mkfs.ext4 / | ||
+ | mkfs.ext4 / | ||
+ | </ | ||
+ | |||
+ | ===== Ajouter du volume dans /etc/fstab ===== | ||
+ | |||
+ | < | ||
+ | echo "UUID= / | ||
+ | tune2fs -l / | ||
+ | </ | ||
+ | |||
+ | **Faire les modifications dans / | ||
+ | < | ||
+ | vi /etc/fstab | ||
+ | </ | ||
+ | |||
+ | |||
+ | ** Vérifier bien la nouvelle ligne** | ||
+ | |||
+ | < | ||
+ | cat /etc/fstab | grep UUID | ||
+ | UUID=XXXX-XXXX-XXXX-XXXX-XXXX / | ||
+ | </ | ||
+ | |||
+ | ===== Monter le disque ===== | ||
+ | < | ||
+ | mkdir -p /data1 | ||
+ | mount -a | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Étendre votre disque | ||
+ | < | ||
+ | [sam. avril 22 18:50:51] root@extra: | ||
+ | Disk /dev/xvdb: 500 GiB, 536870912000 bytes, 1048576000 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disklabel type: dos | ||
+ | Disk identifier: 0x047bacf3 | ||
+ | |||
+ | 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/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | [sam. avril 22 18:56:31] root@extra: | ||
+ | |||
+ | Disk /dev/xvdb: 600 GiB, 644245094400 bytes, 1258291200 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disklabel type: dos | ||
+ | Disk identifier: 0x047bacf3 | ||
+ | |||
+ | 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/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | </ | ||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ |
adminsys/partition.txt · Dernière modification : 2023/04/22 17:21 de tonio