Hard Disk Not Showing in fdisk after replacement.

Use “hdparm -I /dev/sdX” to find the HDD serial number and Model Number, we may need this information while contacting DC for the HDD replacement.

The above command wont work if the HDDs are connected to RAID cards, see below.

—-
[~]# hdparm  -I /dev/sdb

/dev/sdb:
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
—-

In that case you can use RAID command line tools to find the details.

To find the RAID card in the server use:

lspci |grep -i raid


[~]# lspci |grep -i raid
01:00.0 RAID bus controller: Adaptec AAC-RAID (rev 09)

Here RAID controller is Adaptec

tw_cli — Commandline Interface for 3ware RAID
arcconf — CLI for Adaptech RAID
Megacli — CLI for MegaRaid RAID

Use Following command to Get information about Physical Devices and Logical Devices of Adaptech RAID controller:

Use following command to get the details of physical devices connected to the RAID controller, it will show all the HDDs connected as Device 1,2…

/usr/StorMan/arcconf GETCONFIG 1 PD

To get details of logical devices connected to the RAID controller use following comand, it will show how the HDDs combined to use with RAID arrays and RAID levels.

/usr/StorMan/arcconf GETCONFIG 1 LD

You will get the idea of serial number and model number of HDDs from above commands

Also you can use “smartctl” command for the same. You cannot run smartctl command directly to the HDDs connected to to RAID array(like samrtctl -a /dev/sdb). You need to run the command on sg module. The sg module helps to access the physical hard drives behind the controller.

 smartctl -d sat -a /dev/sg1X

Below is the Logical device information,  “Logical device number 0” is the main drive and created as RAID 1 using 2 HDDs(segment0 and 1). (0,0) and (0,1) showing the HDD position (channel,port)

Logical device number 1 is the backup drive which was created as simple volume without no RAID level, so only one HDD is enough.

*****************************
Logical device number 0
Logical device name                      :
   RAID level                               : 1
Status of logical device                 : Optimal
Size                                     : 953334 MB
Read-cache mode                          : Enabled
MaxIQ preferred cache setting            : Disabled
MaxIQ cache setting                      : Disabled
Write-cache mode                         : Enabled (write-back)
Write-cache setting                      : Enabled (write-back)
Partitioned                              : Yes
Protected by Hot-Spare                   : No
Bootable                                 : Yes
Failed stripes                           : No
Power settings                           : Disabled
——————————————————–
Logical device segment information
——————————————————–
   Segment 0                                : Present (0,0)      WD-WCATR3143256
   Segment 1                                : Present (0,1)      WD-WCATR3253450

Logical device number 1
Logical device name                      : Device 1
   RAID level                               : Simple_volume
Status of logical device                 : Optimal
Size                                     : 953333 MB
Read-cache mode                          : Enabled
MaxIQ preferred cache setting            : Enabled
MaxIQ cache setting                      : Disabled
Write-cache mode                         : Enabled (write-back)
Write-cache setting                      : Enabled (write-back)
Partitioned                              : Yes
Protected by Hot-Spare                   : No
Bootable                                 : No
Failed stripes                           : No
Power settings                           : Disabled
——————————————————–
Logical device segment information
——————————————————–
Segment 0                                : Present (0,2) S246J9FC428963
*********************

Here we are going to replace backup drive. The HDD may not show in fdisk after the replacement. In this case you need to check the Physical Device and Logical Device information of RAID controller.

If the HDD is showing in Physical Device and not in Logical Device then you need to create Logical Device for new drive.

Command to create LD:

arcconf CREATE 1 LOGICALDRIVE <SIZE_OF_LOGICAL_VOLUME> <RAID LEVEL>  <channel,phisical_device_id_of_hdds>

Eg: RAID 1 setup :
arcconf CREATE 1 LOGICALDRIVE MAX 1 0,0 0,1

MAX – indicate max size
channel,phisical_device_id_of_hdds : check Physical device info to get this(see the lines like “Reported Channel,Device(T:L)       : 0,1” under each physical devices)

If the backup drive not showing in fdisk then we cannot mount it. We need to add LD for backup drive in this case.

arcconf CREATE 1 LOGICALDRIVE MAX Simple_volume 0,2

You can say some comment like “Simple_volume” in the place of RAID level if you are not using any raid levels on this HDD.

Now check fdisk.

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: