查看磁盘与设备

列出所有磁盘

使用 fdisk -l 列出所有磁盘

$ 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: 0x0008d73a
   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048    83884031    41940992   83  Linux
Disk /dev/vdb: 536.9 GB, 536870912000 bytes, 1048576000 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/vg_f08a5cd7b4e31c2b93f7d6c385860882-brick_3d7dc9f1e6346efc7361d0f4ec4ddf8c: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk /dev/mapper/vg_f08a5cd7b4e31c2b93f7d6c385860882-brick_0027aec42ae3a4b5171cc7fddea50bc0: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes

可以看到, 有一块 42.9 GB 的磁盘设备 /dev/vda 已经使用, 划分了一个分区 /dev/vda1, 有一块 536.9GB 的磁盘设备 /dev/vdb 还未使用

查看所有挂载的设备

使用 cat /proc/mountsdf -lh 查看所有挂载的设备

$ cat /proc/mounts
$ df -lh
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        40G   18G   21G  47% /
devtmpfs        7.8G     0  7.8G   0% /dev
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           7.8G  672K  7.8G   1% /run
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
tmpfs           1.6G     0  1.6G   0% /run/user/0
overlay          40G   18G   21G  47% /var/lib/docker/overlay2/387fee3668a3843c7520649366bafa3716562f7129f0ec6b5e94040a9bbc5a61/merged
shm              64M     0   64M   0% /var/lib/docker/containers/0ac46dccc179c16c6fc8caa87704d78d9c096125d67939ad416c351d9bc01e61/mounts/shm
/dev/vdb1        99G   60M   94G   1% /mnt/vdb1
/dev/vdb2        99G   60M   94G   1% /mnt/vdb2
/dev/vdb3        99G   60M   94G   1% /mnt/vdb3
/dev/vdb5       197G   60M  187G   1% /mnt/vdb5

MIT Licensed | Copyright © 2018-present 滇ICP备16006294号

Design by Quanzaiyu | Power by VuePress