Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The DRBD expansion of big data's Migration

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Expand the capacity of the master / backup physical data disk:

[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 # you can see that the disk utilization of the backup node is only 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 # however, the true size of the backup node is 814m

2 814MB 979MB 165MB primary

[root@MySQL02 ~] # umount / mnt/

[root@MySQL02 ~] # e2fsck-f / dev/sdb1 # View partition size

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 non-contiguous 100744 files (0.0% non-contiguous), 22971 Universe 401409 blocks

[root@MySQL02 ~] # resize2fs / dev/sdb1 # reallocate partitions (capacity expansion)

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 # backup node disk space has been increased to maximum

[root@MySQL02 ~] # ls / mnt/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report