adminsys:partition
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 | ||
| adminsys:partition [2020/01/25 18:36] – [Monter le disque] tonio | adminsys:partition [2023/04/22 17:21] (Version actuelle) – [Étendre votre disque] tonio | ||
|---|---|---|---|
| Ligne 15: | Ligne 15: | ||
| - | Disk / | + | Disk / |
| Units: sectors of 1 * 512 = 512 bytes | Units: sectors of 1 * 512 = 512 bytes | ||
| Sector size (logical/ | Sector size (logical/ | ||
| Ligne 29: | Ligne 29: | ||
| </ | </ | ||
| - | ===== Conversion des partition en Physical Volumes (PV) ===== | + | ===== Création de la partition en "Physical Volumes" |
| - | Les partitions doivent | + | La partition doit maintenant être transformée, ou enregistrée |
| - | A: PVCREATE /physique | + | PVCREATE /physique |
| < | < | ||
| pvcreate / | pvcreate / | ||
| - | pvcreate /dev/sdb1 | + | pvcreate /dev/sdc1 |
| - | </ | + | |
| - | | + | |
| - | Afficher les informations sur les volumes physiques en LVM: | + | |
| + | </ | ||
| + | **Afficher les informations sur les volumes physiques en LVM:** | ||
| < | < | ||
| pvdisplay | pvdisplay | ||
| Ligne 54: | Ligne 54: | ||
| Free PE 0 | Free PE 0 | ||
| Allocated PE 0 | Allocated PE 0 | ||
| - | PV UUID | + | PV UUID BMFw-HNfA-Kdldji-jCH5JO-KILV-tYQq-aOFX |
| + | </ | ||
| - | B: VGCREATE NOMVOLUMEGROUPE /physique | + | ==== Création des volumes groupes (VG) à partir des PV ==== |
| + | |||
| + | VGCREATE NOMVOLUMEGROUPE /physique | ||
| < | < | ||
| vgcreate Nom-Volume-Groupe / | vgcreate Nom-Volume-Groupe / | ||
| - | vgcreate | + | vgcreate |
| - | </ | + | |
| - | Afficher les informations sur les groupes de volumes physiques : | + | **Afficher les informations sur les groupes de volumes physiques :** |
| < | < | ||
| vgdisplay | vgdisplay | ||
| </ | </ | ||
| - | C: LVCREATE NOMVOLUMELOGIQUE VOLUMEGROUPE | + | ===== 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 Nom-Du-Volume-Logique -L 39g Nom-Volume-Groupe | ||
| - | lvcreate -n data -L 39g VolGroup00 | + | lvcreate -n data -L 39g VolGRDATA00 |
| </ | </ | ||
| - | Afficher les informations sur les volumes logiques : | + | **Afficher les informations sur les volumes logiques :** |
| < | < | ||
| lvdisplay | lvdisplay | ||
| Ligne 81: | Ligne 85: | ||
| < | < | ||
| lvextend -l100%VG Nom-Volume-Groupe/ | lvextend -l100%VG Nom-Volume-Groupe/ | ||
| - | lvextend -l100%VG | + | lvextend -l100%VG |
| </ | </ | ||
| Ligne 88: | Ligne 92: | ||
| < | < | ||
| mkfs.ext4 / | mkfs.ext4 / | ||
| - | mkfs.ext4 / | + | mkfs.ext4 / |
| </ | </ | ||
| Ligne 94: | Ligne 98: | ||
| < | < | ||
| - | echo " | + | echo "UUID= / |
| - | tune2fs -l / | + | tune2fs -l / |
| </ | </ | ||
| + | |||
| + | **Faire les modifications dans / | ||
| + | < | ||
| vi /etc/fstab | vi /etc/fstab | ||
| </ | </ | ||
| - | FDF | ||
| - | .FD | ||
| - | ===== Vérifier bien la nouvelle ligne ===== | + | ** Vérifier bien la nouvelle ligne** |
| < | < | ||
| - | UUID=XXXX-XXXX-XXXX-XXXX-XXXX | + | cat /etc/fstab | grep UUID |
| + | UUID=XXXX-XXXX-XXXX-XXXX-XXXX / | ||
| </ | </ | ||
| - | ===== Monter le disque ===== | ||
| + | ===== Monter le disque ===== | ||
| < | < | ||
| mkdir -p /data1 | mkdir -p /data1 | ||
| mount -a | mount -a | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ===== Étendre votre disque | ||
| + | |||
| + | **Volumétrie initiale** | ||
| + | < | ||
| + | toot@extra: | ||
| + | Filesystem | ||
| + | / | ||
| + | |||
| + | [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/ | ||
| + | </ | ||
| + | |||
| + | **Volumétrie changée** | ||
| + | < | ||
| + | |||
| + | [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/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | **Extension de la partition** | ||
| + | < | ||
| + | [sam. avril 22 19:00:57] root@extra: | ||
| + | GNU Parted 3.4 | ||
| + | Using /dev/xvdb | ||
| + | Welcome to GNU Parted! Type ' | ||
| + | (parted) print | ||
| + | Model: Xen Virtual Block Device (xvd) | ||
| + | Disk /dev/xvdb: 644GB | ||
| + | Sector size (logical/ | ||
| + | Partition Table: msdos | ||
| + | Disk Flags: | ||
| + | |||
| + | Number | ||
| + | | ||
| + | |||
| + | (parted) resizepart 1 | ||
| + | End? [530GB]? 643GB | ||
| + | (parted) quit | ||
| + | Information: | ||
| + | |||
| + | </ | ||
| + | |||
| + | **Extension du volume physique: PV " | ||
| + | < | ||
| + | [sam. avril 22 19:02:00] root@extra: | ||
| + | Physical volume "/ | ||
| + | 1 physical volume(s) resized or updated / 0 physical volume(s) not resized | ||
| + | [sam. avril 22 19:04:24] root@extra: | ||
| + | PV | ||
| + | /dev/xvda3 ubuntu-vg lvm2 a-- < | ||
| + | /dev/xvdb1 EXTRA-VG | ||
| + | |||
| + | </ | ||
| + | **Extension du volume logique: LV " | ||
| + | < | ||
| + | root@extra: | ||
| + | LV VG Attr | ||
| + | DATA EXTRA-VG | ||
| + | root@extra: | ||
| + | Size of logical volume EXTRA-VG/ | ||
| + | Logical volume EXTRA-VG/ | ||
| + | root@extra: | ||
| + | LV VG Attr | ||
| + | DATA EXTRA-VG | ||
| + | root@extra: | ||
| + | ACTIVE | ||
| + | |||
| + | </ | ||
| + | **Extension du filesystem de la partition: LV " | ||
| + | < | ||
| + | [sam. avril 22 19:10:05] root@extra: | ||
| + | resize2fs 1.46.5 (30-Dec-2021) | ||
| + | Filesystem at / | ||
| + | old_desc_blocks = 62, new_desc_blocks = 75 | ||
| + | The filesystem on / | ||
| + | toot@extra: | ||
| + | Filesystem | ||
| + | / | ||
| + | |||
| + | </ | ||
| + | < | ||
| + | |||
| + | </ | ||
| + | < | ||
| + | |||
| + | </ | ||
| + | http:// | ||
| + | |||
adminsys/partition.1579977381.txt.gz · Dernière modification : 2020/01/25 18:36 de tonio
