You Asked: How Do I Scan a New Disk in Linux?
Contents Once the Storage Team Has Mapped the New Lun’s with the Linux Host, New Lun Can Be Discovered by Scanning the Storage Lun Id at the Host End. Scanning...
Contents
Once the storage team has mapped the new LUN’s with the Linux host, new LUN can be discovered by scanning the storage LUN ID at the host end. Scanning can be performed in two ways. Scan each scsi host device using /sys class file. Run the “rescan-scsi-bus.sh” script to detect new disks.
How do I scan a newly installed disk?
Use the below command to scan the LUNs
From Redhat Linux 5.4 onwards, redhat introduced “/usr/bin/rescan-scsi-bus.sh” script to scan all the SCSI bus and update the SCSI layer to reflect new devices.
Must Read
How do I scan a new disk in Ubuntu?
Example for system disk without reboot:
- Rescan the bus for the new size: # echo 1 > /sys/class/block/sda/device/rescan.
- Expand your partition (works with ansible): # parted —pretend-input-tty /dev/sda resizepart F 2 Yes 100% – F for Fix – 2 for partition – Yes to confirm – 100% for whole partition.