[SOLVED] How To Fix The 'No Space Left on Device' Error On Linux In A VM

preview_player
Показать описание
Learn how to fix the "No Space Left on Device" error on Linux in a VM.
Are you getting the following error message? Then you came to the right video.

No space left on device.
Sometimes you will get the error message... No space left on device.

Whatever it is the steps are same. This will be a demo of How to Fix the “No Space Left on Device” Error on Linux on VMware.

Here are the command used in this video.
1) Switch to super user.
sudo su
2) Launch linux partition editor.
cfdisk
3) Create new device and assign it as Linux LVM.
In my demo, my device name was /dev/sda4. Yours might be difference depending on the existing number of devices in your system.
4) Reboot the Ubuntu VM (or else you might get Device /dev/sda4 not found)
shutdown now -r
5) Once the Ubuntu VM is up, login as super user again.
sudo su
6) Create physical volume for the new device.
If you forgot your device name, launch the Linux partition editor again using the cfdisk command.
pvcreate /dev/sda4
7) Find out the volume group name using
vgs
If you want to see the detail information about the volume group use the following command.
vgdisplay
In my demo video, my volume group name was ubuntu-vg. Yours might be different.
8) Extend volume group.
vgextend ubuntu-vg /dev/sda4
9) If you check the volume group, again you will see increment in your volume group size.
vgdisplay
10) Extend the size of a logical volume.
The command below is to increase using all the allocated space.
lvextend -l+100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
The command below is to increase by only 2GB in the allocated space.
lvextend -L +2g /dev/ubuntu-vg/root
11) Increase the file system.
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
12) And finally, check the disk filesystem to make sure that the disk space has increased.
df -h

#ubuntu
Рекомендации по теме
Комментарии
Автор

Dude, even though this video is 2 years old, it helps me a lot. THANK YOU SO MUCH.

AnimeAbstract
Автор

Awesome. Used this procedure on a Ubuntu 22.04 VM in VMware Fusion 12. Worked exactly as described. Thanks a million!!

j.m.demoor
Автор

I was just setting a ldap service and I couldn't finish for this problem, until this video. Thatks so much!

theLightNeuron
Автор

Great tutorial! Thanks to this video I was able to expand a fixed size vm, which was a challenging task for me

ruslanl
Автор

Very useful tutorial. Was struggling with VM in Proxmox and I could not find a solution but your video was a gem. Thanks

KarimiSolomon
Автор

Awesome tutorial, thx so much, tbh I thought that this process was easier to do in Linux, I think that I will have to come here again every time that my disk goes full haha

Renan-zuye
Автор

You save my life!!! 😆 I'd managed to increase the vg size to the desired limit. Thank you, thank you SO MUCH! really appreciate it!

thecunting
Автор

very clearly shown and very helpful. thanks!!

ahmadmehmood
Автор

Amazing video, thanks for the help! On the other hand, it's disgusting how many steps need to be taken to complete this task...

kbprojekty
Автор

Thank you for the video. Despite the fact that English is not my native language, everything is clear from the video and worked out for me :)
I liked it :)

zvtlydc
Автор

Awesome video and very well put tutorial. Thanks a ton..

gokilokis
Автор

Thanks so much, I liked and subscribed!

McTrundy
Автор

Thank you so much, a lot of bad videos about this. I'm glad I clicked on this one 🙏🙏

SindyJB
Автор

Hi, i am on Kali Linux and have the same problem. I found some issues on step 7 when i try to find the volume group name using vgs nothing appears. Can you help me? Thanks

davidearmo
Автор

Thank very clear and useful. It works!

sergiomontenegro
Автор

That finally solved my issue .. Thank you!

YQLF
Автор

i cant be thankful enough you're a god save

aminedhaouadi
Автор

finally found something concrete, thx you very much

pawelpiotr
Автор

hi I'd like to ask if do I need to update the /etc/fstab so that when the system is restarted the added disk size would still be detected.. After i rebooted the system I encountered "error: disk 'lvmid/ not found.

dvxanneX
Автор

My free space only shows 2mb but I have 80GB allocated. I have no clue how to fix this. Tried Reddit, YouTube and still no success.

brandonhamilton