Adjust the file system size under AIX

xiaoxiao2021-03-06  40

In the process of installing the software, we often find that the existing partition is not big enough or when adding a new hard disk.

The increase in space has not been taken, this time you need to adjust the size of the partition.

This process is generally as follows:

1. First determine the volume group you are using

============================================================================================================================================================================================================= ===========================

# lsvg -o

rootvg

#

============================================================================================================================================================================================================= ===========================

Because I only set a rootvg volume group on my machine, I just need to operate it, others like

.

2. View volume group information

============================================================================================================================================================================================================= ===========================

# lsvg rootvg

Volume Group: rootvg vg identifier: 00098d9f00004C0000000

0F9B120700B

VG State: Active PP Size: 64 megabyte (s)

VG Permission: Read / Write Total PPS: 542 (34688 Megabytes)

Max LVS: 256 Free PPS: 390 (24960 megabytes)

LVS: 9 Used PPS: 152 (9728 Megabytes) Open LVS: 8 Quorum: 2

Total PVS: 1 VG DESCRIPTORS: 2

Stale PVS: 0 Stale PPS: 0

Active PVS: 1 Auto ON: YES

MAX PPS Per PV: 1016 MAX PVS: 32

LTG Size: 128 kilobyte (s) auto sync: no

Hot Spare: NO

#

============================================================================================================================================================================================================= ===========================

Total PPS: 542 (34688 Megabytes) This line indicates that your machine's existing hard disk space, or

It is said that the system can identify the physical space size, my hard disk is a 36G.

Free PPS: 390 (24960 megabytes) This line said that there is how much hard disk space is not used, from here you

You can add space to your file system, I have about 24G left.

Used PPS: 152 (9728 Megabytes) Existing file system Physical use, I used 9G.

3. You can view the size and usage of the existing file system before adding space.

============================================================================================================================================================================================================= ===========================

# df -tk

Filesystem 1024-block used free% Used mounted ON

/ DEV / HD4 131072 17452 113620 14% /

/ DEV / HD2 3211264 1288216 1923048 41% / usr

/ dev / hd9var 589824 23800 566024 5% / VAR / DEV / HD3 589824 18684 571140 4% / TMP

/ DEV / HD1 3145728 2023192 1122536 65% / home

/ Proc - - - - / Proc

/ DEV / HD10OPT 65536 9000 56536 14% / OPT

/ DEV / CD0 638662 638662 0 100% / CDROM

#

============================================================================================================================================================================================================= ===========================

-k parameter indicates that I will view it by 1024byte / block, so my / home directory has about 3G space.

4. Increase my / home file system space, can be done with the smitty fs or the following command, but increase the number

The amount is limited by the amount of Free PPS before. Because the increased file system is easy, it is difficult to reduce, because

This suggests to create a new file system, so you can reclaim the space by deleting the file system after you run out.

============================================================================================================================================================================================================= ===========================

# chfs -a size = 2000000 / home

Filesystem size change to 8388608

#

============================================================================================================================================================================================================= =========================== Increased 200,000 blocks, each block is 512 bytes, so it is increased by 1048576k, 1G Bar.

5. Now check the file system again

============================================================================================================================================================================================================= ===========================

# df -tk

Filesystem 1024-block used free% Used mounted ON

/ DEV / HD4 131072 17452 113620 14% /

/ DEV / HD2 3211264 1288216 1923048 41% / usr

/ dev / hd9var 589824 23800 566024 5% / var

/ DEV / HD3 589824 18684 571140 4% / TMP

/ DEV / HD1 4194304 2056608 2137696 50% / home

/ Proc - - - - / Proc

/ DEV / HD10OPT 65536 9000 56536 14% / OPT

/ DEV / CD0 638662 638662 0 100% / CDROM

#

============================================================================================================================================================================================================= ==================================================================================================================================================================================

By the way, the / usr is equivalent to the Window's Program Files, when installing the software, it is not enough system.

Expand it. When using daily use, you can not use / usr unless the user puts its own files under / usr, this habit is very

not good

-

转载请注明原文地址:https://www.9cbs.com/read-86073.html

New Post(0)