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

How to correctly display the new capacity of the partition corresponding to the client disk and the mounted disk after the SAN storage volume is expanded

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Summary:

The volume stored in SAN may not be in LVM mode. After adding new capacity to the volume, the client needs to restart to see the added capacity of the disk corresponding to the volume. After performing resize2fs on the disk, the partition mounted on the disk can see the newly added capacity.

-- determine that the disks that need additional capacity display 200G on the client side, 100G has been added on the storage side, but the client still displays 200G

[root@mdg /] # fdisk-l | grep / dev/mapper/3600a098038303867635d4a48624e5467

Disk / dev/mapper/3600a098038303867635d4a48624e5467: 214.7 GB, 214748364800 bytes

[root@mdg ~] # df-h | grep / u02test

/ dev/mapper/3600a098038303867635d4a48624e5467 197G 216M 187G 1% / u02test

-- execute the resize2fs command. The new disk capacity is 300g, but the client still displays 200g.

[root@mdg /] # resize2fs-help

Resize2fs 1.41.12 (17-May-2010)

Usage: resize2fs [- d debug_flags] [- f] [- F] [- M] [- P] [- p] device [new_size]

[root@mdg /] # resize2fs / dev/mapper/3600a098038303867635d4a48624e5467 300G

Resize2fs 1.41.12 (17-May-2010)

The containing partition (or device) is only 52428800 (4k) blocks.

You requested a new size of 78643200 blocks.

[root@mdg /] # fdisk-l | grep / dev/mapper/3600a098038303867635d4a48624e5467

Disk / dev/mapper/3600a098038303867635d4a48624e5467: 214.7 GB, 214748364800 bytes

[root@mdg ~] # df-h | grep / u02test

/ dev/mapper/3600a098038303867635d4a48624e5467 197G 216M 187G 1% / u02test

-- after reboot, the disk displays 300G normally on the client side.

[root@mdg /] # reboot

Broadcast message from root@mdg

(/ dev/pts/0) at 14:39.

The system is going down for reboot NOW!

[root@mdg /] #

Login as: root

Root@192.168.8.8's password:

Last login: Wed May 16 14:24:51 2018 from 192.168.1.3

[root@mdg ~] # fdisk-l | grep / dev/mapper/3600a098038303867635d4a48624e5467

Disk / dev/mapper/3600a098038303867635d4a48624e5467: 322.1 GB, 322122547200 bytes

-- mount the disk. The disk has displayed 300g normally, but the mount partition still shows 200g.

[root@mdg ~] # mount / dev/mapper/3600a098038303867635d4a48624e5467 / u02test

[root@mdg ~] # df-h | grep / u02test

/ dev/mapper/3600a098038303867635d4a48624e5467 197G 216M 187G 1% / u02test

-- execute the resize2fs command, and the new disk capacity of 300g is displayed normally in the mount partition of 300g.

[root@mdg ~] # resize2fs / dev/mapper/3600a098038303867635d4a48624e5467 300G

Resize2fs 1.41.12 (17-May-2010)

Filesystem at / dev/mapper/3600a098038303867635d4a48624e5467 is mounted on / u02 test; on-line resizing required

Old desc_blocks = 13, new_desc_blocks = 19

Performing an on-line resize of / dev/mapper/3600a098038303867635d4a48624e5467 to 78643200 (4k) blocks.

The filesystem on / dev/mapper/3600a098038303867635d4a48624e5467 is now 78643200 blocks long.

[root@mdg ~] # df-h | grep / u02test

/ dev/mapper/3600a098038303867635d4a48624e5467 296G 220m 281G 1% / u02test

-- the file is not lost, it is not damaged

[root@mdg ~] # cd / u02test

[root@mdg u02test] # ll

Total 29164

-rw-r--r-- 1 root root 12 May 16 14:10 123

-rw-r--r-- 1 oracle dba 12 May 16 14:12 123'2

-rw-r- 1 orahyprd oinstall 3509831 May 16 14:12 alert_HYPRD.log

-rw-r- 1 oracle oinstall 26327331 May 16 14:11 alert_MESDB.log

Drwx- 2 root root 16384 May 16 13:39 lost+found

[root@mdg u02test] # cat 123

Efefasdjlj

[root@mdg u02test] # cat 123_2

Efefasdjlj

[root@mdg u02test] # less alert_HYD.log

[root@mdg u02test] # less alert_MDB.log

-- after experimenting with constantly copying files to this partition, you can use 296g, indicating that the new capacity is effective.

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

Servers

Wechat

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

12
Report