Solved Fedora Block Device Full How - Extend Partition
-
@travisdh1 said in Fedora Block Device Full How - Extend Partition:
pvcreate /dev/newpartition vgextend fedora /dev/newpartition lvextend -l 100%FREE /dev/fedora/root /dev/newpartition
I don't know the command to expand an ext4 file system off the top of my head
His root is XFS, so xfs_grows should do the trick.
-
The system is saying that xvda2 is mounted.
Yet I have no idea how it's mounted.
-
@DustinB3403 said in Fedora Block Device Full How - Extend Partition:
The system is saying that xvda2 is mounted.
Yet I have no idea how it's mounted.
df -h
-
@DustinB3403 said in Fedora Block Device Full How - Extend Partition:
The system is saying that xvda2 is mounted.
Yet I have no idea how it's mounted.
So, just grep /etc/mtab for xvda2.
-
-
@DustinB3403 said in Fedora Block Device Full How - Extend Partition:
So, I think you can safely force the pvcreate.
-
@Francesco-Provino when I try for force pvcreate using
pvcreate /dev/xdva2 -ff
it results in -
Oh, xvda2 is your root filesystem. What's the output of
fdisk -l
? It looks like it should be xvda3xvda1 is the boot partition.
-
-
Did you create a partition for the free space? You need to use fdisk to make a third primary partition.
-
@stacksofplates ok, following this here.
-
Dumb question, would it be easier for me to simply add a separate drive, and then extend the root drive into the new drive?
-
@DustinB3403 said in Fedora Block Device Full How - Extend Partition:
Dumb question, would it be easier for me to simply add a separate drive, and then extend the root drive into the new drive?
Maybe.
You can skip the fdisk stuff and add a whole new block device to LVM if you add another virtual disk. -
@Francesco-Provino I'm fine with a separate physical device, so long as the system uses it as a single device.
-
@DustinB3403 said in Fedora Block Device Full How - Extend Partition:
@Francesco-Provino I'm fine with a separate physical device, so long as the system uses it as a single device.
You can actually move everything to the new drive using lvm. Tho I don't remember how to do that offhand, I'd have to look it up.
-
OK so this is what I have with a new "physical" drive attached to this VM.
Where too from here?
-
@DustinB3403 said in Fedora Block Device Full How - Extend Partition:
OK so this is what I have with a new "physical" drive attached to this VM.
Where too from here?
I'm actually doing this now myself, give me a sec.
-
@DustinB3403 pvcreate /dev/xvdb and proceed with vgextend…
-
@Francesco-Provino reading the manual for pvextend
-
@DustinB3403 said in Fedora Block Device Full How - Extend Partition:
@Francesco-Provino reading the manual for pvextend
You don't want to extend a pv tho, you want to create a new one. Add the new pv into the current vg (volume group), and then extend the lv (logical volume) to fill the new pv.
pvcreate /dev/xvdb vgextend fedora /dev/xvdb lvextend -l 100%FREE /dev/fedora/root
See if that lvextend works, might need to feed it another vg/pv path.