码迷,mamicode.com
首页 > 其他好文 > 详细

大数据迁移之DRBD扩容

时间:2015-11-03 23:04:49      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:大数据迁移之drbd扩容

扩容主/备物理数据盘:


[root@MySQL02 ~]# drbdadm down data

[root@MySQL02 ~]# mount /dev/sdb1 /mnt/

[root@MySQL02 ~]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda3       7.2G  1.9G  5.0G  28% /

tmpfs           242M     0  242M   0% /dev/shm

/dev/sda1       194M   57M  128M  31% /boot

/dev/sdb1       380M   11M  350M   3% /mnt    # 可以看到备节点磁盘利用率只有380M

[root@MySQL02 ~]# parted /dev/sdb p

Model: Msft Virtual Disk (scsi)

Disk /dev/sdb: 2147MB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

 

Number  Start   End    Size   Type     File system  Flags

 1      32.3kB  814MB  814MB  primary  ext4    # 然而备节点真实大小为814M

 2      814MB   979MB  165MB  primary

[root@MySQL02 ~]# umount /mnt/

[root@MySQL02 ~]# e2fsck -f /dev/sdb1     # 查看分区大小

e2fsck 1.41.12 (17-May-2010)

Pass 1: Checking inodes, blocks, and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

/dev/sdb1: 38/100744 files (0.0% non-contiguous), 22971/401409 blocks

[root@MySQL02 ~]# resize2fs /dev/sdb1    # 重新分配分区(扩容)

resize2fs 1.41.12 (17-May-2010)

Resizing the filesystem on /dev/sdb1 to 795184 (1k) blocks.

The filesystem on /dev/sdb1 is now 795184 blocks long.

 

[root@MySQL02 ~]# mount /dev/sdb1 /mnt/

[root@MySQL02 ~]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda3       7.2G  1.9G  5.0G  28% /

tmpfs           242M     0  242M   0% /dev/shm

/dev/sda1       194M   57M  128M  31% /boot

/dev/sdb1       752M   11M  703M   2% /mnt    # 备节点磁盘空间已增加至最大

[root@MySQL02 ~]# ls /mnt/


本文出自 “奋斗吧” 博客,请务必保留此出处http://lvnian.blog.51cto.com/7155281/1709384

大数据迁移之DRBD扩容

标签:大数据迁移之drbd扩容

原文地址:http://lvnian.blog.51cto.com/7155281/1709384

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!