扩展目标分区前提:

扩展的分区必须要是linux lvm卷如下截图(分区/dev/sda1不可以扩展,分区/dev/sda2可以扩展)

1

提示:决定linux lvm的因素是磁盘第一次分区时候选择的分区格式决定的。如下图列出了linux下支持的分区格式

2

SSH Secure Shell 3.2.9 (Build 283)

Copyright (c) 2000-2003 SSH Communications Security Corp - http://www.ssh.com/

This copy of SSH Secure Shell is a non-commercial version.

This version does not include PKI and PKCS #11 functionality.

Last login: Fri Dec 18 15:51:53 2015 from 192.168.19.1

 1.查看当前磁盘空间

[root@mail ~]# df -h

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  948K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

[root@mail ~]# df -h

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  948K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

[root@mail ~]# fdisk -l

Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x494832b4

Device     Boot   Start      End  Sectors  Size Id Type

/dev/sda1  *       2048  1026047  1024000  500M 83 Linux

/dev/sda2       1026048 41943039 40916992 19.5G 8e Linux LVM

Disk /dev/mapper/fedora-swap: 2 GiB, 2147483648 bytes, 4194304 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/fedora-root: 17.5 GiB, 18798870528 bytes, 36716544 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@mail ~]# pvdisplay

  --- Physical volume ---

  PV Name               /dev/sda2

  VG Name               fedora

  PV Size               19.51 GiB / not usable 3.00 MiB

  Allocatable           yes (but full)

  PE Size               4.00 MiB

  Total PE              4994

  Free PE               0

  Allocated PE          4994

  PV UUID               WX9LBx-nFSo-mVyM-3INs-T04v-lKg4-kXFiKk

[root@mail ~]# pvcreate /dev/sd

  Device /dev/sd not found (or ignored by filtering).

[root@mail ~]# pvcreate /dev/sd*

  Device /dev/sda not found (or ignored by filtering).

  Can't open /dev/sda1 exclusively.  Mounted filesystem?

  Can't initialize physical volume "/dev/sda2" of volume group "fedora" without -ff

[root@mail ~]# pvcreate /dev/sdb

  Device /dev/sdb not found (or ignored by filtering).

[root@mail ~]# pvdisplay /dev/sda2

  --- Physical volume ---

  PV Name               /dev/sda2

  VG Name               fedora

  PV Size               19.51 GiB / not usable 3.00 MiB

  Allocatable           yes (but full)

  PE Size               4.00 MiB

  Total PE              4994

  Free PE               0

  Allocated PE          4994

  PV UUID               WX9LBx-nFSo-mVyM-3INs-T04v-lKg4-kXFiKk

[root@mail ~]# pvdisplay /dev/sda3

  Failed to find device for physical volume "/dev/sda3".

[root@mail ~]# df -lh

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  948K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

[root@mail ~]# df -h

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  948K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

[root@mail ~]# fdisk -l

Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x494832b4

Device     Boot   Start      End  Sectors  Size Id Type

/dev/sda1  *       2048  1026047  1024000  500M 83 Linux

/dev/sda2       1026048 41943039 40916992 19.5G 8e Linux LVM

Disk /dev/mapper/fedora-swap: 2 GiB, 2147483648 bytes, 4194304 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/fedora-root: 17.5 GiB, 18798870528 bytes, 36716544 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@mail ~]# vgextend fedora /dev/sda2

  Physical volume '/dev/sda2' is already in volume group 'fedora'

  Unable to add physical volume '/dev/sda2' to volume group 'fedora'.

(这里要先添加磁盘分区)

3

2.创建磁盘分区

[root@mail ~]# fdisk /dev/sda

