[SOLVED] How Increase / or /usr Partition using command line from Kali Linux
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How Increase / or /usr Partition using command line from Kali Linux
Hi Community, I recently installed Kali Linux on the KVM virtual machine. Last night, I tried to patch it and got some errors. I found out that the portion is 100% used. I added an additional 20G hard disk vdb. But it doesn't have a Volume group or Logical Volume. When I typed vgs or lvs, it asked me to install packages, and packages are not getting installed since it doesn't have space. I tried to use GUI, but GParted isn't open. I get an error. 90% of space is used by /usr. How can we add an additional 20G to / or /usr? Is there any easier way other than mounting a disk to /mnt and copying data from /usr to /mnt, then deleting data from /usr and mounting another disk to /usr and recopying back to /usr? I am checking if there is an easier way; I have never used Debian before. Not sure debain's volume group and logical volume are different. I would appreciate it if someone could help me figure this out. Thanks
Playing with kali as a VM guest might be a great way to learn. This is a generic question, not a "kali question" as such. But you won't get anywhere without giving us some info. Start with this.
Playing with kali as a VM guest might be a great way to learn. This is a generic question, not a "kali question" as such. But you won't get anywhere without giving us some info. Start with this.
Code:
df -hT
lsblk -f -o +SIZE
Here is the output of those two commands. Thank you,
I can install it again, but that won't be a long-term solution because it can happen again, and reinstallation won't be a good idea. I was looking for a solution. Thanks
When you post command output use code tags, not quote tag - that way it retains layout and is readable.
Quote:
Originally Posted by Mo_
... 90% of space is used by /usr. How can we add an additional 20G to / or /usr? Is there any easier way other than mounting a disk to /mnt and copying data from /usr to /mnt ...
No, not with that layout.
That's a pretty poor layout IMHO - was this just pre-generated image you used ?. If you can re-install (as in a full install as per usual), I'd suggest you do so again, and choose to use LVM so can easily add space in future. There is no LVM in use in your current system.
first: outside of the VM you can increase the size of the vdisk. Or you can add a second vdisk if you wish (this is what you made).
next: start another OS (or VM), mount the initial vdisk (or both the old and the new one) as an additional storage and you can try to move/resize or reorganize those partitions. Also you can edit the fstab file to adapt those changes. And also you may try to use lvm on the new vdisk.
Finally you can boot the initial VM again. It is a great way to learn, and actually kali is not the best OS to learn it.
I think it is still much better to reinstall the whole OS again as it was already suggested.
Obviously you can find a different way to solve it, there are more possibilities, not only this one.
If your system uses "LVM = Logical Volume Management," as you imply, the process of adding more space is very well-documented and requires no downtime. Just "Google it."
LVM uses physical volumes to create "storage pools" from which "logical volumes" are then carved. A single volume can occupy space on more than one drive. There are other nice things, too – such as the ability to take a failing drive out-of-service transparently.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.