Centos 系统分区扩容操作指南
- 查看现有分区情况
[root@localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 557.9G 0 disk ├─sda1 8:1 0 200M 0 part /boot/efi ├─sda2 8:2 0 1G 0 part /boot └─sda3 8:3 0 506.7G 0 part ├─cl-root 253:0 0 475.6G 0 lvm / └─cl-swap 253:1 0 31.1G 0 lvm [SWAP]
从上图可以看出,总共两个磁盘sda和sdb。Sda总共200G是系统盘,实际已经使用了1+49G,也就是还有150G没有分区。sdb数据盘大小是800G。
- 查询磁盘名称
[root@localhost ~]# fdisk -l WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion. Disk /dev/sda: 599.0 GB, 598999040000 bytes, 1169920000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk label type: gpt Disk identifier: 03442826-9FBF-4E8C-8F85-A82E366EAF5C # Start End Size Type Name 1 2048 411647 200M EFI System EFI System Partition 2 411648 2508799 1G Microsoft basic 3 2508800 1065076735 506.7G Linux LVM Disk /dev/mapper/cl-root: 510.7 GB, 510669094912 bytes, 997400576 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/mapper/cl-swap: 33.4 GB, 33353105408 bytes, 65142784 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes