-
Notifications
You must be signed in to change notification settings - Fork 0
Extending volume in OpenStack
Mats Bovin edited this page Sep 6, 2024
·
1 revision
To extend a volume it needs to be detached from the instance.
To re-attach a volume using the api:
(openstack-oscli) mats@xps-13:~$ openstack server list | grep live-solrcloud-3
| 126ac73a-a1ab-4431-83a2-b86e0ce1bf3e | live-solrcloud-3 | ACTIVE | default=10.65.0.32, 2a0a:bcc0:40:1::118 | N/A (booted from volume) | b2.c8r32 |
(openstack-oscli) mats@xps-13:~$ openstack volume list | grep live-solrcloud-3
| 99ff4b26-459e-4e88-97f5-ab708b2b4786 | live-solrcloud-3-vol-data | available | 500 | |
| 7b69fd8e-0ef3-4708-ad7c-43cdde9bad36 | live-solrcloud-3-vol-root | in-use | 20 | Attached to live-solrcloud-3 on /dev/sda |
(openstack-oscli) mats@xps-13:~$ openstack server add volume 126ac73a-a1ab-4431-83a2-b86e0ce1bf3e 99ff4b26-459e-4e88-97f5-ab708b2b4786 --device /dev/sdb
Various commands for displaying volume status and information:
df -Th
lsblk -f
sudo fdisk -l
sudo pvdisplay
sudo lvdisplay
Extend physical volume:
sudo pvresize /dev/sdb
Extend logical volume:
sudo lvextend -l +100%FREE /dev/vg_data/lv_data
Extend file system:
sudo xfs_growfs /dev/vg_data/lv_data