Sample Header Ad - 728x90

Linux + how to increase partitions based on disk size

-2 votes
1 answer
84 views
we have some red-hat servers with the following details ( when OS disk size is 230G ) # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 230G 0 disk ├─sda1 8:1 0 1G 0 part /boot/efi ├─sda2 8:2 0 1G 0 part /boot └─sda3 8:3 0 228G 0 part ├─VG100-lv_root 253:0 0 20G 0 lvm / ├─VG100-lv_swap 253:1 0 16G 0 lvm [SWAP] └─VG100-lv_var 253:2 0 30G 0 lvm /var fdisk -l Disk /dev/sda: 193.3 GB, 193273528320 bytes, 377487360 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 209715199 104857599+ ee GPT the Goal is to increase the /var and root filesystem based on that disk size is 230G when current /var is 30G and root filesystem is 20G so, we start with the following procedure that should gives us enough PFREE or enough “Physical Free” space. parted /dev/sda resizepart 3 100% Error: The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)? parted: invalid token: 3 Fix/Ignore/Cancel? sgdisk -e /dev/sda note - sgdisk: The simplest way to fix the backup GPT table is by using the sgdisk command with the -e option, which moves the backup GPT data structures to the end of the disk parted /dev/sda resizepart 3 100% Information: You may need to update /etc/fstab. partprobe /dev/sda pvresize /dev/sda Failed to find physical volume "/dev/sda". 0 physical volume(s) resized or updated / 0 physical volume(s) not resized but from pvs Pfree is still 0 where we are wrong here ? # pvs PV VG Fmt Attr PSize PFree /dev/sda3 VG100 lvm2 a-- 66.00g 0
Asked by yael (13936 rep)
Aug 5, 2024, 05:02 PM
Last activity: Aug 5, 2024, 05:47 PM