Unsolved Question about fdisk
-
@Pete-S said in Question about fdisk:
@JaredBusch said in Question about fdisk:
@Pete-S said in Question about fdisk:
You're running a virtual disk under Hyper-V so physical sectors has no bearing at all.
Of course they matter, because the guest OS doesn't know or care that it is virtual.
Oh, so you thought partition alignment is about the OS?
Where did I say that? Are you implying I thought it mattered to the guest OS, because I used that term? This entire post is about
fdisk
andfdisk
runs inside the CentOS 7 operation system in this case. That version offdisk
complains about the partition alignment as soon as you run it. It also refuses to allow you to specify sector 1 if you want to resize the partition. Thus within the OS that I am able to manage the partition from, I am unable to usefdisk
as needed.Partition alignment is only about optimizing the performance of the storage subsystem.
I know what partition alignment is actually about.
I know you seem all hot and bothered to prove me wrong about something but give it up.
-
@JaredBusch said in Question about fdisk:
I know you seem all hot and bothered to prove me wrong about something but give it up.
No, not at all. I was just trying to add some context to why partition alignment makes no practical difference in this and many other cases and that warnings can be disregarded.
I would consider it a bug that
fdisk
couldn't resize your partition the way it was setup. -
So raw partitions with no LVM? Sad geek.
Is parted available in CentOS7? It's been so long I forget, but parted tends to act better if you are able to use it.
-
@travisdh1 said in Question about fdisk:
So raw partitions with no LVM? Sad geek.
Is parted available in CentOS7? It's been so long I forget, but parted tends to act better if you are able to use it.
If I remember correctly, it is.
-
@scottalanmiller said in Question about fdisk:
@travisdh1 said in Question about fdisk:
So raw partitions with no LVM? Sad geek.
Is parted available in CentOS7? It's been so long I forget, but parted tends to act better if you are able to use it.
If I remember correctly, it is.
Yes, by default. No idea how he went with that assumption.
The disk is bigger.
But it is not visible yet.
Normally, you simply use
fdisk
to delete the partition and recreate it, then LVM and such see the space. But I cannot do that because of the above. -
@JaredBusch said in Question about fdisk:
@scottalanmiller said in Question about fdisk:
@travisdh1 said in Question about fdisk:
So raw partitions with no LVM? Sad geek.
Is parted available in CentOS7? It's been so long I forget, but parted tends to act better if you are able to use it.
If I remember correctly, it is.
Yes, by default. No idea how he went with that assumption.
The disk is bigger.
But it is not visible yet.
Normally, you simply use
fdisk
to delete the partition and recreate it, then LVM and such see the space. But I cannot do that because of the above.That would not be normal at all when using LVM. fdisk/parted shouldn't need to be used.
pvresize /dev/pathtopv
lvextend -r -l +95%FREE /dev/pathtolv
(pick you're preferred percentage, I like to leave room for temporary snapshots)The final step depends on the filesystem in use.
XFSxfs_growfs /mount/point
EXT4resize2fs /mount/point
The deleting and recreating the partition bit is only needed when directly on the physical hardware. Since you resized the virtual partition, just skip that.
-
@travisdh1 said in Question about fdisk:
pvresize /dev/pathtopv
-
@JaredBusch said in Question about fdisk:
@travisdh1 said in Question about fdisk:
pvresize /dev/pathtopv
Looks like I was forgetting a few steps. Try https://samsig.dk/extending-gpt-lvm-disk-on-centos/ (It doesn't have you delete/create the partition).
-
@travisdh1 said in Question about fdisk:
(It doesn't have you delete/create the partition).
No, but it tells you to use tools to deal with the "physical" partition same as simply using
fdisk
to delete and create. Speficiallyparted
orgdisk
, and those tools don't like what they see either. -
As an update to this, the issue is not resolved, but I purged a couple old nextcloud user accounts, that once deleted, and got enough space to get the needed users fully sync'd again.
I'll be spinning up a new Nextcloud instance and simply manually migrating users to it I think.