Extend partition size
I am running Centos 7 Server Core and I would like to extend my root partition with all my uallocated space.
How do I do that? |
We need more information. It depends on how your system is partitioned and where your unallocated space is located on your disk drive.
By default CentOS 7 uses LVM and formats the partitions using xfs. Without to much trouble you can create a partition, extend the volume group and add the space to your root logical volume. |
It depends on your scenario. The basic concept is: Delete the current partition -> Create a new partition -> Expand the filesystem
Assuming that you have a single standard (non-LVM) partition on /dev/sda, with XFS filesystem, the process would be something like: Backup your data first!! Code:
fdisk /dev/sda |
Here is a tutorial that will at the very least help you to understand and get you started.
https://geekpeek.net/increase-root-p...ze-lvm-centos/ What is the output of: Code:
fdisk -l |
This is my disk
https://1drv.ms/u/s!AtdW7x8BDOLNpcwMcBNm0vgOlEr29g |
Any suggestions?
|
The easiest method would be to create a partition using the free space and then create a PV. You can extend the volume group and logical volume to use the additional space.
The second method would be to resize the LVM partition and then extend the VG and LV for your root filesystem. |
I need a step-by-step, have never done it before.
|
Quote:
Your best bet is to create a new partition. OR try his second suggestion. https://linuxtechlab.com/beginners-guide-resizing-lvm/ https://blue42.net/linux/5-steps-lin...ume-no-reboot/ |
I tried this guide https://linuxtechlab.com/beginners-guide-resizing-lvm/ but it makes no sense to me and it fails at the first command "fdisk /dev/sdd" "fdisk: could not open /dev/sdd: no such file or filecatalog.
People keeps telling me that Linux is so much better then Windows. I never thought extending a disk or partition should be so complicated. |
this is a logical volume. It is not linux itself, it is a relatively complex disk handling system. On windows most probably you have never seen anything like this, but this Centos was installed/configured using logical volumes. Therefore if you wish to make any modification you need to learn what is it all about.
https://en.wikipedia.org/wiki/Logical_volume_management |
https://www.centos.org/docs/5/html/D...US/ch-lvm.html
https://www.centos.org/docs/5/html/C...olume_Manager/ Another alternative would be to give GParted a look.:) https://gparted.org/features.php |
I used GParted.
|
Quote:
GParted is easier to work with. GParted Live has always worked great for me. Were you able to extend or resize the partition that you wanted to? |
It looks like it. Yes it was extremely easy.
|
All times are GMT -5. The time now is 03:48 AM. |