CoreOS: Resizing partition c0d0p9 on a HP DL360 G5

I recently installed CoreOS on my HP DL360 G5 and notice that even though I setup a hardware-raid 5 with 6 72GB SAS drives, my ninth partition was only 2GB in size.

After some research I found out that CoreOS is supposed to enlarge the ninth partition automatically but that didn't happen for my DL360, so I went digging.

 

After a quick google search I saw that there is a patch for that:

https://github.com/coreos/bugs/issues/1037


Unfortunatelly it doesn't seem to be in the stable channel (at the time of my installation), so I was trying to manually apply the change, which then made me realize that / and /usr are mounted read-only.

So I checked what /usr/lib64/coreos/extend-filesystems does and I had only to issue the following commands as root:

 

dl360g5 ~ # cgpt resize  /dev/cciss/c0d0p9
dl360g5 ~ # resize2fs /dev/cciss/c0d0p9
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/cciss/c0d0p9 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 22
The filesystem on /dev/cciss/c0d0p9 is now 88960814 (4k) blocks long.

 

Using gdisk to confirm:

dl360g5 ~ # gdisk /dev/cciss/c0d0
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/cciss/c0d0: 716544402 sectors, 341.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): FF0E5BB2-0C8E-495C-82C2-C1BDD46AAA0D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 716544368
Partitions will be aligned on 2048-sector boundaries
Total free space is 4062 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096          266239   128.0 MiB   EF00  EFI-SYSTEM
   2          266240          270335   2.0 MiB     EF02  BIOS-BOOT
   3          270336         2367487   1024.0 MiB  FFFF  USR-A
   4         2367488         4464639   1024.0 MiB  FFFF  USR-B
   6         4464640         4726783   128.0 MiB   8300  OEM
   7         4726784         4857855   64.0 MiB    FFFF  OEM-CONFIG
   9         4857856       716544368   339.4 GiB   FFFF  ROOT

Command (? for help): q

And after rebooting:

 

Last login: Fri Dec 25 00:07:35 2015 from 192.168.1.151
CoreOS stable (835.9.0)
Failed Units: 1
  extend-filesystems.service
core@dl360g5 ~ $ df -h
Filesystem         Size  Used Avail Use% Mounted on
devtmpfs            16G     0   16G   0% /dev
tmpfs               16G     0   16G   0% /dev/shm
tmpfs               16G  480K   16G   1% /run
tmpfs               16G     0   16G   0% /sys/fs/cgroup
/dev/cciss/c0d0p9  329G   41M  316G   1% /
/dev/cciss/c0d0p3  985M  492M  442M  53% /usr
/dev/cciss/c0d0p1  128M   35M   94M  27% /boot
tmpfs               16G     0   16G   0% /media
tmpfs               16G     0   16G   0% /tmp
/dev/cciss/c0d0p6  108M   52K   99M   1% /usr/share/oem
core@dl360g5 ~ $

 

And now I have all the space I can from my raid-5 🙂

 

 

 

 

Tagged , , , , . Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • IGlr