温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Linux 中怎么添加硬盘

发布时间:2021-08-10 15:58:00 来源:亿速云 阅读:103 作者:Leah 栏目:关系型数据库

今天就跟大家聊聊有关Linux 中怎么添加硬盘,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

1. 添加了磁盘后查看,没有刷新出来

[root@node /]# fdisk -l

Disk /dev/sda: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000aa84a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2089    16775168   83  linux
/dev/sda2            2089        2089        1024   82  Linux swap / Solaris


2. 查看主机总线号


root@node /]# ls /sys/class/scsi_host/
host0  host1  host2

3.重新扫描SCSI总线来添加设备

[root@node /]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@node /]# echo "- - -" > /sys/class/scsi_host/host1/scan
[root@node /]# echo "- - -" > /sys/class/scsi_host/host2/scan

4. 查看磁盘,可以看到 /dev/sdb :53.7G 这个就是新加的盘


[root@node /]# fdisk -l

Disk /dev/sda: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000aa84a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2089    16775168   83  Linux
/dev/sda2            2089        2089        1024   82  Linux swap / Solaris

Disk /dev/sdb: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

看完上述内容,你们对Linux 中怎么添加硬盘有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注亿速云行业资讯频道,感谢大家的支持。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI