Linux online New hard disk, the system does not restart the recognition of new hard disk

Source: Internet
Author: User

Do not want to shut down the system directly add disk, found that the Linux system does not automatically recognize the newly added hard disk;

1. View the existing disk, only one disk SDA;

[Email protected] ~]# fdisk-l

disk/dev/sda:21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectors of 1 * MB = bytes

Sector size (logical/physical): bytes/512 bytes

I/O size (minimum/optimal): bytes/512 bytes

Disk label Type:dos

Disk identifier:0x000c4c5a


Device Boot Start End Blocks Id System

/DEV/SDA1 * 2048 2099199 1048576 Linux

/dev/sda2 2099200 41943039 19921920 8e Linux LVM


disk/dev/mapper/cl-root:19.3 GB, 19318964224 bytes, 37732352 sectors

Units = sectors of 1 * MB = bytes

Sector size (logical/physical): bytes/512 bytes

I/O size (minimum/optimal): bytes/512 bytes



disk/dev/mapper/cl-swap:1073 MB, 1073741824 bytes, 2097152 sectors

Units = sectors of 1 * MB = bytes

Sector size (logical/physical): bytes/512 bytes

I/O size (minimum/optimal): bytes/512 bytes

2. Add a disk 30G

650) this.width=650; "title=" A.png "alt=" wkiol1m6ltazojcwaacm_yj-dhc056.png-wh_50 "src=" https://s3.51cto.com/ Wyfs02/m01/a5/41/wkiol1m6ltazojcwaacm_yj-dhc056.png-wh_500x0-wm_3-wmp_4-s_3746613090.png "/>

3. Cannot be mounted directly on the Linux system, the newly added drive cannot be found using fdisk-l

4. View the host bus number

ls/sys/class/scsi_host/

650) this.width=650; "title=" A.png "alt=" wkiom1m6mystdmlbaaaqpch8qrc428.png-wh_50 "src=" https://s1.51cto.com/ Wyfs02/m02/06/91/wkiom1m6mystdmlbaaaqpch8qrc428.png-wh_500x0-wm_3-wmp_4-s_748211126.png "/>

5. Re-scan the SCSI bus to add the device

echo "---" >/sys/class/scsi_host/host0/scan
echo "---" >/sys/class/scsi_host/host1/scan
echo "---" >/sys/class/scsi_host/host2/scan

' ---' Representative Channel , Target and the LUNs numbering

650) this.width=650; "title=" A.png "alt=" wkiol1m6mlcx2vykaaazuk_kdxo755.png-wh_50 "src=" https://s3.51cto.com/ Wyfs02/m02/a5/42/wkiol1m6mlcx2vykaaazuk_kdxo755.png-wh_500x0-wm_3-wmp_4-s_568870063.png "/>

6. Re-execute fdisk-l new SDB appears, next can be partitioned as required

650) this.width=650; "title=" A.png "alt=" wkiol1m6mrczjw-paac3rrgn1xs996.png-wh_50 "src=" https://s5.51cto.com/ Wyfs02/m02/a5/42/wkiol1m6mrczjw-paac3rrgn1xs996.png-wh_500x0-wm_3-wmp_4-s_2298563097.png "/>



Cast Sword Team Signature:

"Director" 12 Spring and Autumn,[email protected];

"Master" The rice is not pale,[email protected];

"Java development" Rain Luen,[email protected], think Qi June hui,[email protected]; little Prince,[email protected]; Patrol Hill small Drill wind,[ Email protected];

"vs development" Bean point,[email protected];

"System test" Earth Mirror asked,[email protected]; dust and freedom,[email protected];

"Big Data" desert Oasis,[email protected]; Zhang three provinces,[email protected];

"Network" Night Lone Star,[email protected];

"System operation" three stones,[email protected]; ordinary Strange coffee,[email protected];

"Disaster recovery backup" Autumn rain,[email protected];

"Security" is confidential, you know.

Original three stone

Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.


This article is from the "Three Stones" blog, please be sure to keep this source http://463525.blog.51cto.com/453525/1965254

Linux online New hard disk, the system does not restart the recognition of new hard disk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.