centos分卷后如何查看状态
导读:在CentOS系统中,如果你指的是磁盘分卷后的状态查看,可以通过以下几种方法: 使用lsblk命令 lsblk命令可以列出所有可用的块设备及其挂载点、大小等信息。 lsblk 输出示例: NAME MAJ:MIN RM SIZE...
在CentOS系统中,如果你指的是磁盘分卷后的状态查看,可以通过以下几种方法:
使用lsblk
命令
lsblk
命令可以列出所有可用的块设备及其挂载点、大小等信息。
lsblk
输出示例:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 50G 0 part /
├─sda2 8:2 0 50G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
使用fdisk
命令
fdisk
命令不仅可以用来创建分区,还可以查看磁盘的分区信息。
sudo fdisk -l
输出示例:
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 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
Disklabel type: dos
Disk identifier: 0x000c29fb
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 10485759 10483712 5G ef EFI (FAT-12/16/32)
/dev/sda2 10485760 20971519 10485760 5G 83 Linux
/dev/sda3 20971520 209715200 188743681 90 Linux LVM
使用df
命令
df
命令可以查看文件系统的磁盘空间使用情况。
df -h
输出示例:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg00-lv_root 50G 10G 38G 22% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/sda1 487M 11M 458M 3% /boot
tmpfs 1.9G 1.2M 1.9G 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sdb1 932G 100G 833G 11% /mnt/data
使用pvs
, vgs
, lvs
命令
如果你使用了LVM(逻辑卷管理),可以使用以下命令查看物理卷、卷组和逻辑卷的状态。
查看物理卷
sudo pvs
查看卷组
sudo vgs
查看逻辑卷
sudo lvs
使用smartctl
命令
smartctl
是smartmontools
包的一部分,可以用来查看硬盘的健康状态。
首先安装smartmontools
:
sudo yum install smartmontools
然后使用smartctl
查看硬盘状态:
sudo smartctl -a /dev/sda
输出示例:
smartctl 6.2 2013-07-29 r3784 [x86_64-linux-3.10.0-957.1.3.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: Seagate Barracuda 7200.14 (SCSI)
Serial Number: WDCWDN00000000
LU WWN Device Id: 5 000039 050000000
Firmware Version: CC4B
User Capacity: 1,000,204,886,016 bytes [1,000 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 6
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s)
Local Time is: Thu Apr 22 12:34:56 2021 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x80) Offline data collection activity
was never started.
Automated Offline Data Collection on: (none)
Manual Offline Data Collection on: (none)
SMART Capabilities:
Online Data Collection Frequency: (0x80) Offline data collection activity
was never started.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Self-test routine scheduled (ON): ( 0) Do not schedule self-test routine
automatically.
Error Logging support: (0x1b) Error logging to host supported.
VPD pages supported.
Short self-test routine scheduled (ON): ( 0) Do not schedule short self-test routine
automatically.
Long self-test routine scheduled (ON): ( 0) Do not schedule long self-test routine
automatically.
Conveyance Self-test routine scheduled (ON): ( 0) Do not schedule conveyance self-test routine
automatically.
SMART Self-test history version: (0x00) 1
Self-test routines scheduled (0): (none)
SMART Selective self-test flags (0x00):
Logical unit not supported (LUN)
No self-test scheduled
SMART Self-test summary:
No failed attributes found.
通过这些命令,你可以全面了解CentOS系统中磁盘分卷后的状态。
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: centos分卷后如何查看状态
本文地址: https://pptw.com/jishu/732143.html