# Disk size of OVA file

**URL:** <https://community.graylog.org/t/disk-size-of-ova-file/7861>\
**Category:** Graylog Central (peer support)\
**Created:** [November 30, 2018, 10:28pm UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861 "2018-11-30T22:28:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![neeraj](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@neeraj](https://community.graylog.org/u/neeraj)\
**Post date:** [November 30, 2018, 10:28pm UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/1 "2018-11-30T22:28:32Z")

</div>

Hello, we have deployed a new Graylog OVA instance. I expanded the virtual disk size to 400GB static before powering on the virtual machine. Upon powering it on, if i do a “df -kh” , the / root shows to be only 15G which is expected as per the documentation.  
How do i make the / root extend or use all the 400GB i have allocated?

I have looked at [http://docs.graylog.org/en/2.4/pages/configuration/graylog\_ctl.html#extend-disk-space](http://docs.graylog.org/en/2.4/pages/configuration/graylog_ctl.html#extend-disk-space) .  
I m not adding a new disk such as /dev/sdb as mentioned in the above link. Mine is already existing /dev/sda

If i do a fdisk -l , below is the output

```
ubuntu@graylog:~$ sudo fdisk -l

Disk /dev/sda: 429.5 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders, total 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000efa42

   Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 40957951 20228097 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 501760 40957951 20228096 8e Linux LVM

Disk /dev/mapper/graylog--vg-root: 16.4 GB, 16416505856 bytes
255 heads, 63 sectors/track, 1995 cylinders, total 32063488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/graylog--vg-root doesn't contain a valid partition table

Disk /dev/mapper/graylog--vg-swap_1: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/graylog--vg-swap_1 doesn't contain a valid partition table

```

Output of lsblk

 ![Capture](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/2/2b872b9dc9c73af4f17725e317f0627cc313cb76.jpeg)

---

<div class="post-metadata">

**Author:** ![Totally\_Not\_A\_Robot](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/totally_not_a_robot/32/3353_2.png) [@Totally\_Not\_A\_Robot](https://community.graylog.org/u/Totally_Not_A_Robot)\
**Post date:** [December 1, 2018, 1:08pm UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/2 "2018-12-01T13:08:02Z")

</div>

> [@neeraj](#):
>
> How do i make the / root extend or use all the 400GB i have allocated?

I’m sorry dude but that kind of question is really, really outside the scope of these forums. This is Linux-101 material.

Basically you’ll need to learn about partitioning and about LVM: Linux Volume Manager. I can give you a short summary though:

- Your VM already had one disk and you expanded that one disk to make it larger.
- This means that the disk is larger than the system initially expected.
- You can probably add a new partition using `fdisk`, for example `sda6`.
- You can then make this new partition into a new LVM device `/dev/sda6`
- You can add the new device to the existing volume group `graylog--vg-root`
- You can then use `lvresize` and the relevant resize command for the file system type to resize `/`.

One important _caveat_: the Graylog OVA is **not** intended for production use. It is intended to just try out the product.

---

<div class="post-metadata">

**Author:** ![neeraj](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@neeraj](https://community.graylog.org/u/neeraj)\
**Post date:** [December 1, 2018, 7:39pm UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/3 "2018-12-01T19:39:16Z")

</div>

HI Tess, you are right this was out the scope, my bad. I have already tried doing whatever you suggested but it errors out when trying to create a new LVM device /dev/sda6 as shown below even though my “fdisk -l output shows /dev/sda to be 400GB” . The reason i asked this question was it is easy to add a new separate disk and move the graylog data to use that new larger disk (as explained in the documentation) but my question here was whether its possible to expand the existing graylog\_root lvm to use any unallocated space on the disk. There is something specific with the way .ova image has its partition table created that causes this error…

 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/1/1e842b92558226ad387357d36c5f6b0a03a1290b.png)

---

<div class="post-metadata">

**Author:** ![Totally\_Not\_A\_Robot](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/totally_not_a_robot/32/3353_2.png) [@Totally\_Not\_A\_Robot](https://community.graylog.org/u/Totally_Not_A_Robot)\
**Post date:** [December 1, 2018, 7:52pm UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/4 "2018-12-01T19:52:13Z")

</div>

**EDIT :**  
Hang on, no… I’m wrong.

Originally your `fdisk` did show that the disk had grown… so it’s interesting that it would say there are no free sectors.

Basically doing the following -should- work:

```auto
sudo fdisk /dev/sda
n # new
p # primary

```

And so on… Fdisk already indicates that the drive is 430GB in size…

---

<div class="post-metadata">

**Author:** ![benvanstaveren](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/benvanstaveren/32/3398_2.png) [@benvanstaveren](https://community.graylog.org/u/benvanstaveren)\
**Post date:** [December 2, 2018, 12:37pm UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/5 "2018-12-02T12:37:49Z")

</div>

If the disk itself is already 430Gb and my interpretation of the fdisk is correct, the extended sda5 partition is also already something like 400Gb large, you probably need to vgextend the volume group occupying it (if it hasn’t occupied the full size already), then lvextend the root vg, then use the appropriate filesystem resize command to grow your filesystem (e.g. for ext4 you’d use resize2fs).

---

<div class="post-metadata">

**Author:** ![Totally\_Not\_A\_Robot](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/totally_not_a_robot/32/3353_2.png) [@Totally\_Not\_A\_Robot](https://community.graylog.org/u/Totally_Not_A_Robot)\
**Post date:** [December 2, 2018, 12:54pm UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/6 "2018-12-02T12:54:25Z")

</div>

Looks like sda5 is still 40M sectors, which could correlate to the 20GB size we saw for /. Partitions don’t get auto-resized.

---

<div class="post-metadata">

**Author:** ![benvanstaveren](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/benvanstaveren/32/3398_2.png) [@benvanstaveren](https://community.graylog.org/u/benvanstaveren)\
**Post date:** [December 2, 2018, 5:56pm UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/7 "2018-12-02T17:56:55Z")

</div>

Guess then you can always delete sda5 and re-create it in the same session at the same starting block but occupying the whole disk, then pvextend the physical volume that lvm has on it, then lvextend and fs resize…

---

<div class="post-metadata">

**Author:** ![Totally\_Not\_A\_Robot](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/totally_not_a_robot/32/3353_2.png) [@Totally\_Not\_A\_Robot](https://community.graylog.org/u/Totally_Not_A_Robot)\
**Post date:** [December 2, 2018, 6:08pm UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/8 "2018-12-02T18:08:37Z")

</div>

Oooff! Living on the edge! 😃

Of course OP could’ve also just added an /dev/sdb and added that to LVM 😉

Well, as long as OP doesn’t try to run production on this jiggery OVA…

---

<div class="post-metadata">

**Author:** ![neeraj](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@neeraj](https://community.graylog.org/u/neeraj)\
**Post date:** [December 3, 2018, 12:05am UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/9 "2018-12-03T00:05:57Z")

</div>

Hi [benvanstaveren] , Unfortuantely can’t delete /sda5 because it has the root LVM. As you know its a pain to extend root partitions. Even “vgextend” doesn’t see 400GB available.

I guess, I will just redeploy the OVA with the default options, attach a separate disk of 400GB (sdb ) instead of wasting time in expanding the existing sda disk.

We can close this thread. Thank you all for your inputs

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [December 17, 2018, 12:06am UTC](https://community.graylog.org/t/disk-size-of-ova-file/7861/10 "2018-12-17T00:06:00Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
