Attempting to increase the size of a Linux LVM Disk
-
-
Let's see if I can remember this without looking anything up this time...
pvcreate /dev/new_drive vgextend vg_name /dev/new_drive lvextend lv_name -l 100%FREE
Dang, I forget the ones to extend the file system
-
@travisdh1 My problem is
LVS
andVGS
displays the right amout of space.PVS
displays twoPV's
in the sameVG
, both at 1.95TB but nothing is listed asVFree
.vgs
lvs
pvs
df -h
-
Have you expanded the filesystem yet?
-
resize2fs /dev/mapper/centos-root
[root@localhost ~]# resize2fs /dev/mapper/centos-root 3.91T
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/centos-root
Couldn't find valid filesystem superblock. -
That's not good. Try it with the -p flag.
-
What filesystem do you have? Could it be XFS?
-
If XFS the command syntax is...
xfs_growfs /mount/point -D size
-
It's XenServer, we are expecting EXT4 here, right?
-
@scottalanmiller Correct
-
Is this improper syntax?
-
@wirestyle22 said in Attempting to increase the size of a Linux LVM Disk:
Is this improper syntax?
Try +3.91.
Also, why not have the data on its own volume? It's more flexible that way.
-
If the +doesn't work you will have to add it to the existing size. So if its 5TB it would be 8.91
-
Just appears that the size is too small.
-
@scottalanmiller That confuses me because each is 1.9T
-
@wirestyle22 said in Attempting to increase the size of a Linux LVM Disk:
@scottalanmiller That confuses me because each is 1.9T
Why? Your total from your LVS command looks like 3.89TB but you are trying to expand to 3.91TB.
-
@scottalanmiller LVS is 3.89T
-
I edited while you were typing. I read the wrong field. But it is still too small. The FS must be smaller than the container holding it.
-
@scottalanmiller said in Attempting to increase the size of a Linux LVM Disk:
I edited while you were typing. I read the wrong field. But it is still too small. The FS must be smaller than the container holding it.
How much smaller? even 3.86 kicks back the same error
-
@wirestyle22 said in Attempting to increase the size of a Linux LVM Disk:
@scottalanmiller said in Attempting to increase the size of a Linux LVM Disk:
I edited while you were typing. I read the wrong field. But it is still too small. The FS must be smaller than the container holding it.
How much smaller? even 3.86 kicks back the same error
Try something like 3.4TB. Remember FS overhead.