找回密码
 注册
查看: 16|回复: 0

ceph 使用rbd扩容磁盘容量resize方式

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2024-11-2 15:50:12 | 显示全部楼层 |阅读模式

/ B/ v  I: v& Q6 O: t# q' U) _创建一个rbd块设备:7 e2 q4 f) ^8 w7 x
qemu-img create -f rbd rbd:volumes/openEuler-test  5G0 P7 Q$ m+ z. L, ^
3 h; e5 f1 C2 W9 F
扩容resize大小:
+ G- T) P; i2 [! M% S4 q# ]3 |0 m" ]rbd resize --size 1T  volumes/openEuler-test --allow-shrink; i  V8 L- i5 {( z, e

9 I( F4 Y0 v. L) i8 ]* f
4 c7 P- ~! H$ l- o+ V
, [0 T; ?. H  J3 Q' r1 z3 [6 g$ rbd info  volumes/openEuler-test1 l2 l( V% a, w8 D  b% m/ O
rbd image 'openEuler-test':
8 v2 P9 d" ?2 m        size 1 TiB in 262144 objects
2 j. M* ], L# V3 W. d! }        order 22 (4 MiB objects)
6 R5 h( E: t) w) ]        snapshot_count: 0$ H8 c- ^% Y6 O9 e9 K% W& J
        id: 9d5ccdb42adeb7 h0 t0 w+ l) v/ g( w. p$ }+ s
        block_name_prefix: rbd_data.9d5ccdb42adeb% |- R( f" v' O: l! \$ n7 ^
        format: 2
" g& y: K- c8 l, o, S: R- F* A        features: layering, exclusive-lock, object-map, fast-diff, deep-flatten: b" E3 M6 L. P0 `, M$ O4 w
        op_features:
/ B3 O5 m: Y! [; }7 v        flags: - X/ g7 y$ l9 X! s: m% r  H
        create_timestamp: Wed Oct 30 15:06:14 2024
0 [( @! i+ I8 Q5 Z6 t        access_timestamp: Sat Nov  2 15:37:16 2024
- s) c" ~) Z4 a" ^- A$ V        modify_timestamp: Sat Nov  2 15:44:24 2024
( M% K8 h1 F: I; t7 ^7 Q
  @9 F# ?+ i6 w9 N
0 G% |- L. `( i3 V磁盘扩容成功。% J6 l! x2 X; _! u; @( W
1 m- O# J$ N2 ~7 Q+ V1 G
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:09 , Processed in 0.017350 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表