Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-20-2017, 03:46 AM   #1
LQ Newbie
Registered: Jun 2017
Posts: 16

Rep: Reputation: Disabled
mdadm - device name changed after da isk failure

Morning All,

I testing mdadm with spare-group function, and I realized that after I set a disk to failed, wait until the recovery finished, removed the failed disk and added back, then the device name has changed, do you know why? Thanks for your help
sde was the faulty one, and became sdab

Here the logs:
kernel: [1299893.753012] md: unbind<sde>
kernel: [1299893.762613] md: export_rdev(sde)
ledmon[4518]: CHANGE /sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sde: from 'Failure' to 'None'.
kernel: [1299900.978501] sd 0:0:2:0: device_block, handle(0x000c)
kernel: [1299902.977091] sd 0:0:2:0: device_unblock and setting to running, handle(0x000c)
kernel: [1299902.983204] sd 0:0:2:0: [sde] Synchronizing SCSI cache
kernel: [1299902.985088] sd 0:0:2:0: [sde] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
kernel: [1299902.994116] mpt3sas_cm0: removing handle(0x000c), sas_addr(0x50001555aaeb4202)
mpt3sas_cm0: removing : enclosure logical id(0x50001555aaeb4000), slot(2)
kernel: [1299902.997817] mpt3sas_cm0: removing enclosure level(0x0000), connector name(     ^B)
ledmon[4518]: CHANGE /sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sde: from 'None' to 'Failure'.
kernel: [1299935.977555] scsi 0:0:28:0: Direct-Access     ATA      HGST HUS726060AL T907 PQ: 0 ANSI: 6
kernel: [1299935.979513] scsi 0:0:28:0: SATA: handle(0x000c), sas_addr(0x50001555aaeb4202), phy(2), device_name(0x0000000000000000)
kernel: [1299935.981389] scsi 0:0:28:0: SATA: enclosure_logical_id(0x50001555aaeb4000), slot(2)
kernel: [1299935.983234] scsi 0:0:28:0: SATA: enclosure level(0x0000), connector name(     ^E)
kernel: [1299935.985160] scsi 0:0:28:0: atapi(n), ncq(y), asyn_notify(n), smart(y), fua(y), sw_preserve(y)
kernel: [1299935.987061] scsi 0:0:28:0: qdepth(32), tagged(1), simple(0), ordered(0), scsi_level(7), cmd_que(1)
kernel: [1299936.004996] sd 0:0:28:0: CDB: Test Unit Ready 00 00 00 00 00 00
kernel: [1299936.005025] sd 0:0:28:0: Attached scsi generic sg4 type 0
kernel: [1299936.005555] ses 0:0:24:0: Wrong diagnostic page; asked for 7 got 0
kernel: [1299936.009347] mpt3sas_cm0:      sas_address(0x50001555aaeb4202), phy(2)
kernel: [1299936.010790] mpt3sas_cm0:      enclosure_logical_id(0x50001555aaeb4000),slot(2)
kernel: [1299936.012240] mpt3sas_cm0:      enclosure level(0x0000), connector name(     ^C)
kernel: [1299936.013687] mpt3sas_cm0:      handle(0x000c), ioc_status(success)(0x0000), smid(37)
kernel: [1299936.015135] mpt3sas_cm0:      request_len(0), underflow(0), resid(-88)
kernel: [1299936.016575] mpt3sas_cm0:      tag(65535), transfer_count(88), sc->result(0x00000000)
kernel: [1299936.018016] mpt3sas_cm0:      scsi_status(check condition)(0x02), scsi_state(autosense valid )(0x01)
kernel: [1299936.019480] mpt3sas_cm0:      [sense_key,asc,ascq]: [0x06,0x29,0x00], count(18)
kernel: [1299936.021363] sd 0:0:28:0: [sdab] 11721045168 512-byte logical blocks: (6.00 TB/5.45 TiB)
kernel: [1299936.023224] sd 0:0:28:0: [sdab] 4096-byte physical blocks
kernel: [1299936.029726] sd 0:0:28:0: [sdab] Write Protect is off
kernel: [1299936.031938] sd 0:0:28:0: [sdab] Write cache: enabled, read cache: enabled, supports DPO and FUA
kernel: [1299936.064007] sd 0:0:28:0: [sdab] Attached SCSI disk
ledmon[4518]: CHANGE /sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sde: from 'Failure' to 'None'.
ledmon[4518]: NAME CHANGED host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sde to host0/port-0:0/expander-0:0/port-0:0:28/end_device-0:0:28/target0:0:28/0:0:28:0/block/sdab
Old 07-20-2017, 05:28 AM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora 33
Posts: 3,598

Rep: Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027
Device ids are assigned in the order that the sd driver finds them. They can be different every reboot. The disk is at a different SCSI address 0:0:28:0 vs 0:0:2:0 so of course it will be assigned a new id.
Old 07-20-2017, 06:36 AM   #3
LQ Newbie
Registered: Jun 2017
Posts: 16

Original Poster
Rep: Reputation: Disabled
Understood, but no I'm getting logs saying unable to open device, which is logical now. Is there a way to disable it?
Device: /dev/sde [SAT], unable to open device
Old 07-21-2017, 03:39 AM   #4
LQ Newbie
Registered: Jun 2017
Posts: 16

Original Poster
Rep: Reputation: Disabled
I did the same test with another disk, and it kept same name. Is there a reason why disk would change name of keep same one's?
Old 07-24-2017, 07:42 AM   #5
LQ Newbie
Registered: Jun 2017
Posts: 16

Original Poster
Rep: Reputation: Disabled


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mdadm created raid devices changed name jzoudavy Linux - Newbie 8 04-19-2016 07:09 PM
Recovery from RAID failure. Device names changed eg. /dev/md2 to /dev/md/2 sierrajam Linux - Server 3 01-18-2016 06:20 PM
Need help in recovering from disk failure using mdadm mlefevre Linux - General 4 03-10-2012 07:55 PM
mdadm RAID10 failure(s) grimm26 Linux - Server 1 02-14-2011 02:32 PM
help with mdadm disk failure ufmale Linux - Server 3 05-29-2008 09:59 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration