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小时也是有可能的,上架后第一步就是先看下硬盘信息,下面一起来看看。
安装smartmontools
需要借助smartmontools工具来进行查看硬盘信息,安装方法如下:
#Debian or Ubuntu
apt -y install smartmontools
#CentOS
yum -y install smartmontools
查看硬盘信息
输入fdisk -l
可看到有2块磁盘,分为为/dev/sdb
和/dev/sda
,如下图:
输入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