Mudanças entre as edições de "Ubuntu:Disco virtual"
Ir para navegação
Ir para pesquisar
| Linha 24: | Linha 24: | ||
= Expandir disco no Ubuntu = | = Expandir disco no Ubuntu = | ||
lvextend -L +10G -r /dev/mapper/vg0-root | lvextend -L +10G -r /dev/mapper/vg0-root | ||
| + | |||
| + | = Montando um volume lógico = | ||
| + | Visualizar os volumes lógicos | ||
| + | lvdisplay | ||
| + | Resposta | ||
| + | --- Logical volume --- | ||
| + | LV Path /dev/ubuntu-vg/ubuntu-lv | ||
| + | LV Name ubuntu-lv | ||
| + | VG Name ubuntu-vg | ||
| + | LV UUID RHGCgX-qC4c-mvd7-XrfU-tyCP-Li2Y-MvdQ94 | ||
| + | LV Write Access read/write | ||
| + | LV Creation host, time ubuntu-server, 2024-09-17 23:08:05 +0000 | ||
| + | LV Status available | ||
| + | # open 1 | ||
| + | LV Size 100.00 GiB | ||
| + | Current LE 25600 | ||
| + | Segments 1 | ||
| + | Allocation inherit | ||
| + | Read ahead sectors auto | ||
| + | - currently set to 256 | ||
| + | Block device 252:0 | ||
| + | |||
| + | --- Logical volume --- | ||
| + | LV Path /dev/ubuntu-vg/ubuntu-lv | ||
| + | LV Name ubuntu-lv | ||
| + | VG Name ubuntu-vg | ||
| + | LV UUID 6f7nvc-Hz9x-zXFh-TkTT-bPKc-X1c7-vVj7Pz | ||
| + | LV Write Access read/write | ||
| + | LV Creation host, time ubuntu-server, 2023-01-17 17:42:52 +0000 | ||
| + | LV Status NOT available | ||
| + | LV Size <928.46 GiB | ||
| + | Current LE 237685 | ||
| + | Segments 1 | ||
| + | Allocation inherit | ||
| + | Read ahead sectors auto | ||
Edição das 11h25min de 18 de setembro de 2024
Índice
Expandindo partição LVM no Ubuntu
Espaço alocado em disco
# lsblk -f NAME FSTYPE MOUNTPOINT sda ├─sda1 ext2 /boot └─sda5 LVM2_member ├─ubuntu--vg-root ext4 / └─ubuntu--vg-swap_1 swap SWAP sr0
Mostrar as partições
#df -h Filesystem Size Used Avail Use% Mounted on tmpfs 1.6G 1.3M 1.6G 1% /run /dev/mapper/vg0-root 12G 4.2G 7.1G 37% / tmpfs 7.9G 0 7.9G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock /dev/sda2 987M 500M 420M 55% /boot /dev/mapper/vg0-home 974M 520K 906M 1% /home /dev/mapper/vg0-var 3.9G 1.6G 2.1G 43% /var /dev/mapper/vg0-tmp 974M 84K 907M 1% /tmp tmpfs 1.6G 4.0K 1.6G 1% /run/user/1015
Expandir disco no Ubuntu
lvextend -L +10G -r /dev/mapper/vg0-root
Montando um volume lógico
Visualizar os volumes lógicos
lvdisplay
Resposta
--- Logical volume --- LV Path /dev/ubuntu-vg/ubuntu-lv LV Name ubuntu-lv VG Name ubuntu-vg LV UUID RHGCgX-qC4c-mvd7-XrfU-tyCP-Li2Y-MvdQ94 LV Write Access read/write LV Creation host, time ubuntu-server, 2024-09-17 23:08:05 +0000 LV Status available # open 1 LV Size 100.00 GiB Current LE 25600 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 252:0 --- Logical volume --- LV Path /dev/ubuntu-vg/ubuntu-lv LV Name ubuntu-lv VG Name ubuntu-vg LV UUID 6f7nvc-Hz9x-zXFh-TkTT-bPKc-X1c7-vVj7Pz LV Write Access read/write LV Creation host, time ubuntu-server, 2023-01-17 17:42:52 +0000 LV Status NOT available LV Size <928.46 GiB Current LE 237685 Segments 1 Allocation inherit Read ahead sectors auto