mirror of
https://github.com/fruworg/fruworg.github.io.git
synced 2024-11-16 17:37:17 +03:00
32 lines
502 B
Markdown
32 lines
502 B
Markdown
|
---
|
||
|
title: Памятка по LVM
|
||
|
description: Базовые команды
|
||
|
date: 2022-11-25T13:58:10+05:00
|
||
|
tags: [linux, lvm]
|
||
|
---
|
||
|
## Установка пакекта
|
||
|
```shell
|
||
|
apt -y install lvm2
|
||
|
```
|
||
|
|
||
|
## Создание
|
||
|
``` shell
|
||
|
pvcreate /dev/sda
|
||
|
vgcreate vg-name /dev/sda
|
||
|
lvcreate -L 10G -n lv-name vg-name
|
||
|
```
|
||
|
|
||
|
## Изменение
|
||
|
```shell
|
||
|
vgextend vg /dev/sdb
|
||
|
lvresize -rL +1G /dev/vg-name/lv-name
|
||
|
lvresize -rl +100%FREE /dev/vg-name/lv-name
|
||
|
```
|
||
|
|
||
|
## Просмотр
|
||
|
```shell
|
||
|
pvs
|
||
|
vgs
|
||
|
lvs
|
||
|
```
|