大資料移轉之DRBD擴容

來源:互聯網
上載者:User

標籤:大資料移轉之drbd擴容

擴容主/備物理資料盤:


[[email protected] ~]# drbdadm down data

[[email protected] ~]# mount /dev/sdb1 /mnt/

[[email protected] ~]# 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

[[email protected] ~]# 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

[[email protected] ~]# umount /mnt/

[[email protected] ~]# 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

[[email protected] ~]# 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.

 

[[email protected] ~]# mount /dev/sdb1 /mnt/

[[email protected] ~]# 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    # 備節點磁碟空間已增加至最大

[[email protected] ~]# ls /mnt/


本文出自 “奮鬥吧” 部落格,請務必保留此出處http://lvnian.blog.51cto.com/7155281/1709384

大資料移轉之DRBD擴容

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.