查看磁盘信息

  • fdisk -l 查看磁盘分区信息
[root@~]# fdisk -l

Disk /dev/sda: 1599.2 GB, 1599204229120 bytes
255 heads, 63 sectors/track, 194425 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk identifier: 0x000426d6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        3889    30720000   83  Linux
/dev/sda3            3889        4411     4194304   82  Linux swap / Solaris
/dev/sda4            4411      194426  1526295552    5  Extended
/dev/sda5            4411      194426  1526294528   83  Linux
  • df -h查看挂载信息
[root@~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5       1.4T  2.2G  1.4T   1% /
tmpfs           190G     0  190G   0% /dev/shm
/dev/sda1       477M   41M  411M   9% /boot
/dev/sda2        29G  288M   27G   2% /var
  • df -aT 将所有文件的格式以及名称都列出来
[root@~]# df -aT
Filesystem     Type         1K-blocks    Used  Available Use% Mounted on
/dev/sda5      ext4        1502214344 2213656 1423685964   1% /
proc           proc                 0       0          0    - /proc
sysfs          sysfs                0       0          0    - /sys
devpts         devpts               0       0          0    - /dev/pts
tmpfs          tmpfs        198390884       0  198390884   0% /dev/shm
/dev/sda1      ext4            487652   41246     420806   9% /boot
/dev/sda2      ext4          30106576  293976   28276600   2% /var
none           binfmt_misc          0       0          0    - /proc/sys/fs/binfmt_misc
  • cat /etc/fstab查看开机挂载信息
#
# /etc/fstab
# Created by anaconda on Wed Dec 13 13:59:28 2017
#
# 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
#
UUID=34314691-6cce-46ae-942b-9087dd489ef1 /                       ext4    defaults        1 1
UUID=7b02c703-33e1-4cf5-91c9-964e935edb72 /boot                   ext4    defaults        1 2
UUID=29f648b3-b571-4746-9311-63b2ffececbc /var                    ext4    defaults        1 2
UUID=dea38c17-d272-4fa0-9a01-33cfcb866a67 swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

你可能感兴趣的:(查看磁盘信息)