Is it possible to increase the size of the / partition?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Yes if you have another partition you can sacrifice a/o you have free space on the disk. Partitions should be contiguous so it really depends on your current situation. Its tricky and surgical. You have to know how to use fdisk but I have done it before. Its just a matter of redefining the end point. I have a default partitioning scheme on my home Centos5.4 server:
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 9729 78043770 8e Linux LVM
Theoretically you should be able to extend the "End" block by redefining the partition table by deleting the '/' partition (in my case /dev/hda2), and redefining it using the same "Start" and extending the "End". This is VERY RISKY however and I would not reccomend it. You would then write the partition table to the disk and exit WITHOUT reformatting the partition (e.g. without running mke2fs). This is all assuming the entire disk is already formatted with the same filesystem as the existing '/' partition. This is VERY RISKY and I would only reccomend that on the most dire of circumstances. I reccomend rsync'ing the root partition off to a temp space, reformatting the drive you want to change and then rsync'ing everything make, its a bit safer.
Is it possible to increase the size of the / partition?
TIA
If you aren't using LVM for /, you can boot into a live distro or a utility distro that contains gparted. The last time I had to do this I just booted into the live ubuntu CD, and that worked OK.
Actually, since it's the root partition, you probably need to do this from a live-distro or util-distro anyway.
If you aren't using LVM for /, you can boot into a live distro or a utility distro that contains gparted. The last time I had to do this I just booted into the live ubuntu CD, and that worked OK.
Actually, since it's the root partition, you probably need to do this from a live-distro or util-distro anyway.
"/" is not a partition---it is a node in the filesystem tree. Block devices (either partitions or whole drives) get mounted at various places on the tree---including root.
As already stated, you can increase the size of any partition as long as there is room adjacent (or room can be created)
So if it's a VM, you first need to make the file it's using as it's disc bigger, if necessary. I've got no idea how to do that with Xen, but it's usually pretty easy. Then boot the vm into some sort of live distro and expand your partitions, or logical volumes. Then expand the filesystem to the new size. If you're lucky your util-distro has a new enough gparted package that it will do all this for you. If not it's not to hard to do by hand.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.