[New nanny-level tutorial in 2023] Solve the problem of insufficient disk space in Ubuntu file system low disk space on filesystem root
[New nanny-level tutorial in 2023] Solve the problem of insufficient disk space in Ubuntu file system low disk space on filesystem root
** Solve the problem of low disk space on filesystem root in Ubuntu22.04 file system **
Hello everyone, I am Zhouzhou, welcome to follow me, a programmer who loves to listen to Jay Chou. Follow the public account [Programmer Zhouzhou] to get 10G learning materials, interview notes, exclusive learning system routes of major manufacturers, etc... You can also join the technical exchange group. Welcome everyone to send me a private message in the CSDN backend!
Contents of this article
- Preface
- Solution steps
-
- Step 1: Check disk space usage
- Step 2: Install partition tools
- Step 3: Start the partition tool
- Step 4: Operating Partitions
- Step 5: read-only cannot change disk space
- Step 6: Expand the file system size
- Step 7: Confirm if the verification is successful
- Check whether the expansion is successful
- Summarize
Preface
The following information was prompted when starting Ubuntu20.04 recently:
Low Disk Space on “Filesystem root”
The volume “Filesystem root” has only 542.5MB diskspace remaining.
So how to deal with it? Just increase the disk capacity of the file system.
First, expand the capacity in Vmware.
Suppose I originally used 20G, then I only need to change it to 50G here first, and then follow the steps.
Solution steps
Step 1: Check disk space usage
First use the df -h command to check our disk space usage. You can see that /dev/sda3 is full, so proceed next.
Step 2: Install partition tools
The partition tool command is as follows
sudo apt-get install gparted -y
Step 3: Start the partition tool
sudo gparted
Start this tool
so that you can see which disk space has a lot of unallocated space, and then disassemble and merge it.
Step 4: Operating Partitions
As you can see, there is 30GB of unallocated area at this time.
Step 5: read-only cannot change disk space
Many friends may encounter the following problem, that is, they can only be expanded in the mounted state.
Select information to view.
At this point you can see my mounting location as follows. Note: The mounting locations are separated by , which is easy to ignore /. Open the terminal
with root privileges and perform operations. Remount the read and write permissions of the folder directory.
sudo -i
mount -o remount -rw /
mount -o remount -rw /var/snap/firefox/common/host-hunspell
Follow the instructions below:
Refresh the device in gparted in the upper left corner to operate.
Step 6: Expand the file system size
Right-click to select sda3, select resize, and you can perform the following operations. Drag the right side to operate, and you can flexibly adjust the size.
Step 7: Confirm if the verification is successful
Click the green icon and then apply.
Check whether the expansion is successful
Enter df -h to check whether the expansion is successful.
Summarize
Hello, dear readers, Zhouzhou has established a CSDN technical exchange group. If you are very interested, you can send me a private message to join my community.
📝There are many activities in the community from time to time, such as free shipping of some technical books and exquisite gifts every week, sharing of learning materials, sharing of experience from large manufacturers, technical discussions, entrepreneurial talks by industry leaders, etc.
📝There are many directions in the community, and related fields include Web full stack (front-end and back-end), artificial intelligence, machine learning, self-media monetization, sharing of cutting-edge scientific and technological articles, intensive reading of papers, etc.
📝No matter how new you are, you are welcome to join the community to discuss, chat, and share, and we will help you become the next technology tycoon! You are always welcome to communicate with me, communicate and grow together. Realization, progress, technology, materials, projects, everything you want will be found here
📝The popularity of the Internet will only get bigger and bigger. The bigger the storm, the more expensive the fish will be! Welcome to join the community ~ A person can go very fast, but a group of people will go further!
📝Follow my official account (same ID as CSDN: Programmer Zhouzhou) to get a 100,000-word Java interview guide and related materials! ~
📝Thinking is a question, doing is an answer! Let's start! You are welcome to communicate with me in the comment area or backstage, and you are also welcome to click on the link below to join my communication community directly! ~ Jump link community~