If you are interested in learning, Request you to go through the below recommended tutorial.
DevOps Full Course Tutorial for Beginners – DevOps Free Training Online
Docker Full Course Tutorial for Beginners – Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners – Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners – Ansible Free Training Online
Openstack Full Course Tutorial for Beginners – Openstack Free Training Online
Learn Linux, DevOps and Cloud
How to detect new hard disk online without rebooting?
This post will help you with How to rescan or detect new hard disk online without rebooting the server.
It is possible to add or remove a SCSI device explicitly, or to re-scan an entire SCSI bus without rebooting a running Linux VM guest.
How to Rescan newly added Disk on Linux?
1. Ensure the required size is added newly online without shutting down or powered off in Hypervisors such as vmware esx, vmware workstation and Microsoft Hyper-V before carrying out the Virtual Disk increasing activity.
2. Login into the server with user root or any other user with root privilege.
3. Run the below command to list the detected disk as below screenshot shows..
[root@server1 ~]# fdisk -l
The above screenshot shows as our linux machine has only single disk of 10GB (/dev/sda).
4. Run the below command to list the entire SCSI device buses,
[root@server1 ~]# ll /sys/class/scsi_host/host?/scan
–w——-. 1 root root 4096 May 11 16:03 /sys/class/scsi_host/host0/scan
–w——-. 1 root root 4096 May 11 15:58 /sys/class/scsi_host/host1/scan
–w——-. 1 root root 4096 May 11 15:58 /sys/class/scsi_host/host2/scan
Above command listed the output of number of SCSI device buses, we have to run each below command for each SCSI device buses.
echo “- – -” > /sys/class/scsi_host/host0/scan
Sample Commands for each SCSI Device Buses,
[root@server1 ~]# echo “- – -” > /sys/class/scsi_host/host0/scan
[root@server1 ~]# echo “- – -” > /sys/class/scsi_host/host1/scan
[root@server1 ~]# echo “- – -” > /sys/class/scsi_host/host2/scan
Thats it, now you can see a newly added disk on linux from fdisk command.
How to Access Linux Server from Windows Remotely
Configure SSH Passwordless Login Authentication (SSH-keygen)
How to Create LVM Partition in Linux – LVM Tutorial
Install & Configure Samba Server on Linux (RHEL7 / CentOS7)
linux detect new disk online, new disk in linux, linux rescan disk size, linux rescan sata disks, adding new disk to linux, add new disk to linux