Welcome to fdisk (util-linux 2.26.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Command (m for help): m

Help:

  DOS (MBR)

   a   toggle a bootable flag

   b   edit nested BSD disklabel

   c   toggle the dos compatibility flag

  Generic

   d   delete a partition

   l   list known partition types

   n   add a new partition

   p   print the partition table

   t   change a partition type

   v   verify the partition table

  Misc

   m   print this menu

   u   change display/entry units

   x   extra functionality (experts only)

  Script

   I   load disk layout from sfdisk script file

   O   dump disk layout to sfdisk script file

  Save & Exit

   w   write table to disk and exit

   q   quit without saving changes

  Create a new label

   g   create a new empty GPT partition table

   G   create a new empty SGI (IRIX) partition table

   o   create a new empty DOS partition table

   s   create a new empty Sun partition table

Command (m for help): n

Partition type

   p   primary (2 primary, 0 extended, 2 free)

   e   extended (container for logical partitions)

Select (default p): p

Partition number (3,4, default 3): 3

First sector (41943040-62914559, default 41943040):

Last sector, +sectors or +size{K,M,G,T,P} (41943040-62914559, default 62914559):

Created a new partition 3 of type 'Linux' and of size 10 GiB.

Command (m for help): w

The partition table has been altered.

Calling ioctl() to re-read partition table.

Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

[root@mail ~]# df -lh

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  948K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

3./dev/sda3即是新创建的磁盘

[root@mail ~]# fdisk -l

Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x494832b4

Device     Boot    Start      End  Sectors  Size Id Type

/dev/sda1  *        2048  1026047  1024000  500M 83 Linux

/dev/sda2        1026048 41943039 40916992 19.5G 8e Linux LVM

/dev/sda3       41943040 62914559 20971520   10G 83 Linux

Disk /dev/mapper/fedora-swap: 2 GiB, 2147483648 bytes, 4194304 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/fedora-root: 17.5 GiB, 18798870528 bytes, 36716544 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

4.把/dev/sda3更改成linux lvm卷(便于加入linux lvm然后空间加入根分区)

[root@mail ~]# fdisk /dev/sda

Welcome to fdisk (util-linux 2.26.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Command (m for help): n

To create more partitions, first replace a primary with an extended partition.

Command (m for help): p

Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x494832b4

Device     Boot    Start      End  Sectors  Size Id Type

/dev/sda1  *        2048  1026047  1024000  500M 83 Linux

/dev/sda2        1026048 41943039 40916992 19.5G 8e Linux LVM

/dev/sda3       41943040 62914559 20971520   10G 83 Linux

Command (m for help): 3

3: unknown command

Command (m for help):

Command (m for help): m

Help:

  DOS (MBR)

   a   toggle a bootable flag

   b   edit nested BSD disklabel

   c   toggle the dos compatibility flag

  Generic

   d   delete a partition

   l   list known partition types

   n   add a new partition

   p   print the partition table

   t   change a partition type

   v   verify the partition table

  Misc

   m   print this menu

   u   change display/entry units

   x   extra functionality (experts only)

  Script

   I   load disk layout from sfdisk script file

   O   dump disk layout to sfdisk script file

  Save & Exit

   w   write table to disk and exit

   q   quit without saving changes

  Create a new label

   g   create a new empty GPT partition table

   G   create a new empty SGI (IRIX) partition table

   o   create a new empty DOS partition table

   s   create a new empty Sun partition table

Command (m for help): n

To create more partitions, first replace a primary with an extended partition.

Command (m for help): t

Partition number (1-3, default 3): 3

Partition type (type L to list all types): 8e

Changed type of partition 'Linux' to 'Linux LVM'.

Command (m for help): w

The partition table has been altered.

Calling ioctl() to re-read partition table.

Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

[root@mail ~]# df -lh

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  948K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

5./dev/sda3已经成功更改为linux lvm卷

[root@mail ~]# fdisk -l

Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x494832b4

Device     Boot    Start      End  Sectors  Size Id Type

/dev/sda1  *        2048  1026047  1024000  500M 83 Linux

/dev/sda2        1026048 41943039 40916992 19.5G 8e Linux LVM

/dev/sda3       41943040 62914559 20971520   10G 8e Linux LVM

Disk /dev/mapper/fedora-swap: 2 GiB, 2147483648 bytes, 4194304 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/fedora-root: 17.5 GiB, 18798870528 bytes, 36716544 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@mail ~]# df -T

Filesystem              Type     1K-blocks    Used Available Use% Mounted on

devtmpfs                devtmpfs    124256       0    124256   0% /dev

tmpfs                   tmpfs       133964       0    133964   0% /dev/shm

tmpfs                   tmpfs       133964     948    133016   1% /run

tmpfs                   tmpfs       133964       0    133964   0% /sys/fs/cgroup

/dev/mapper/fedora-root ext4      17938864 5447232  11557336  33% /

tmpfs                   tmpfs       133964       8    133956   1% /tmp

/dev/sda1               ext4        487652  101297    356659  23% /boot

tmpfs                   tmpfs        26796       0     26796   0% /run/user/0

[root@mail ~]# df -TH

Filesystem              Type      Size  Used Avail Use% Mounted on

devtmpfs                devtmpfs  128M     0  128M   0% /dev

tmpfs                   tmpfs     138M     0  138M   0% /dev/shm

tmpfs                   tmpfs     138M  971k  137M   1% /run

tmpfs                   tmpfs     138M     0  138M   0% /sys/fs/cgroup

/dev/mapper/fedora-root ext4       19G  5.6G   12G  33% /

tmpfs                   tmpfs     138M  8.2k  138M   1% /tmp

/dev/sda1               ext4      500M  104M  366M  23% /boot

tmpfs                   tmpfs      28M     0   28M   0% /run/user/0

[root@mail ~]# df -lh

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  948K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

[root@mail ~]# fdisk -l

Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x494832b4

Device     Boot    Start      End  Sectors  Size Id Type

/dev/sda1  *        2048  1026047  1024000  500M 83 Linux

/dev/sda2        1026048 41943039 40916992 19.5G 8e Linux LVM

/dev/sda3       41943040 62914559 20971520   10G 8e Linux LVM

Disk /dev/mapper/fedora-swap: 2 GiB, 2147483648 bytes, 4194304 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/fedora-root: 17.5 GiB, 18798870528 bytes, 36716544 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@mail ~]# fdisk /dev/sda

