DEV Community

Cover image for Ubuntu Sistemlerde Disk boyutunu artırma - lvextend ve resize2fs kullanımı
Doğukan Eren for Açıklab

Posted on

4 1 1 1 1

Ubuntu Sistemlerde Disk boyutunu artırma - lvextend ve resize2fs kullanımı

Sanallaştırma ortamınızdan diskinizin boyutunu genişlettikten sonra aşağıdaki komutları kullanarak diskinizin lvm alanının tamamını kullanmasını sağlayabilirsiniz.

İlk önce aşağıdaki komutu kullanarak alanlarınızı görelim

df -h
Enter fullscreen mode Exit fullscreen mode

benim makinamda sonuç aşağıdaki gibidir

root@limanmys:/home/test# df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              794M  1.1M  793M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   15G   15G   14G  100% /
tmpfs                              3.9G  1.1M  3.9G   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/sda2                          2.0G  271M  1.6G  15% /boot
tmpfs                              794M  4.0K  794M   1% /run/user/1000
tmpfs                              794M  4.0K  794M   1% /run/user/1001
Enter fullscreen mode Exit fullscreen mode
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
Enter fullscreen mode Exit fullscreen mode

Sonrasında aşağıdaki komutu çalıştırarak disk alanımızı kullanabiliriz

resize2fs -f /dev/mapper/ubuntu--vg-ubuntu--lv 
Enter fullscreen mode Exit fullscreen mode

işlem sonucunda disk alanımız güncellenmiş olmalıdır.

root@limanmys:/home/test# df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              794M  1.1M  793M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   30G   15G   14G  54% /
tmpfs                              3.9G  1.1M  3.9G   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/sda2                          2.0G  271M  1.6G  15% /boot
tmpfs                              794M  4.0K  794M   1% /run/user/1000
tmpfs                              794M  4.0K  794M   1% /run/user/1001

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more