Oct 182012
DRBDしているディスク容量が足りなくなったので増やしてみました。
DRBDサイトのマニュアル、6.15. Resizing resourcesに載っているように、LVM等を使っている場合はオンラインで拡張できるそうです。
同期対象のブロックデバイスはLVMで作ってあるので512MBから1GBまで増やします。
論理ボリューム:/dev/vg01/lv_share0
DRBDリソース名:share0
マウントポイント:/share0
1号機側
[root@centos61 ~]# df /share0 Filesystem 1K-blocks Used Available Use% Mounted on /dev/drbd0 507696 474421 7064 99% /share0 [root@centos61 ~]# drbd-overview 1:share0/0 Connected Primary/Secondary UpToDate/UpToDate C r----- /share0 ext4 496M 464M 6.9M 99% [root@centos61 ~]# lvdisplay /dev/vg01/lv_share0 --- Logical volume --- LV Path /dev/vg01/lv_share0 LV Name lv_share0 VG Name vg01 LV UUID VLqQh7-U1wH-OGCV-C3J3-YWHa-yxO0-haRurq LV Write Access read/write LV Creation host, time centos61, 2012-10-12 09:54:48 +0900 LV Status available # open 0 LV Size 512.00 MiB Current LE 128 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:3 [root@centos61 ~]# [root@centos61 ~]# lvextend -L 1G /dev/vg01/lv_share0 Extending logical volume lv_share0 to 1.00 GiB Logical volume lv_share0 successfully resized [root@centos61 ~]#
2号機側(論理ボリュームのサイズ等は1号機と同一なので省略)
[root@centos62 ~]# lvextend -L 1G /dev/vg01/lv_share0 Extending logical volume lv_share0 to 1.00 GiB Logical volume lv_share0 successfully resized [root@centos62 ~]#
1号機側(Primaryノード側)でDRBDサイズ変更実施
[root@centos61 ~]# drbdadm resize share0 [root@centos61 ~]#
何も表示されない。。。drbd-overviewでみてもサイズは変わっていないように見える。
よくわからないけど、このままファイルシステムのオンライン拡張を実施してみる。
[root@centos61 ~]# resize2fs /dev/drbd0 resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/drbd0 is mounted on /share0; on-line resizing required old desc_blocks = 2, new_desc_blocks = 4 Performing an on-line resize of /dev/drbd0 to 1048508 (1k) blocks. The filesystem on /dev/drbd0 is now 1048508 blocks long. [root@centos61 ~]# df /share0 Filesystem 1K-blocks Used Available Use% Mounted on /dev/drbd0 1015428 474556 488488 50% /share0 [root@centos61 ~]#
ちゃんと増えた 🙂
Sorry, the comment form is closed at this time.