推 jyenhuang: 我建議你把資料備份出來重作 linux對主機板內建raid支 11/17 16:55
→ jyenhuang: 援很糟 不值得花那個時間去作 11/17 16:55
真的...但是檔案有點大,找不到地方先備份
→ bitlife: 同樓上,linux的raid以software為主,主機板的hw支援的raid 11/17 17:01
→ bitlife: 主要用於windows 11/17 17:01
推 jyenhuang: 主機板的raid也是軟體raid...所以和同是軟體raid的linu 11/17 17:02
→ jyenhuang: x會衝突 真正的硬體raid不管在windows下或者linux下 11/17 17:03
→ jyenhuang: 你都只會看到最後的磁區 而不是單顆硬碟 11/17 17:03
→ kenduest: 主機板的 raid 是使用 dmraid 來管理,不是使用 mdadm 11/17 17:37
→ kenduest: 所以方向可能有點問題.... 11/17 17:38
→ HamalAri: rst 現在是 mdadm 管了, dmraid 以後會 deprecated 11/17 17:50
→ HamalAri: 更新到最新板, 再用 mdadm 試一次 11/17 17:51
→ bitlife: 主機板raid算是硬體內建在主機板上,不用另插卡而以.所謂 11/17 17:52
→ bitlife: 純sw raid是指raid邏輯由OS來負責,硬體支援raid則是對OS 11/17 17:53
→ bitlife: 透通或半透通,OS不處理raid運算 11/17 17:53
→ bitlife: 會和linux衝,是因為半透通,而又缺乏適當driver 11/17 17:54
→ bitlife: OS不處理(半透通則部分處理)raid運算 11/17 18:07
→ kenduest: 若真的都給 mdadm 管了,先看一下 /proc/mdstat 檔案 11/17 18:34
→ kenduest: 先確認已經被識別成為合法的實體應對 md0 裝置 11/17 18:35
→ kenduest: 不過你實際上操作時候是下了什麼指令呢 11/17 18:37
→ kenduest: 基本上一般來說若還同一台電腦,用 dmraid -r 查看很快 11/17 18:41
→ kenduest: 要啟用一般也只是 -ay 等方式就可以了 11/17 18:42
我下的指令跟訊息依序如下
我第一次用mdadm,不知道有沒有哪裡弄錯了?
還是k大建議改用dmraid?
$ sudo mdadm --build /dev/md0 --chunk=512 --level=0 --raid-devices=2 /dev/sdb /dev/sde
mdadm: array /dev/md0 built and started.
$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid0 sde[1] sdb[0]
3907028992 blocks super non-persistent 512k chunks
unused devices: <none>
$ sudo mount -t ntfs /dev/md0 ~/windows/
NTFS signature is missing.
Failed to mount '/dev/md0': Invalid argument
The device '/dev/md0' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
※ 編輯: l321122 (140.113.89.107), 11/17/2015 20:01:34
※ 編輯: l321122 (140.113.89.107), 11/17/2015 20:02:43
※ 編輯: l321122 (140.113.89.107), 11/17/2015 20:03:27
推 kenduest: fdisk -l /dev/md0 看一下分割狀態 11/17 20:31
推 Hurricaneger: 建議買張二手raid卡安全很多 11/17 21:58
這是fdisk的執行結果,我實在看不太懂...
請各位幫忙了
$ sudo fdisk -l /dev/md0
WARNING: GPT (GUID Partition Table) detected on '/dev/md0'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/md0: 4000.8 GB, 4000797687808 bytes
256 heads, 63 sectors/track, 484502 cylinders, total 7814057984 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/md0p1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
※ 編輯: l321122 (140.113.89.107), 11/17/2015 22:10:59
→ kenduest: 看起來有抓到正確的分割結果,不過他是 GPT 分割區 11/17 22:55
→ kenduest: 請安裝一下 gdisk, 然後用 gdisk -l /dev/md0 看一下 11/17 22:55
還是看不懂...麻煩k大了!
$ sudo gdisk -l /dev/md0
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/md0: 7814057984 sectors, 3.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 1B3C6A78-E09D-4A24-A3D7-2412021CB990
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7814047710
Partitions will be aligned on 8-sector boundaries
Total free space is 4029 sectors (2.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 34 262177 128.0 MiB 0C01 Microsoft reserved part
2 264192 7814045695 3.6 TiB 0700 Basic data partition
※ 編輯: l321122 (140.113.89.107), 11/17/2015 23:19:53
→ kenduest: 你看看你是否有 /dev/md0p2 這個檔案,有的話掛載看看 11/17 23:26
→ kenduest: 若沒看看該檔案,ls -l /dev/md0* 看一下檔案列表好判斷 11/17 23:27
有md0,md0p1,md0p2三個檔案
嘗試掛載md0p2,出現下面的訊息
$ sudo mount -t ntfs /dev/md0p2 ~/windows/
ntfs_mst_post_read_fixup_warn: magic: 0xf0773f48 size: 4096 usa_ofs: 34687 usa_count: 64108: Invalid argument
Actual VCN (0xe9f4fa5adabe92bf) of index buffer is different from expected VCN (0x0).
Failed to mount '/dev/md0p2': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
※ 編輯: l321122 (140.113.89.107), 11/17/2015 23:38:14
→ kenduest: 所以看起來是應對到 linux device mapper 那邊去了 11/17 23:50
→ kenduest: 不過我也不大怎麼確定,你看看 /dev/mapper 目錄內檔案 11/17 23:51
→ kenduest: 也許已經應對到實際某個裝置檔案去了 11/17 23:51
→ kenduest: 另外你順便可以打一下 blkid 看一下輸出結果 11/17 23:52
→ kenduest: 大多可以抓取 block device 資訊,可以提供一些資訊判斷 11/17 23:53
底下有一個control,可是也掛不起來
$ ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 236 Nov 17 16:37 control
$ file /dev/mapper/control
/dev/mapper/control: character special
$ sudo mount /dev/mapper/control ~/windows/
mount: /dev/mapper/control is not a block device
$ sudo blkid
/dev/sda1: UUID="28C1-5460" TYPE="vfat"
/dev/sda2: UUID="9a0f24f1-5095-4c57-8b1f-3aff43114b59" TYPE="ext4"
/dev/sda3: UUID="f044c150-18c0-4f33-9a80-57f7a3b58b81" TYPE="swap"
/dev/sdb: TYPE="isw_raid_member"
/dev/sdc1: UUID="02C84193C841863F" TYPE="ntfs"
/dev/sdd1: UUID="A2E23B78E23B4FB1" TYPE="ntfs"
/dev/md0p2: UUID="0C0C36E80C36CD08" TYPE="ntfs"
※ 編輯: l321122 (140.113.89.107), 11/18/2015 00:08:17
-----------------------------分隔線-----------------------------
Solution:
我google "activate softraid/fakeraid windows"
再搭配k大一開始說的dmraid
最後執行下面的指令就成功掛載了
$ sudo mdadm --stop /dev/md0
$ sudo dmraid -ay
$ sudo mount -t ntfs /dev/mapper/isw_cjacbdbhde_Volume0p2 ~/windows/
謝謝大家,謝謝k大
※ 編輯: l321122 (140.113.89.107), 11/18/2015 00:27:07
推 kenduest: 若是 ntfs 磁碟是不乾淨的也無法被掛載,一般得強迫檢查 11/18 00:24
→ kenduest: 後才能夠掛載。那可能要跑一下 ntfsfix 命令,先配合 -n 11/18 00:24
→ kenduest: 參數檢查一下 md0p2 看看 11/18 00:24
→ kenduest: 我好像多回的,哈哈。前面提到 dmraid -ay 就可以了 11/18 00:54
→ kenduest: 這個方式確定沒錯... 不過前面有人提到 mdadm 整合 11/18 00:54
→ kenduest: fake raid 的話,看起來我找個時間測試看看 11/18 00:55