partprobe(重新加载分区列表)
lsblk 是ls block devices的缩写。
选项:
-b:仅列出磁盘本身,并不会列出该磁盘的分区数据
-f:同时列出该磁盘内的文件系统和 UUID
-i:使用 ASCII 的字符输出,不要使用复杂的编码(在某些环境下很有用)
[root@kvm ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 10G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 9G 0 part
├─centos-root 253:0 0 8.9G 0 lvm /
└─centos-swap 253:1 0 1G 0 lvm [SWAP]
sdb 8:16 0 20G 0 disk
├─sdb1 8:17 0 953M 0 part
│ └─centos-root 253:0 0 8.9G 0 lvm /
├─sdb2 8:18 0 4.7G 0 part
│ └─vg_data-lv_data 253:2 0 10G 0 lvm /home
└─sdb3 8:19 0 14.4G 0 part
└─vg_data-lv_data 253:2 0 10G 0 lvm /home
sdc 8:32 0 20G 0 disk
└─sdc1 8:33 0 4.7G 0 part /data
sr0 11:0 1 906M 0 rom
blkid 查看磁盘uuid
[root@kvm ~]# blkid
/dev/mapper/centos-root: UUID="e2e14d89-044a-4fb0-9eb0-f76257999e2a" TYPE="xfs"
/dev/sda2: UUID="4byuTX-9b8e-KCNc-lVqe-jV8m-BHAs-WRdCVq" TYPE="LVM2_member"
/dev/sdb1: UUID="px54Ff-xYx9-Q9yD-AE6Y-xmF5-f6t5-mIBhYY" TYPE="LVM2_member" PARTUUID="72d6ff23-7c6b-40c5-9a69-5085d422984c"
/dev/sda1: UUID="6c61e1e1-7b12-4186-baed-0d4ca5848296" TYPE="xfs"
/dev/sdc1: UUID="96f84b68-6b1a-46e9-b734-ae675f04dd92" TYPE="ext4" PARTUUID="29680859-f2f7-47f6-8abc-9560d72d2fc7"
/dev/sdb2: UUID="8vdIbD-JRvN-J26Z-Q2WP-UwWn-wLCf-6HbwK4" TYPE="LVM2_member" PARTUUID="802c1788-5816-477f-97f8-726d68e8499b"
/dev/sdb3: UUID="vgsAsu-itsg-itVr-PxZT-SHjT-X4XG-cuWtDo" TYPE="LVM2_member" PARTUUID="1c6194d1-6224-4c4d-8d49-4514fdccc99b"
/dev/sr0: UUID="2018-05-03-21-07-04-00" LABEL="CentOS 7 x86_64" TYPE="iso9660" PTTYPE="dos"
/dev/mapper/centos-swap: UUID="4b545680-3008-42f2-831e-1aba501b316c" TYPE="swap"
/dev/mapper/vg_data-lv_data: UUID="864653b5-3eba-4963-873e-3bd862a1f015" TYPE="ext4"