My postgres parition was full and I desperately needed to increase its size, in order to report some performance numbers.
I couldn’t afford to loose the data (and my shit). So I followed these steps to safely increase the size of that partition based on xfs, which existed on a logical volume already.
Self help commands and assumptions:
- disk is /dev/vdb/
- xfs is mounted on /dev/vg_pg/lv_pg
- we grew the disk by 20 Gigs
1
|
|
Delete and resize partition. Let’s say we’re working with Partition 1 here:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Now, reboot system.
Run partprobe
to be sure all went well.
Then, run these set of commands:
1 2 3 4 5 |
|
Refs:
- https://help.1and1.com/servers-c37684/dynamic-cloud-server-linux-c73266/increase-the-physical-volume-size-of-a-linux-1and1-dynamic-cloud-server-a771780.html
- https://access.redhat.com/solutions/697303
- https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/xfsgrow.html