Linux如何查看独立服务器硬盘信息(通电时间)

前几天Kimsufi圣诞节和新年搞促销,着实没忍住,还是剁手了。

有兴趣的可以自己继续蹲守一下:

注意KS-1通常无货,而且平时需要设置费。

https://www.kimsufi.com/us/en/servers.xml

KS-LE Server
E5-1620v2 4 c/8 t @3.7GHz
32GB DDR3 1,333MHz
2x 2TB softRAID HDD
Unmetered Transfer Data
100Mbps Port Speed
1 IPv4
IPv6/128
价格:$17.99

KS-1

Intel ATOM N2800 2c/4t 1.86GHz
4GB DDR3 1066MHz
1TB(实际中奖了2T)
100 Mbps
1 IPv4
IPv6/128
价格:$5.99

 

国外这种廉价独服基本都是二手硬件,比如Online、Kimsufi这些,开出来的机子全凭运气。硬盘质量层次不齐,通电10w小时也是有可能的,上架后第一步就是先看下硬盘信息,下面一起来看看。

 

Linux如何查看独立服务器硬盘信息(通电时间)

安装smartmontools

需要借助smartmontools工具来进行查看硬盘信息,安装方法如下:

#Debian or Ubuntu

apt -y install smartmontools

#CentOS

yum -y install smartmontools

查看硬盘信息

输入fdisk -l可看到有2块磁盘,分为为/dev/sdb/dev/sda,如下图:

Linux如何查看独立服务器硬盘信息(通电时间)

输入smartctl --all /dev/sda打印其中一块硬盘的所有信息(为方便显示去掉了部分内容):

=== START OF INFORMATION SECTION ===
Model Family: HGST Ultrastar 7K6000
Device Model: HGST HUS726020ALA610
Serial Number: N4G37YLY
LU WWN Device Id: 5 000cca 245c17af9
Firmware Version: A5GNT920
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Size: 512 bytes logical/physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Mon Jan 10 08:57:26 2022 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

.......

.......

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 136 136 054 Pre-fail Offline - 108
3 Spin_Up_Time 0x0007 143 143 024 Pre-fail Always - 210 (Average
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 374
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 128 128 020 Pre-fail Offline - 18
9 Power_On_Hours 0x0012 094 094 000 Old_age Always - 48593
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 341
192 Power-Off_Retract_Count 0x0032 098 098 000 Old_age Always - 2638
193 Load_Cycle_Count 0x0012 098 098 000 Old_age Always - 2638
194 Temperature_Celsius 0x0002 150 150 000 Old_age Always - 40 (Min/Max 1
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 0

 

  • Model Family:为品牌名称,可以看出是西数的黑盘
  • Device Model:硬盘型号
  • User Capacity:  硬盘容量
  • Rotation Rate:硬盘转速
  • SATA Version is:SATA接口版本
  • Power_On_Hours:通电时间,上面为48593,都快接近5w小时了

不同硬盘型号性能会不一样,通电越长意味着可能使用寿命就越短。xiaoz运气一般,可以看出上面开出来的是通电5w小时的西数黑盘,所以说买廉价独服全靠运气。

一些建议

独立服务器不做RAID 1的情况下,数据安全性还不及VPS,建议养成定期备份的好习惯,以免发生数据丢失。

转载来源:

https://www.xiaoz.me/archives/15546

版权声明:
作者:John
链接:https://vps.la/2022/01/10/linux%e5%a6%82%e4%bd%95%e6%9f%a5%e7%9c%8b%e7%8b%ac%e7%ab%8b%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%a1%ac%e7%9b%98%e4%bf%a1%e6%81%af%ef%bc%88%e9%80%9a%e7%94%b5%e6%97%b6%e9%97%b4%ef%bc%89/
来源:VPS啦
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>