• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

Day 25/ 30 Days of Linux Mastery: Disk Management on RHEL 9

Lomanu4 Оффлайн

Lomanu4

Команда форума
Администратор
Регистрация
1 Мар 2015
Сообщения
1,481
Баллы
155
Table of Contents

  • Introduction
  • What is Disk Management?
  • Core Disk Management Commands
  • Real-World Scenario: Disk Management Commands
  • Conclusion
  • Let's Connect


Introduction


Welcome back to Day 25 of this practical Linux challenge!

Disk running out of space? Don't panic. Today, we dive into basic disk management using simple and practical Linux commands.

If you have ever seen the dreaded "disk full" error or wondered, "Where did all my space go?" then today’s lesson is for you.

As you grow in your journey as a Cloud System Admin or DevOps engineer, being able to know how to inspect, clean, and manage disk space becomes a **core skill.


What is Disk Management?


Disk space issues are one of the most common problems you will face in production environments. Whether it is logs filling up, unused packages, or large files forgotten, knowing how to find and fix space issues keeps your server healthy and running.

Managing disk space is crucial for:

  • Keeping your servers running smoothly
  • Avoiding outages due to full volumes
  • Debugging space-hungry apps
  • Mounting extra storage in cloud environments


Core Disk Management Commands


More commonly used Core Disk Management Commands options are listed in the table below.

Disk Management CommandWhat it Does
df -hShows available disk space (human-readable)
du -sh *Shows folder sizes in current directory
lsblkLists block devices like disks and partitions
mountMounts a filesystem
umountUnmounts a mounted filesystem
journalctl --disk-usageCheck journal log size
journalctl --vacuum-size=100MClear logs down to a specific size
rm -rf <path>Remove unwanted files/directories (use with caution)
blkidShows UUID and type of a block device


Real-World Scenario: Disk Management Commands


You are running a small RHEL 9 web server, and suddenly you get an alert:

Disk usage at 90%. Clean up space immediately.
Let’s walk through what to do:

  • First Check Disk Usage.

df -h


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



  • Now check what's using the disk space

du -sh /* - # you can do this only using root, add sudo before the command if you are not


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



  • Now you have seen what's eating your space you can open that folder

du -sh /var/*


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



  • You can go ahead to delete

rm -rf <directory path>

# or clear caches using

dnf clean all


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Conclusion


Disk management is not just for advanced users; even as a beginner on RHEL 9, you can confidently check, manage, and free up space on your system. These small actions make a huge difference in production environments.

If this is helpful to you, feel free to bookmark, comment, like and follow me for Day 26!


Let's Connect!


If you want to connect or share your journey, feel free to reach out on

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

.
I am always happy to learn and build with others in the tech space.

#30DaysLinuxChallenge #Redhat#RHCSA #RHCE #CloudWhistler #Linux #Rhel #Ansible #Vim #CloudComputing #DevOps #LinuxAutomation #IaC #SysAdmin#CloudEngineer


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу