Linux卷配置管理
[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里加盘成功!!
Linux卷配置管理的更多相关文章
- 【Linux卷管理】LVM创建与管理
安装LVM 首先确定系统中是否安装了lvm工具: [root@jetsen ~]# rpm -qa|grep lvm system-config-lvm-1.1.5-1.0.el5 lvm2-2.02 ...
- 【Linux卷管理】LVM原理
LVM 简介 每个Linux使用者在安装Linux时 都会遇到这样的困境:在为系统分区时,如何精确评估和分配各个硬盘分区的容量,因为系统管理员不但要考虑到当前某个分区需要的容量,还要预见该分区以后可能 ...
- linux 网络配置管理
[1]网络配置基础 (1)用户既可以通过命令行的方式,也可以通过友好的图形界面,轻松完成网络配置. (2)实现Linux网络配置的惟一目标就是修改系统中众多的网络配置文件, 如/etc/interfa ...
- Linux IPMI 配置管理.md
DELL 服务器 user id 范围:1-16 可以修改用户名和密码 不允许用户名重复 当设置一个已存在的用户名时,无论user id在前或在后,修改密码会将该项用户名设置为空,enable会恢复成 ...
- Unix&Linux技术文章目录(2015-12-22更新)
Unix & Linux 方面的博客整理.归纳分类,要坚持不懈的学习Unix &Linux,加油!技术需要累积和沉淀.更需要锲而不舍的精神.持之以恒的毅力!借此下面名句勉励自己! 书上 ...
- Linux运维工程师成长必经之路
本路线图是从0基础开始,全方位由浅入深,按照多年Linux培训经验和优秀教学方法制定的学习思路和学习方法,路线图包括初级入门.中级进阶.高级提升和资深冲刺四个阶段,每阶段对应着不同优秀的课程和学习方法 ...
- linux学习笔记全-如何学习linux?
简介 今天整理文件整理出了好多年前学习linux的笔记 就整理下发布在博客上怕文件形式会误删. linux入门基础对于新手而言不推荐看书!!不推荐看书!!(大牛跳过)先看视频看linuxcast的视频 ...
- 如何在给快满的Linux分区"无伤"扩容
1. 首先在虚拟机设置里面设置磁盘的扩展,前提条件是该虚拟机没有快照. 2. 在虚拟机设置好以后,需要开机在系统里扩容磁盘 3. 使用 # fdisk /dev/sda 扩展磁盘,具体操作使用 m 选 ...
- Linux入门基础教程
转载自:http://www.centoscn.com/CentOS/2015/0528/5555.html 1. 1 Linux操作系统简介 Linux是一套免费使用和自由传播的类Unix ...
随机推荐
- vs2008编译openssl问题
运行openssl demo 时,debug 版本正常,release 版本报异常:OPENSSL_Uplink(585E6000,08): no OPENSSL_Applink .demo 编译环境 ...
- 替换Notes,K2 BPM为vivo打造新平台
vivo是步步高旗下的分品牌,专注于智能手机领域,隶属于广东步步高工业电子有限公司.vivo追求乐趣.充满活力.年轻时尚的群体一起打造拥有卓越外观.专业级音质.极致影像.愉悦体验的智能产品,并将敢于追 ...
- hdu 1050 (preinitilization or postcleansing, std::fill) 分类: hdoj 2015-06-18 11:33 34人阅读 评论(0) 收藏
errors, clauses in place, logical ones, should be avoided. #include <cstdio> #include <cstr ...
- iMacros 教程
imacros能记录你在网页中的动作,然后模拟你的动作自动重复执行.进阶应用主要在于两个方面: 1.用JS动态调用,重复执行之. 2.调用CSV文件,这个不错哦. 还可以调用数据库,这个没用过. 安装 ...
- 第1章 Express MongoDB 搭建多人博客
学习环境 Node.js : 0.10.22 + Express : 3.4.4 + MongoDB : 2.4.8 + 快速开始 安装 Express express 是 Node.js 上最流行的 ...
- layoutSubviews总结
ios layout机制相关方法 - (CGSize)sizeThatFits:(CGSize)size - (void)sizeToFit ——————- - (void)layoutSubview ...
- **stack smashing detecting**
stack smashing aborted 堆 猛烈撞击 流失 我在使用数据时写了 tmp_row = row + pos[num1][[0]; tmp_col = col + pos[num1][ ...
- php:上传多个文件
<?php class upload { public $files; public $seterror; public $allowtype; public $file ...
- App.config/Web.config 中特殊字符的处理
我们知道在应用程序中嵌入连接字符串可能导致安全漏洞和维护问题.使用 Ildasm.exe(MSIL 反汇编程序) 工具可以查看编译到应用程序源代码中的未加密连接字符串.此外,如果连接字符串发生更改,则 ...
- wordpress(二)wordpress环境迁移
迁移wordpress到服务器 本地环境如下 win8.1 appser 服务器环境如下 centos7 lnmp 1.使用phpmyadmin备份本地wordpress站点的数据库 2.备份本地wo ...