How to extend the Ubuntu Linux hard disk size to use full capacity ?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
How to extend the Ubuntu Linux hard disk size to use full capacity ?
Hi All,
I wonder if this is possible to extend or regrow the Linux hard disk partition from 8 GB to 20 GB without losing the existing data on the partition ?
at the moment this Ubuntu Linux is deployed on top of VMware and I've just regrow the hard drive from 8 GB into 20 GB but can't see the effect immediately.
can anyone suggest how to do this without losing the data ?
and I found some strange error message when i do the fdisk -l ?
Extend /, no, because your swap is right up against your / and you are not using LVM. You could, however, add another partiton.
Looks like your swap partition is about 1.5GB? So you have unpartitioned space on the disk.
To add a new partition, use fdisk (or cfdisk or gparted) to create a new partition on the disk. You will likely need to reboot here. Then use mkfs to create a filesystem on the new block device - probably /dev/sda3 or /dev/sda6. Then add a line in /etc/fstab for it and mount it with mount.
The partition boundary message is a warning, not an error. It is not optimal but it is not harmful.
Perhaps you should (re-)read post #2. I don't know what you think that command will do, but "man resize2fs" will tell you what the options are.
Best way to do this is a gparted liveCD - boot that in your VM. It's a GUI that will allow you to move the swap (and extended partition) out of the way so there is some contiguous free space after sda1. The you can resize it - gparted will do everything for you, so you won't need the resize2fs command at all.
BTW, don't edit your image(s) - if we can't read what's actually important, rather than what you think is important, we can't help you. Air your concerns, but leave the data intact.
Perhaps you should (re-)read post #2. I don't know what you think that command will do, but "man resize2fs" will tell you what the options are.
Best way to do this is a gparted liveCD - boot that in your VM. It's a GUI that will allow you to move the swap (and extended partition) out of the way so there is some contiguous free space after sda1. The you can resize it - gparted will do everything for you, so you won't need the resize2fs command at all.
BTW, don't edit your image(s) - if we can't read what's actually important, rather than what you think is important, we can't help you. Air your concerns, but leave the data intact.
ah.. do you mean the screenshot or the disk image ?
As I said - your swap is right up against your root partition, and you aren't using LVM, so you can't just extend /: something else is in the way!
I did not think of moving your swap partition, though, as syg00 says. So what you can do is boot a live CD, delete swap, expand /, remake swap, then resize2fs the / partition. And yeah gparted is probably the easiest way to do this.
at the moment this Ubuntu Linux is deployed on top of VMware and I've just regrow the hard drive from 8 GB into 20 GB but can't see the effect immediately.
depending on how you setup vmware you might not see any change until you add files
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.