9
Апр

Увеличение размера раздела ubuntu—vg-ubuntu—lv

При установке использовали автоматическую разметку диска. После входа в консоль, обнаружилось, что мне доступно только 100 GB из 500GB SSD диска. А где же оставшиеся 400 GB? Оказалось, что они есть, вот только не присоединены к разделу. Благо я в Ubuntu использую LVM.

Лечение (естественно, от root).

Находим нужный раздел диска:
Команда df -hT
[bash title=»код»]root@i:/home/ivan# df -hT
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 24G 0 24G 0% /dev
tmpfs tmpfs 4,8G 1,7M 4,8G 1% /run
/dev/mapper/ubuntu—vg-ubuntu—lv ext4 98G 22G 72G 24% /
tmpfs tmpfs 24G 0 24G 0% /dev/shm
tmpfs tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs tmpfs 24G 0 24G 0% /sys/fs/cgroup
/dev/nvme0n1p2 ext4 1,5G 110M 1,3G 8% /boot
/dev/loop0 squashfs 62M 62M 0 100% /snap/core20/1328
/dev/loop1 squashfs 44M 44M 0 100% /snap/snapd/14978
/dev/loop2 squashfs 68M 68M 0 100% /snap/lxd/21835
/dev/loop3 squashfs 44M 44M 0 100% /snap/snapd/15177
/dev/loop4 squashfs 62M 62M 0 100% /snap/core20/1405
/dev/loop5 squashfs 68M 68M 0 100% /snap/lxd/22753
tmpfs tmpfs 4,8G 0 4,8G 0% /run/user/1000[/bash]

Наш раздел:
/dev/mapper/ubuntu—vg-ubuntu—lv ext4 98G 22G 72G 24% /

Чиним. Увеличиваем раздел до 100% диска:
lvextend -l +100%FREE /dev/mapper/ubuntu—vg-ubuntu—lv

[bash title=»код»]root@i:/home/ivan# lvextend -l +100%FREE /dev/mapper/ubuntu—vg-ubuntu—lv
Size of logical volume ubuntu-vg/ubuntu-lv changed from 100,00 GiB (25600 extents) to <464,26 GiB (118850 extents).
Logical volume ubuntu-vg/ubuntu-lv successfully resized.[/bash]

Отдаём пространство под файловую систему:
resize2fs /dev/mapper/ubuntu—vg-ubuntu—lv

[bash title=»код»]root@i:/home/ivan# resize2fs /dev/mapper/ubuntu—vg-ubuntu—lv
resize2fs 1.45.5 (07-Jan-2020)
Filesystem at /dev/mapper/ubuntu—vg-ubuntu—lv is mounted on /; on-line resizing required
old_desc_blocks = 13, new_desc_blocks = 59
The filesystem on /dev/mapper/ubuntu—vg-ubuntu—lv is now 121702400 (4k) blocks long.[/bash]

Проверяем:
df -h

[bash title=»код»]root@i:/home/ivan# df -h
Filesystem Size Used Avail Use% Mounted on
udev 24G 0 24G 0% /dev
tmpfs 4,8G 1,7M 4,8G 1% /run
/dev/mapper/ubuntu—vg-ubuntu—lv 457G 22G 416G 5% /
tmpfs 24G 0 24G 0% /dev/shm
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 24G 0 24G 0% /sys/fs/cgroup
/dev/nvme0n1p2 1,5G 110M 1,3G 8% /boot
/dev/loop0 62M 62M 0 100% /snap/core20/1328
/dev/loop1 44M 44M 0 100% /snap/snapd/14978
/dev/loop2 68M 68M 0 100% /snap/lxd/21835
/dev/loop3 44M 44M 0 100% /snap/snapd/15177
/dev/loop4 62M 62M 0 100% /snap/core20/1405
/dev/loop5 68M 68M 0 100% /snap/lxd/22753
tmpfs 4,8G 0 4,8G 0% /run/user/1000[/bash]

Как видим, /dev/mapper/ubuntu—vg-ubuntu—lv стал 457G

Обратная связь

    The average number of adverse effects was 3. T max is 23 minutes in females and 32 minutes in males. What other drugs will affect doxercalciferol Viagra natural sin receta. Archived from the original on 2009-08-14.

    Talk to your doctor before using this form of cefadroxil if you have diabetes. What should I tell my healthcare team before starting CABLIVI? There is no FDA guidance on the use of Tetracycline (oral) with respect to specific gender populations https://www.apotheke-rezeptfreie.com/. Opper K, Uder S, Song K Development of Heterogeneous and Homogeneous Platforms for Rapid Analysis of DNA-Protein Interactions.

    Contact Us