Welcome to fdisk (util-linux 2.26.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Command (m for help): p

Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x494832b4

Device     Boot    Start      End  Sectors  Size Id Type

/dev/sda1  *        2048  1026047  1024000  500M 83 Linux

/dev/sda2        1026048 41943039 40916992 19.5G 8e Linux LVM

/dev/sda3       41943040 62914559 20971520   10G 8e Linux LVM

Command (m for help): q

[root@mail ~]# df -T

Filesystem              Type     1K-blocks    Used Available Use% Mounted on

devtmpfs                devtmpfs    124256       0    124256   0% /dev

tmpfs                   tmpfs       133964       0    133964   0% /dev/shm

tmpfs                   tmpfs       133964     948    133016   1% /run

tmpfs                   tmpfs       133964       0    133964   0% /sys/fs/cgroup

/dev/mapper/fedora-root ext4      17938864 5447232  11557336  33% /

tmpfs                   tmpfs       133964       8    133956   1% /tmp

/dev/sda1               ext4        487652  101297    356659  23% /boot

tmpfs                   tmpfs        26796       0     26796   0% /run/user/0

6.刷新分区

[root@mail ~]# partprobe

7.格式化/dev/sda3为 ext4格式

[root@mail ~]# mkfs.ext4 /dev/sda3

mke2fs 1.42.12 (29-Aug-2014)

Creating filesystem with 2621440 4k blocks and 655360 inodes

Filesystem UUID: e9cdabd2-d211-4b20-ad89-176c845d56c5

Superblock backups stored on blocks:

        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

[root@mail ~]# df -lh

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  952K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

[root@mail ~]# lvs

  LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert

  root fedora -wi-ao---- 17.51g

  swap fedora -wi-ao----  2.00g

8.创建  Physical volume                             

[root@mail ~]# pvcreate /dev/sda3

WARNING: ext4 signature detected on /dev/sda3 at offset 1080. Wipe it? [y/n]: y

  Wiping ext4 signature on /dev/sda3.

  Physical volume "/dev/sda3" successfully created

9.把/dev/sda3加入 fedora 组(系统根分区默认组)

[root@mail ~]# vgextend fedora /dev/sda3

  Volume group "fedora" successfully extended

[root@mail ~]# vgdisplay

  --- Volume group ---

  VG Name               fedora

  System ID

  Format                lvm2

  Metadata Areas        2

  Metadata Sequence No  4

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                2

  Open LV               2

  Max PV                0

  Cur PV                2

  Act PV                2

  VG Size               29.50 GiB

  PE Size               4.00 MiB

  Total PE              7553

  Alloc PE / Size       4994 / 19.51 GiB

  Free  PE / Size       2559 / 10.00 GiB

  VG UUID               fsrCEu-vQgr-a0Xx-hiDy-S1QR-pW9Q-2ROFlQ

  10.根分区扩展空间7.69G (命令出错)

[root@mail ~]# lvextend -L +7.96G /dev/VolGroup00/LogVol00 /dev/sda3

  Volume group "VolGroup00" not found

[root@mail ~]# df -lh

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  952K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

  11.根分区扩展空间10G (出错,可供扩展的空间不足)

[root@mail ~]# lvextend -L +10G /dev/mapper/fedora-root /dev/sda3

  Insufficient free space: 2560 extents needed, but only 2559 available

  12.根分区扩展空间9.8G (成功)

[root@mail ~]# lvextend -L +9.8G /dev/mapper/fedora-root /dev/sda3

  Rounding size to boundary between physical extents: 9.80 GiB

  Size of logical volume fedora/root changed from 17.51 GiB (4482 extents) to 27.31 GiB (6991 extents).

  Logical volume root successfully resized

[root@mail ~]# vim /etc/fstab

#

# /etc/fstab

# Created by anaconda on Sat Jul  4 17:58:53 2015

#

# Accessible filesystems, by reference, are maintained under '/dev/disk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

/dev/mapper/fedora-root /       ext4    usrquota,grpquota       0       1

UUID=94aed458-ec42-4303-a893-c6effa398adc /boot                   ext4    defaults        1 2

/dev/mapper/fedora-swap swap                    swap    defaults        0 0

~

~

~

~

[root@mail ~]#

[root@mail ~]#

[root@mail ~]# e2fsck -f /dev/mapper/fedora-root

e2fsck 1.42.12 (29-Aug-2014)

/dev/mapper/fedora-root is mounted.

e2fsck: Cannot continue, aborting.

[root@mail ~]# e2fsck -f /dev/mapper/fedora

e2fsck 1.42.12 (29-Aug-2014)

e2fsck: No such file or directory while trying to open /dev/mapper/fedora

Possibly non-existent device?

[root@mail ~]# df -lh

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  952K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   18G  5.2G   12G  33% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

13.文件系统重定义分区大小

[root@mail ~]# resize2fs /dev/mapper/fedora-root

resize2fs 1.42.12 (29-Aug-2014)

Filesystem at /dev/mapper/fedora-root is mounted on /; on-line resizing required

old_desc_blocks = 2, new_desc_blocks = 2

The filesystem on /dev/mapper/fedora-root is now 7158784 (4k) blocks long.

14.查看磁盘根目录空间已经成功扩展(18G变为27G)

[root@mail ~]# df -lh

Filesystem               Size  Used Avail Use% Mounted on

devtmpfs                 122M     0  122M   0% /dev

tmpfs                    131M     0  131M   0% /dev/shm

tmpfs                    131M  952K  130M   1% /run

tmpfs                    131M     0  131M   0% /sys/fs/cgroup

/dev/mapper/fedora-root   27G  5.2G   21G  21% /

tmpfs                    131M  8.0K  131M   1% /tmp

/dev/sda1                477M   99M  349M  23% /boot

tmpfs                     27M     0   27M   0% /run/user/0

[root@mail ~]#

15.LINUX lvm 卷 根分区扩展结束



文章标题:linux扩展根目录磁盘空间(linux lvm )

永久链接:http://www.xishui139.com/archives/702