root@ceph01:/etc/ceph# rbd create --size 1024 test
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph# rbd ls
mysql-hzb
test
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph# rbd info
rbd: image name was not specified
root@ceph01:/etc/ceph# rbd info test
rbd image 'test':
size 1024 MB in 256 objects
order 22 (4096 kB objects)
block_name_prefix: rbd_data.10ac74b0dc51
format: 2
features: layering
flags:
root@ceph01:/etc/ceph# rbd map test
/dev/rbd0
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph# mkdir -p /root/testrbd/
root@ceph01:/etc/ceph# mkfs.xfs -q /dev/rbd0
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph# rbd showmapped
id pool image snap device
0 rbd test - /dev/rbd0
root@ceph01:/etc/ceph# mount /dev/rbd0 /root/testrbd/
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph# df -h /root/testrbd/
文件系统 容量 已用 可用 已用% 挂载点
/dev/rbd0 1014M 33M 982M 4% /root/testrbd
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph# rbd resize --size 2048 test
Resizing image: 100% complete...done.
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph# df -h /root/testrbd/
文件系统 容量 已用 可用 已用% 挂载点
/dev/rbd0 1014M 33M 982M 4% /root/testrbd
root@ceph01:/etc/ceph# rbd map test
/dev/rbd1
root@ceph01:/etc/ceph# df -h /root/testrbd/
文件系统 容量 已用 可用 已用% 挂载点
/dev/rbd0 1014M 33M 982M 4% /root/testrbd
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#
root@ceph01:/etc/ceph#

由以上可以看出:虽然image已经增大了两倍,但是挂载此image的文件系统/dev/rbd0/的大小并没有变

要想/dev/rbd0也增大,则要做下面操作,ext4和xfs格式的方法不一样

1)ext4

resize2fs /dev/rbd0

2)xfs

要在 resize之后执行
# xfs_growfs /root/testrbd/

最新文章

  1. 16-static和extern关键字2-对变量的作用
  2. 【Java EE 学习 73】【数据采集系统第五天】【参与调查】【导航处理】【答案回显】【保存答案】
  3. 查看Android系统是User模式还是Eng模式
  4. Windows 2008 R2 Powershell 3.0
  5. oracle 临时表学习
  6. ExecutorService与Executors例子的简单剖析(转)
  7. license文件生成原理
  8. js字符串转json
  9. [置顶] 【cocos2d-x入门实战】微信飞机大战之十二:分数的本地存储
  10. ThinkPHP运算符 与 SQL运算符 对比表
  11. 生物结构变异分析软件meerkat 0.189使用笔记(一)
  12. java中数组、list、泛型集合的长度
  13. Libevent库学习笔记
  14. UOJ #109「APIO2013」TASKSAUTHOR
  15. 在cikuapi.com上抓取相关词
  16. Android RxJava
  17. Python入门 序列章
  18. 小峰servlet/jsp(7)jstl国际化标签库、sql标签库等
  19. poj_2286 IDA*
  20. string.Empty与null与""

热门文章

  1. Condition分析
  2. Cassandra 的启动和初始化
  3. MySQL 慢查询日志切换
  4. kubectl get pods The connection to the server was refused - did you specify the rig
  5. 5 matplotlib-绘制精美的图表
  6. 22_java之File对象
  7. 基于七牛Python SDK写的一个批量下载脚本
  8. Django中多种重定向方法使用
  9. 加密算法blowfish 多语言
  10. 使用AdBlock plus屏蔽广告