opentack上对已有卷进行扩容后变化配置 xfs_growfs 扩容在线磁盘
opentack上对已有卷进行扩容后变化配置# lsblk
NAME MAJ:MIN RMSIZE RO TYPE MOUNTPOINT
vda 252:0 0 40G0 disk
├─vda1 252:1 0500M0 part /boot
└─vda2 252:2 0 39.5G0 part
├─centos-root 253:0 0 39.2G0 lvm/
└─centos-swap 253:1 0308M0 lvm
vdb 252:16 0 4G0 disk
vdc 252:32 0 8G0 disk /mnt
先umount要扩容的目录
# umount /mnt/
去openstack 平台调整磁盘大小到10G以上。
# lsblk
NAME MAJ:MIN RMSIZE RO TYPE MOUNTPOINT
vda 252:0 0 40G0 disk
├─vda1 252:1 0500M0 part /boot
└─vda2 252:2 0 39.5G0 part
├─centos-root 253:0 0 39.2G0 lvm/
└─centos-swap 253:1 0308M0 lvm
vdb 252:16 0 4G0 disk
vdc 252:32 0 15G0 disk
# mount /dev/vdc /mnt/
# df -Th
Filesystem Type SizeUsed Avail Use% Mounted on
devtmpfs devtmpfs3.9G 03.9G 0% /dev
tmpfs tmpfs 3.9G 03.9G 0% /dev/shm
tmpfs tmpfs 3.9G8.6M3.9G 1% /run
tmpfs tmpfs 3.9G 03.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root xfs 40G1.6G 38G 4% /
/dev/vda1 xfs 497M187M311M38% /boot
tmpfs tmpfs 783M 0783M 0% /run/user/0
/dev/vdc xfs 8.0G107M7.9G 2% /mnt
确定了还没有磁盘上来
# fdisk -l
Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 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 label type: dos
Disk identifier: 0x000cc443
Device Boot Start End Blocks IdSystem
/dev/vda1 * 2048 1026047 512000 83Linux
/dev/vda2 1026048 83886046 41429999+8eLinux LVM
Disk /dev/vdb: 4294 MB, 4294967296 bytes, 8388608 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/centos-root: 42.1 GB, 42098229248 bytes, 82223104 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/centos-swap: 322 MB, 322961408 bytes, 630784 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/vdc: 16.1 GB, 16106127360 bytes, 31457280 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
磁盘却已经上来了。
扩容:
# mount /dev/vdc/mnt/
# xfs_growfs /dev/vdc
meta-data=/dev/vdc isize=512 agcount=16, agsize=131072 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=2097152, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 2097152 to 3932160
检查磁盘:
# df -Th
Filesystem Type SizeUsed Avail Use% Mounted on
devtmpfs devtmpfs3.9G 03.9G 0% /dev
tmpfs tmpfs 3.9G 03.9G 0% /dev/shm
tmpfs tmpfs 3.9G8.6M3.9G 1% /run
tmpfs tmpfs 3.9G 03.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root xfs 40G1.6G 38G 4% /
/dev/vda1 xfs 497M187M311M38% /boot
tmpfs tmpfs 783M 0783M 0% /run/user/0
/dev/vdc xfs 15G108M 15G 1% /mnt
扩上来了。
页:
[1]