# Как уменьшить размер диска LXC контейнера?

**URL:** <https://forum.samohosting.ru/t/kak-umenshit-razmer-diska-lxc-kontejnera/1573>\
**Category:** Proxmox\
**Tags:** lxc, proxmox\
**Created:** [28.Декабрь.2025 10:37:07 UTC](https://forum.samohosting.ru/t/kak-umenshit-razmer-diska-lxc-kontejnera/1573 "2025-12-28T10:37:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chelovek](https://forum.samohosting.ru/letter_avatar_proxy/v4/letter/c/ea5d25/32.png) [@chelovek](https://forum.samohosting.ru/u/chelovek)\
**Post date:** [28.Декабрь.2025 10:37:07 UTC](https://forum.samohosting.ru/t/kak-umenshit-razmer-diska-lxc-kontejnera/1573/1 "2025-12-28T10:37:07Z")

</div>

а если много места добавил, как его уменьшить? видео только с увеличением попадается

---

<div class="post-metadata">

**Author:** ![KRom](https://forum.samohosting.ru/user_avatar/forum.samohosting.ru/krom/32/362_2.png) [@KRom](https://forum.samohosting.ru/u/KRom)\
**Post date:** [28.Декабрь.2025 15:00:58 UTC](https://forum.samohosting.ru/t/kak-umenshit-razmer-diska-lxc-kontejnera/1573/2 "2025-12-28T15:00:58Z")

</div>

У меня есть инструкция по уменьшению диска для LXC, если это про это

---

<div class="post-metadata">

**Author:** ![chelovek](https://forum.samohosting.ru/letter_avatar_proxy/v4/letter/c/ea5d25/32.png) [@chelovek](https://forum.samohosting.ru/u/chelovek)\
**Post date:** [28.Декабрь.2025 16:26:00 UTC](https://forum.samohosting.ru/t/kak-umenshit-razmer-diska-lxc-kontejnera/1573/3 "2025-12-28T16:26:00Z")

</div>

наверняка оно. давай. и вот еще символы…

---

<div class="post-metadata">

**Author:** ![KRom](https://forum.samohosting.ru/user_avatar/forum.samohosting.ru/krom/32/362_2.png) [@KRom](https://forum.samohosting.ru/u/KRom)\
**Post date:** [28.Декабрь.2025 17:08:40 UTC](https://forum.samohosting.ru/t/kak-umenshit-razmer-diska-lxc-kontejnera/1573/4 "2025-12-28T17:08:40Z")

</div>

List the containers:

```shell
pct list  

```

Stop the particular container you want to resize:

```shell
pct stop 999  

```

Find out it’s path on the node:

```shell
lvdisplay | grep "LV Path\|LV Size"  

```

For good measure one can run a file system check:

```shell
e2fsck -fy /dev/pve/vm-999-disk-0  

```

Resize the file system:

```shell
resize2fs /dev/pve/vm-999-disk-0 10G 

```

Resize the local volume

```shell
lvreduce -L 10G /dev/pve/vm-999-disk-0  

```

Edit the container’s conf, look for the rootfs line and change accordingly:

```shell
nano /etc/pve/lxc/999.conf  

```

> rootfs: local-lvm:vm-999-disk-0,size=32G \>\> rootfs: local-lvm:vm-999-disk-0,size=10G

Start it:

```shell
pct start 999

```

Enter it and check the new size:

```shell
pct enter 999  
df -h

```

---

<div class="post-metadata">

**Author:** ![chelovek](https://forum.samohosting.ru/letter_avatar_proxy/v4/letter/c/ea5d25/32.png) [@chelovek](https://forum.samohosting.ru/u/chelovek)\
**Post date:** [30.Декабрь.2025 11:37:20 UTC](https://forum.samohosting.ru/t/kak-umenshit-razmer-diska-lxc-kontejnera/1573/5 "2025-12-30T11:37:20Z")

</div>

благодарствую, ну вроде получилось. правда нужна строка

```auto
e2fsck -f /dev/pve/vm-100-disk-0

```

перед.. я потерял чем, ну при выполнении консоль напишет. ну или флаг -fy почему то мне не подошел
