I have two CentOS7 VMs in Primary/Secondary state.
My goal is to increase DRBD block size.
for that I did these steps:
1. added new HD.
2. created new Partition with
fdisk - formatted as LVM (
3. added the new partition to vg:
vgextend vg_DRBD /dev/sdc1
4. increased lv:
lvresize -l +2559 /dev/vg_DRBD/lv_DRBD /dev/sdc1
[root@localhost]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 vg_DRBD lvm2 a-- 10.00g 0 /dev/sdc1 vg_DRBD lvm2 a-- 10.00g 0 [root@localhost admin]# lvdisplay --- Logical volume --- LV Path /dev/vg_DRBD/lv_DRBD LV Name lv_DRBD VG Name vg_DRBD LV Write Access read/write LV Creation host, time localhost, 2017-02-26 15:49:05 +0000 LV Status available # open 2 LV Size 19.99 GiB Current LE 5118 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0
after I checked that indeed LV has grown I continued.
5.resize drbd block on one node:
drbdadm resize r0
[root@localhost admin]# drbd-overview 0:r0/0 Connected Primary/Secondary UpToDate/UpToDate /drbd_data ext4 9.9G 338M 9.0G 4%
from this output I realized that the DRBD block didn't grow.
so I tried to update filesystem:
6. update filesystem, run on the primary node:
[root@localhost admin]# resize2fs /dev/vg_DRBD/lv_DRBD resize2fs 1.42.9 (28-Dec-2013) resize2fs: Device or resource busy while trying to open /dev/vg_DRBD/lv_DRBD Couldn't find valid filesystem superblock.
I get the error above, that says the resouce is busy.
So I run this on the secondary node and I get the same error. but nothing use it!
I read this problem happens sometimes if there is an error with the filesystem, I tried to fix it and destroy the filesystem (like change permissions to ???) so I returned the snapshot back.
I want to increase the block Online without any data loss, do you have any idea what I'm doing wrong?