linux作業系統徹底清楚報錯Disk /dev/mapper/ddf1_4c53492....

來源:互聯網
上載者:User

標籤:硬碟無法格式化   sector   格式   服務   val   store   自動識別   map   out   

現象描述

Disk /dev/mapper/ddf1_4c5349202020202010000055000000004711471100000a28p1: 666.0 GB, 666000889344 bytes

255 heads, 63 sectors/track, 80969 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Disk /dev/mapper/ddf1_4c5349202020202010000055000000004711471100000a28p1 doesn‘t contain a valid partition table

 

原因:

這是因為硬碟帶有raid資訊,拿二手硬碟插入伺服器時,系統會根據殘留的資訊自動探索raid(這是我們不希望發生的)。

並且此時硬碟無法格式化,格式化時會報錯,硬碟正在被使用。

如何解決這個問題呢,嘗試了一些方法,最後用dmraid解決了問題。

由於系統的自動識別,硬碟被虛擬地組建成了raid(即便沒有真實raid存在),這就是報正在被使用,無法格式化的原因。

 

讓我們用dmraid來disable active狀態。

1:

[[email protected] ~]# dmraid -a no

ERROR: ddf1: wrong # of devices in RAID set "ddf1_4c5349202020202010000055000000004711471100000a28" [1/2] on /dev/sdb

RAID set "ddf1_4c5349202020202010000055000000004711471100000a28" is not active

RAID set "ddf1_4c5349202020202010000055000000004711471100000a28" is not active

 

dmraid –a no 命令就是取消active狀態,第一行的報錯不要管,那是說/dev/sdb上只有1/2raid資訊,資訊不全,

這裡也讓我們知道是哪張盤存有raid資訊,當然,你直接把sdb換張乾淨的盤也是可以的。

從後兩句可以發現,raid陣列已經not active了。

 

2.接下來用dmraid –x 來清除raid資訊

[[email protected] ~]# dmraid -x

ERROR: ddf1: wrong # of devices in RAID set "ddf1_4c5349202020202010000055000000004711471100000a28" [1/2] on /dev/sdb

About to delete RAID set ddf1_4c5349202020202010000055000000004711471100000a28

WARNING: The metadata stored on the raidset(s) will not be accessible after deletion

Do you want to continue ? [y/n] :

選擇y

ERROR: Raid set deletion is not supported in "ddf1" format

 

顯示報錯,但是還是刪除了,fdisk –l  無raid 資訊

然後把分區刪除重建,格式化成功,順利掛載。

 

linux作業系統徹底清楚報錯Disk /dev/mapper/ddf1_4c53492....

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.