• Contact Us
  • Home
  • About Us
  • News
    • Entertainment
    • Trending
  • IT
    • Code
    • Cloud
    • Linux
    • Splunk
  • Login
  • Register
Upgrade
CloudiBee
  • Contact Us
  • Home
  • About Us
  • News
    • Entertainment
    • Trending
  • IT
    • Code
    • Cloud
    • Linux
    • Splunk
No Result
View All Result
  • Contact Us
  • Home
  • About Us
  • News
    • Entertainment
    • Trending
  • IT
    • Code
    • Cloud
    • Linux
    • Splunk
No Result
View All Result
CloudiBee
No Result
View All Result
Home Linux

Dynamically detecting new disks in Linux

cloudibee by cloudibee
January 26, 2010
in Linux
0
0
SHARES
32
VIEWS
Share on FacebookShare on Twitter

Table of Contents

  • You might also like
  • Linux Change Password Command: Change password expiry in Linux
  • Top Open Source Email Servers

You might also like

Linux Change Password Command: Change password expiry in Linux

April 7, 2021
Email Servers

Top Open Source Email Servers

September 7, 2021

When you have new LUNs created on the SAN fabric, zoned & mapped it to the server; how can you detect the luns on the linux server online, without rebooting it?.

When you dynamically add new disks to a Linux VM running on ESX server, how do you detect that disks on the Linux virtual machine?.

Here are the steps to do that :

  1. Install sg3_utils and lsscsi package.

    [root@fedora01 ~]# # yum install –y sg3_utils lsscsi

  2. The “lsscsi” command will list the disks attached to it. If you have just attached a disk, you will not be able to see it. You can also list this using “fdisk –l”

    [root@fedora01 ~]# lsscsi
    [0:0:0:0]    disk    VMware   Virtual disk     1.0   /dev/sda
    [root@fedora01 ~]#

    As you can see above, I currently have one disk connected to the system. To scan for a new device I just added, we should run rescan-scsi-bus.sh from the host.

  3. Run the command “/usr/bin/rescan-scsi-bus.sh” , to dynamically detect and activate the new disk.
  4. [root@fedora01 ~]# /usr/bin/rescan-scsi-bus.sh -l
    Host adapter 0 (mptspi) found.
    Scanning SCSI subsystem for new devices
    Scanning host 0 for  SCSI target IDs  0 1 2 3 4 5 6 7, LUNs  0 1 2 3 4 5 6 7
    Scanning for device 0 0 0 0 …
    OLD: Host: scsi0 Channel: 00 Id: 00 Lun: 00
          Vendor: VMware   Model: Virtual disk   Rev: 1.0
          Type:   Direct-Access                  ANSI SCSI revision: 02
    Scanning for device 0 0 1 0 …
    NEW: Host: scsi0 Channel: 00 Id: 01 Lun: 00
          Vendor: VMware   Model: Virtual disk   Rev: 1.0
          Type:   Direct-Access                  ANSI SCSI revision: 02
    1 new device(s) found.
    0 device(s) removed.
    [root@fedora01 ~]#

    [root@fedora01 ~]# lsscsi
    [0:0:0:0]    disk    VMware   Virtual disk     1.0   /dev/sda
    [0:0:1:0]    disk    VMware   Virtual disk     1.0   /dev/sdb
    [root@fedora01 ~]#

    You see the new disk is visible. Now you can create a partition or filesystem on it.

After running those commands, check dmesg and /var/log/messages to see if there are any device detections. You can also do “fdisk -l” or “cat /proc/scsi/scsi” to see the attached LUNs. This works fine in RHEL5, SuSE 10, CentOS5, OEL5.

Previous Post

rpm package command tips

Next Post

Linux Enterprise Cryptographic Filesystem : ecryptfs

cloudibee

cloudibee

Related Posts

Linux

Linux Change Password Command: Change password expiry in Linux

by cloudibee
April 7, 2021
Email Servers
Linux

Top Open Source Email Servers

by cloudibee
September 7, 2021
Linux

How to Determine Redhat Versions Command

by cloudibee
May 27, 2022
Linux

How-to Linux List Processes in 3 Simple Commands

by cloudibee
May 27, 2022
Linux

What is Cron Job in Linux?

by cloudibee
May 27, 2022
Next Post

Linux Enterprise Cryptographic Filesystem : ecryptfs

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Premium Content

Secure your Apache Configuration and IPTables: Blacklists

October 18, 2020

Advisory and Consulting Services

May 27, 2022

Layered Tech – Cloud Computing Solutions | IT Industry Analyst Firm, Neovise

May 27, 2022

Browse by Category

  • Business
  • Cloud
  • Code
  • Debt
  • Entertainment
  • finance
  • Game
  • Health
  • IT
  • Lawyers
  • Lifestyle
  • Linux
  • Marketing
  • Misc
  • News
  • SEO
  • Services
  • Splunk
  • Sports
  • Tech
  • Technology
  • Tipes
  • Tips
  • Uncategorized

Browse by Tags

algorithm Apache Apache2 AWS Bash bash history Bind Blacklists Buffer C C++ CentOS Cerner chage Cloud Cloud Computing Cloud jobs Cloud Storage Cloud Suite Commands Compliance Cron job Debian Directory DMS DNS Docker Dovecot drop cache Email servers Enteprise Cloud Enterprise External FAT32 Format kernel Linux linux kernel Nirvanix passwd Sendmail SSH SSL Terminal Ubuntu

About CloudiBee

cloudibee logo


CloudiBee is an open-source for people who love technology. Here we will be sharing lots of technical information over the web so that a lot of people visit us and gain some knowledge. We are a completely open to all platform. We assure you that you can easily get any info and updated news about the tech world from us. Let's begin with us!

Hot Topic

What are the best internet options for lawyers?

by samanvya
August 15, 2022
0
What are the best internet options for lawyers?

Meeting clients, questioning possible witnesses and getting in contact with other people in the case, or preparing for hearings with...

Read more

Recent News

Lifestyle

Best Gifts To Offer A Friend Who Owned A New House

July 22, 2022
Business

The main reasons for the startup fails. How to avoid failure?

July 21, 2022
Business

Hacks for packing wine glasses so they don’t break

July 21, 2022

CloudiBee. © 2021. All Rights Reserved

No Result
View All Result
  • Contact Us
  • Home
  • About Us
  • News
    • Entertainment
    • Trending
  • IT
    • Code
    • Cloud
    • Linux
    • Splunk

CloudiBee. © 2021. All Rights Reserved

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In