分类: LINUX
2015-05-25 15:10:54
[root@linux ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 19G 11G 6.5G 63% /
tmpfs 995M 239M 756M 24% /dev/shm
/dev/sda1 194M 46M 139M 25% /boot
/dev/sda4 20G 1.4G 18G 7% /rman
/dev/sdb1 30G 863M 28G 4% /arch1
[root@linux ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00079a2c
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 217 1536000 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 217 2611 19229696 83 Linux
/dev/sda4 2611 5221 20966162+ 83 Linux
Disk /dev/sdb: 32.2 GB, 32212254720 bytes
64 heads, 51 sectors/track, 19275 cylinders
Units = cylinders of 3264 * 512 = 1671168 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4867b2f5
Device Boot Start End Blocks Id System
/dev/sdb1 1 19276 31456256 83 Linux
Disk /dev/sdc: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sde doesn't contain a valid partition table
Disk /dev/sdf: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdf doesn't contain a valid partition table
[root@linux ~]# ll /dev/sd*
brw-rw----. 1 root disk 8, 0 May 25 09:13 /dev/sda
brw-rw----. 1 root disk 8, 1 May 25 09:13 /dev/sda1
brw-rw----. 1 root disk 8, 2 May 25 09:13 /dev/sda2
brw-rw----. 1 root disk 8, 3 May 25 09:13 /dev/sda3
brw-rw----. 1 root disk 8, 4 May 25 09:13 /dev/sda4
brw-rw----. 1 root disk 8, 16 May 25 09:13 /dev/sdb
brw-rw----. 1 root disk 8, 17 May 25 09:13 /dev/sdb1
brw-rw----. 1 root disk 8, 32 May 25 09:13 /dev/sdc
brw-rw----. 1 root disk 8, 48 May 25 09:13 /dev/sdd
brw-rw----. 1 root disk 8, 64 May 25 09:13 /dev/sde
brw-rw----. 1 root disk 8, 80 May 25 09:13 /dev/sdf
[root@linux ~]# ]pvcreate /dev/sdc
-bash: ]pvcreate: command not found
[root@linux mnt]# mount /dev/cdrom /mnt/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@linux mnt]# cd /mnt/
[root@linux mnt]# ll
total 806
drwxr-xr-x. 3 root root 2048 May 27 2011 EFI
-rw-r--r--. 1 root root 7041 May 27 2011 EULA
-rw-r--r--. 1 root root 7041 May 27 2011 eula.en_US
-rw-r--r--. 1 root root 3334 May 27 2011 eula.py
-rw-r--r--. 1 root root 18390 May 27 2011 GPL
drwxr-xr-x. 3 root root 2048 May 27 2011 HighAvailability
drwxr-xr-x. 3 root root 2048 May 27 2011 images
drwxr-xr-x. 2 root root 2048 May 27 2011 isolinux
drwxr-xr-x. 3 root root 2048 May 27 2011 LoadBalancer
-rw-r--r--. 1 root root 98 May 27 2011 media.repo
drwxr-xr-x. 2 root root 636928 May 27 2011 Packages
-rw-r--r--. 1 root root 2619 May 27 2011 README-en
-rw-r--r--. 1 root root 7054 May 27 2011 README-en.html
-rw-r--r--. 1 root root 17643 May 27 2011 RELEASE-NOTES-en
-rw-r--r--. 1 root root 20003 May 27 2011 RELEASE-NOTES-en.html
-rw-r--r--. 1 root root 17643 May 27 2011 RELEASE-NOTES-x86_64-en
-rw-r--r--. 1 root root 20003 May 27 2011 RELEASE-NOTES-x86_64-en.html
-rw-r--r--. 1 root root 17643 May 27 2011 RELEASE-NOTES-x86-en
-rw-r--r--. 1 root root 20003 May 27 2011 RELEASE-NOTES-x86-en.html
lrwxrwxrwx. 1 root root 15 May 27 2011 repodata -> Server/repodata
drwxr-xr-x. 3 root root 2048 May 27 2011 ResilientStorage
-rw-r--r--. 1 root root 1011 May 27 2011 RPM-GPG-KEY
-rw-r--r--. 1 root root 1011 May 27 2011 RPM-GPG-KEY-oracle
drwxr-xr-x. 3 root root 2048 May 27 2011 ScalableFileSystem
drwxr-xr-x. 4 root root 2048 May 27 2011 Server
-rw-r--r--. 1 root root 108 May 27 2011 supportinfo
-r--r--r--. 1 root root 6301 May 27 2011 TRANS.TBL
[root@linux mnt]# cd Packages/
[root@linux Packages]# yum install lvm*
[root@linux Packages]# rpm -qa |grep lvm
lvm2-libs-2.02.83-3.el6.x86_64
lvm2-2.02.83-3.el6.x86_64
[root@linux Packages]# cd
[root@linux ~]# pvcreate /dev/sdc
Physical volume "/dev/sdc" successfully created
[root@linux ~]# pvcreate /dev/sdd
Physical volume "/dev/sdd" successfully created
[root@linux ~]# pvcreate /dev/sde
Physical volume "/dev/sde" successfully created
[root@linux ~]# pvcreate /dev/sdf
Physical volume "/dev/sdf" successfully created
[root@linux ~]# lvmdiskscan
/dev/ram0 [ 16.00 MiB]
/dev/ram1 [ 16.00 MiB]
/dev/sda1 [ 200.00 MiB]
/dev/ram2 [ 16.00 MiB]
/dev/sda2 [ 1.46 GiB]
/dev/ram3 [ 16.00 MiB]
/dev/sda3 [ 18.34 GiB]
/dev/ram4 [ 16.00 MiB]
/dev/sda4 [ 19.99 GiB]
/dev/ram5 [ 16.00 MiB]
/dev/ram6 [ 16.00 MiB]
/dev/ram7 [ 16.00 MiB]
/dev/ram8 [ 16.00 MiB]
/dev/ram9 [ 16.00 MiB]
/dev/ram10 [ 16.00 MiB]
/dev/ram11 [ 16.00 MiB]
/dev/ram12 [ 16.00 MiB]
/dev/ram13 [ 16.00 MiB]
/dev/ram14 [ 16.00 MiB]
/dev/ram15 [ 16.00 MiB]
/dev/sdb1 [ 30.00 GiB]
/dev/sdc [ 5.00 GiB] LVM physical volume
/dev/sdd [ 5.00 GiB] LVM physical volume
/dev/sde [ 5.00 GiB] LVM physical volume
/dev/sdf [ 5.00 GiB] LVM physical volume
0 disks
21 partitions
4 LVM physical volume whole disks
0 LVM physical volumes
[root@linux ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdc lvm2 a- 5.00g 5.00g
/dev/sdd lvm2 a- 5.00g 5.00g
/dev/sde lvm2 a- 5.00g 5.00g
/dev/sdf lvm2 a- 5.00g 5.00g
[root@linux ~]# pvscan
PV /dev/sdc lvm2 [5.00 GiB]
PV /dev/sdd lvm2 [5.00 GiB]
PV /dev/sde lvm2 [5.00 GiB]
PV /dev/sdf lvm2 [5.00 GiB]
Total: 4 [20.00 GiB] / in use: 0 [0 ] / in no VG: 4 [20.00 GiB]
[root@linux ~]# pvdisplay
"/dev/sdc" is a new physical volume of "5.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdc
VG Name
PV Size 5.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID l9WHQw-iiEw-6bcM-5cA3-AmRN-13vE-FSR1mE
"/dev/sdd" is a new physical volume of "5.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdd
VG Name
PV Size 5.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID GdU1Wp-KXFM-pgvy-DmFk-h72v-tBQs-CO57Eq
"/dev/sde" is a new physical volume of "5.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sde
VG Name
PV Size 5.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID ayVCDe-OCOY-yYVY-NeB9-48dQ-eP1e-6yVjkU
"/dev/sdf" is a new physical volume of "5.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdf
VG Name
PV Size 5.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID ZErfJH-ZyJz-QjBS-AWMv-BL03-d0Yq-dAaQbZ
[root@linux ~]# vgcreate datavg /dev/sdc /dev/sdd /dev/sde /dev/sdf
Volume group "datavg" successfully created
[root@linux ~]# vgchange -a y datavg
0 logical volume(s) in volume group "datavg" now active
[root@linux ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "datavg" using metadata type lvm2
[root@linux ~]# vgs
VG #PV #LV #SN Attr VSize VFree
datavg 4 0 0 wz--n- 19.98g 19.98g
[root@linux ~]# vgdiskplay
-bash: vgdiskplay: command not found
[root@linux ~]# vgdisplay
--- Volume group ---
VG Name datavg
System ID
Format lvm2
Metadata Areas 4
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 4
Act PV 4
VG Size 19.98 GiB
PE Size 4.00 MiB
Total PE 5116
Alloc PE / Size 0 / 0
Free PE / Size 5116 / 19.98 GiB
VG UUID 8ipavP-2HNI-Qx7Q-jCnA-8XVZ-cpWl-UUmEOv
[root@linux ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sdc
VG Name datavg
PV Size 5.00 GiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1279
Free PE 1279
Allocated PE 0
PV UUID l9WHQw-iiEw-6bcM-5cA3-AmRN-13vE-FSR1mE
--- Physical volume ---
PV Name /dev/sdd
VG Name datavg
PV Size 5.00 GiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1279
Free PE 1279
Allocated PE 0
PV UUID GdU1Wp-KXFM-pgvy-DmFk-h72v-tBQs-CO57Eq
--- Physical volume ---
PV Name /dev/sde
VG Name datavg
PV Size 5.00 GiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1279
Free PE 1279
Allocated PE 0
PV UUID ayVCDe-OCOY-yYVY-NeB9-48dQ-eP1e-6yVjkU
--- Physical volume ---
PV Name /dev/sdf
VG Name datavg
PV Size 5.00 GiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1279
Free PE 1279
Allocated PE 0
PV UUID ZErfJH-ZyJz-QjBS-AWMv-BL03-d0Yq-dAaQbZ
[root@linux ~]# vgdisplay datavg| grep "Total PE"
Total PE 5116
[root@linux ~]# lvcreate -l 5116 datavg -n datalv
Logical volume "datalv" created
[root@linux ~]# ls -l /dev/datavg/datalv
lrwxrwxrwx. 1 root root 7 May 25 11:07 /dev/datavg/datalv -> ../dm-0
[root@linux ~]# mkfs.ext4 /dev/datavg/datalv
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1310720 inodes, 5238784 blocks
261939 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
160 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@linux ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 19G 11G 6.5G 63% /
tmpfs 995M 238M 758M 24% /dev/shm
/dev/sda1 194M 46M 139M 25% /boot
/dev/sda4 20G 1.4G 18G 7% /rman
/dev/sdb1 30G 863M 28G 4% /arch1
/dev/sr0 3.4G 3.4G 0 100% /mnt
[root@linux ~]# mkdir /data
[root@linux ~]# mount /dev/datavg/datalv /data
[root@linux ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 19G 11G 6.5G 63% /
tmpfs 995M 238M 758M 24% /dev/shm
/dev/sda1 194M 46M 139M 25% /boot
/dev/sda4 20G 1.4G 18G 7% /rman
/dev/sdb1 30G 863M 28G 4% /arch1
/dev/sr0 3.4G 3.4G 0 100% /mnt
/dev/mapper/datavg-datalv
20G 172M 19G 1% /data
[root@linux ~]# vi /etc/fstab
/dev/datavg/datalv /data ext4 defaults 1 2
新增5G的磁盘,对VG扩容:
[root@linux ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00079a2c
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 217 1536000 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 217 2611 19229696 83 Linux
/dev/sda4 2611 5221 20966162+ 83 Linux
Disk /dev/sdb: 32.2 GB, 32212254720 bytes
64 heads, 51 sectors/track, 19275 cylinders
Units = cylinders of 3264 * 512 = 1671168 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4867b2f5
Device Boot Start End Blocks Id System
/dev/sdb1 1 19276 31456256 83 Linux
Disk /dev/sdc: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sde doesn't contain a valid partition table
Disk /dev/sdf: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdf doesn't contain a valid partition table
Disk /dev/sdg: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdg doesn't contain a valid partition table -------------新增的磁盘
Disk /dev/mapper/datavg-datalv: 21.5 GB, 21458059264 bytes
255 heads, 63 sectors/track, 2608 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/datavg-datalv doesn't contain a valid partition table
[root@linux ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdc datavg lvm2 a- 5.00g 0
/dev/sdd datavg lvm2 a- 5.00g 0
/dev/sde datavg lvm2 a- 5.00g 0
/dev/sdf datavg lvm2 a- 5.00g 0
[root@linux ~]# ll /dev/sd*
brw-rw----. 1 root disk 8, 0 May 25 13:58 /dev/sda
brw-rw----. 1 root disk 8, 1 May 25 13:58 /dev/sda1
brw-rw----. 1 root disk 8, 2 May 25 13:58 /dev/sda2
brw-rw----. 1 root disk 8, 3 May 25 13:58 /dev/sda3
brw-rw----. 1 root disk 8, 4 May 25 13:58 /dev/sda4
brw-rw----. 1 root disk 8, 16 May 25 13:58 /dev/sdb
brw-rw----. 1 root disk 8, 17 May 25 13:58 /dev/sdb1
brw-rw----. 1 root disk 8, 32 May 25 13:58 /dev/sdc
brw-rw----. 1 root disk 8, 48 May 25 13:58 /dev/sdd
brw-rw----. 1 root disk 8, 64 May 25 13:58 /dev/sde
brw-rw----. 1 root disk 8, 80 May 25 13:58 /dev/sdf
brw-rw----. 1 root disk 8, 96 May 25 13:58 /dev/sdg
[root@linux ~]# pvcreate /dev/sdg
Physical volume "/dev/sdg" successfully created
[root@linux ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdc datavg lvm2 a- 5.00g 0
/dev/sdd datavg lvm2 a- 5.00g 0
/dev/sde datavg lvm2 a- 5.00g 0
/dev/sdf datavg lvm2 a- 5.00g 0
/dev/sdg lvm2 a- 5.00g 5.00g
[root@linux ~]# vgextend datavg /dev/sdg
Volume group "datavg" successfully extended
[root@linux ~]# vgs
VG #PV #LV #SN Attr VSize VFree
datavg 5 1 0 wz--n- 24.98g 5.00g
[root@linux ~]# vgdisplay
--- Volume group ---
VG Name datavg
System ID
Format lvm2
Metadata Areas 5
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 5
Act PV 5
VG Size 24.98 GiB
PE Size 4.00 MiB
Total PE 6395
Alloc PE / Size 5116 / 19.98 GiB
Free PE / Size 1279 / 5.00 GiB
VG UUID 8ipavP-2HNI-Qx7Q-jCnA-8XVZ-cpWl-UUmEOv
[root@linux ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdc datavg lvm2 a- 5.00g 0
/dev/sdd datavg lvm2 a- 5.00g 0
/dev/sde datavg lvm2 a- 5.00g 0
/dev/sdf datavg lvm2 a- 5.00g 0
/dev/sdg datavg lvm2 a- 5.00g 5.00g
[root@linux ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "datavg" using metadata type lvm2
[root@linux ~]# vgreduce datavg /dev/sdg ----------把sdg从datavg中剔除
Removed "/dev/sdg" from volume group "datavg"
[root@linux ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdc datavg lvm2 a- 5.00g 0
/dev/sdd datavg lvm2 a- 5.00g 0
/dev/sde datavg lvm2 a- 5.00g 0
/dev/sdf datavg lvm2 a- 5.00g 0
/dev/sdg lvm2 a- 5.00g 5.00g
[root@linux ~]# vgextend datavg /dev/sdg
Volume group "datavg" successfully extended
[root@linux ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdc datavg lvm2 a- 5.00g 0
/dev/sdd datavg lvm2 a- 5.00g 0
/dev/sde datavg lvm2 a- 5.00g 0
/dev/sdf datavg lvm2 a- 5.00g 0
/dev/sdg datavg lvm2 a- 5.00g 5.00g
[root@linux ~]# lvextend -L +5G /dev/datavg/datalv
Extending logical volume datalv to 24.98 GiB
Insufficient free space: 1280 extents needed, but only 1279 available ------------这里lv扩展5G出现问题,应该改小一点
[root@linux ~]# lvextend -L +4.98G /dev/datavg/datalv
Rounding up size to full physical extent 4.98 GiB
Extending logical volume datalv to 24.96 GiB
Logical volume datalv successfully resized
[root@linux ~]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
datalv datavg -wi-ao 24.96g ---------------可以看到lv大小为25G了
[root@linux ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 19G 11G 6.5G 63% /
tmpfs 995M 216M 779M 22% /dev/shm
/dev/sda1 194M 46M 139M 25% /boot
/dev/sda4 20G 1.4G 18G 7% /rman
/dev/sdb1 30G 885M 28G 4% /arch1
/dev/mapper/datavg-datalv 20G 172M 19G 1% /data ----------这里还是显示20G
[root@linux ~]# resize2fs /dev/datavg/datalv --------修改文件系统大小以实现利用扩充的空间
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/datavg/datalv is mounted on /data; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 2
Performing an on-line resize of /dev/datavg/datalv to 6544384 (4k) blocks.
The filesystem on /dev/datavg/datalv is now 6544384 blocks long.
[root@linux ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 19G 11G 6.5G 63% /
tmpfs 995M 219M 777M 22% /dev/shm
/dev/sda1 194M 46M 139M 25% /boot
/dev/sda4 20G 1.4G 18G 7% /rman
/dev/sdb1 30G 885M 28G 4% /arch1
/dev/mapper/datavg-datalv 25G 172M 24G 1% /data -----------------显示为25G里加盘成功!!