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

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay