DbAppWeb.com

Menu
  • Home
  • Linux
  • HP-UX
  • macOS
  • Windows
  • Web Servers
  • App Servers
  • Storage

How to Scan a SCSI disk in Linux Without Rebooting the System

May 30, 2016 DbAppWeb Admin

You can scan a newly added SCSI disk in Linux without rebooting the system. The process is shown below:

First, check all disks presently shown on the system by using the below command:

[root@server ~]# fdisk -l |egrep '^Disk' |egrep -v 'dm-'

WARNING: GPT (GUID Partition Table) detected on ‘/dev/sdd’! The util fdisk doesn’t support GPT. Use GNU Parted.

WARNING: The size of this disk is 3.3 TB (3298534883328 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).

Disk /dev/sda: 214.7 GB, 214748364800 bytes
Disk /dev/sdb: 53.6 GB, 53687091200 bytes
Disk /dev/sdc: 1099.5 GB, 1099511627776 bytes
Disk /dev/sdd: 3298.5 GB, 3298534883328 bytes

It is showing the four disks.

Now check the SCSI host by the following command:

[root@server ~]# ls /sys/class/scsi_host
host0

Now scan the newly added SCSI disk for host0 using the command echo ‘- – -‘ > /sys/class/scsi_host/host0/scan

[root@server ~]# echo '- - -' > /sys/class/scsi_host/host0/scan

Again run the command fdisk -l |egrep ‘^Disk’ |egrep -v ‘dm-‘ to see the disks.

[root@server ~]# fdisk -l |egrep '^Disk' |egrep -v 'dm-'

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.

WARNING: The size of this disk is 3.3 TB (3298534883328 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).

Disk /dev/sde doesn't contain a valid partition table
Disk /dev/sda: 214.7 GB, 214748364800 bytes
Disk /dev/sdb: 53.6 GB, 53687091200 bytes
Disk /dev/sdc: 1099.5 GB, 1099511627776 bytes
Disk /dev/sdd: 3298.5 GB, 3298534883328 bytes
Disk /dev/sde: 2199.0 GB, 2199023255552 bytes (New Disk)

Now you can see the newly added disk (Disk /dev/sde: 2199.0 GB, 2199023255552 bytes) in the list. Make the partition for this disk and format the disk.

How Do I Delete a Single Device Called /dev/sdc

[root@server ~]# fdisk -l |egrep '^Disk' |egrep -v 'dm-'

WARNING: GPT (GUID Partition Table) detected on '/dev/loop0'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/loop0: 3878 MB, 3878682624 bytes
Disk identifier: 0x50be8ac6
Disk /dev/sda: 1798.7 GB, 1798651772928 bytes
Disk identifier: 0x5706085e
Disk /dev/sdb: 2199.0 GB, 2199023255552 bytes
Disk identifier: 0x00000000
Disk /dev/sdc: 2199.0 GB, 2199023255552 bytes
Disk identifier: 0x00000000
[root@server ~]# echo 1 > /sys/block/sdc/device/delete
[root@server ~]# fdisk -l |egrep '^Disk' |egrep -v 'dm-'

WARNING: GPT (GUID Partition Table) detected on '/dev/loop0'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/loop0: 3878 MB, 3878682624 bytes
Disk identifier: 0x50be8ac6
Disk /dev/sda: 1798.7 GB, 1798651772928 bytes
Disk identifier: 0x5706085e
Disk /dev/sdb: 2199.0 GB, 2199023255552 bytes
Disk identifier: 0x00000000
[root@server ~]#

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
Prev Article
Next Article
Tags:Linux SCSI Disk

Leave a Reply Cancel Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Popular
  • Recent

Categories

  • Android (2)
  • Blogger (16)
  • Domain and Hosting (1)
  • Hardware Issues (7)
  • HP-UX (55)
  • HPE Data Protector (9)
  • IBM Lotus Notes (2)
  • IBM WebSphere Application Server (16)
  • Internet Tips & Tricks (15)
  • iOS (8)
  • JBoss/WildFly Application Server (2)
  • Linux (76)
  • macOS (15)
  • Microsoft Windows (31)
  • News and Updates (11)
  • Oracle Database (5)
  • SSL/TLS (1)
  • Storage Servers (23)
  • Tools/Softwares (1)
  • VMware ESXi (17)
  • Web Servers (14)
  • WordPress (5)

Archives

DbAppWeb.com

Solution of Database, Application and Web Server Problems

About DbAppWeb.com

One Stop Solution for Database Server, Application Server and Web Server Problems.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

DbAppWeb on Social Media

Copyright © 2025 DbAppWeb.com
Terms and Conditions   Theme by MyThemeShop.com