[問題] windows上的raid 0如何移到linux (已解決)
我用主機板(P8H67)內建的RAID功能做了一組RAID 0
原本我的系統是windows 7,所以有intel RST自動幫我處理
但是最近把電腦重灌成ubuntu 14.04 64 bit,想用mdadm把raid 0 組回來
我參考這篇教學 http://goo.gl/hx2Nfi
但是 mount 之後就跳這個訊息
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?
是我不小心把raid弄壞,還是我的方法錯誤呢?
另外附上 cat /proc/partitions
我要raid的是sdb和sde
---------------------------------
major minor #blocks name
8 0 250059096 sda
8 1 524288 sda1
8 2 241164288 sda2
8 3 8369152 sda3
8 16 1953514584 sdb
8 32 1465138584 sdc
8 33 1465136001 sdc1
8 48 976762584 sdd
8 49 976759808 sdd1
8 64 1953514584 sde
8 65 1953508352 sde1
---------------------------------
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.89.107
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1447743854.A.5D3.html
※ 編輯: l321122 (140.113.89.107), 11/17/2015 15:08:33
推
11/17 16:55, , 1F
11/17 16:55, 1F
→
11/17 16:55, , 2F
11/17 16:55, 2F
真的...但是檔案有點大,找不到地方先備份
→
11/17 17:01, , 3F
11/17 17:01, 3F
→
11/17 17:01, , 4F
11/17 17:01, 4F
推
11/17 17:02, , 5F
11/17 17:02, 5F
→
11/17 17:03, , 6F
11/17 17:03, 6F
→
11/17 17:03, , 7F
11/17 17:03, 7F
→
11/17 17:37, , 8F
11/17 17:37, 8F
→
11/17 17:38, , 9F
11/17 17:38, 9F
→
11/17 17:50, , 10F
11/17 17:50, 10F
→
11/17 17:51, , 11F
11/17 17:51, 11F
→
11/17 17:52, , 12F
11/17 17:52, 12F
→
11/17 17:53, , 13F
11/17 17:53, 13F
→
11/17 17:53, , 14F
11/17 17:53, 14F
→
11/17 17:54, , 15F
11/17 17:54, 15F
→
11/17 18:07, , 16F
11/17 18:07, 16F
→
11/17 18:34, , 17F
11/17 18:34, 17F
→
11/17 18:35, , 18F
11/17 18:35, 18F
→
11/17 18:37, , 19F
11/17 18:37, 19F
→
11/17 18:41, , 20F
11/17 18:41, 20F
→
11/17 18:42, , 21F
11/17 18:42, 21F
我下的指令跟訊息依序如下
我第一次用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
推
11/17 20:31, , 22F
11/17 20:31, 22F
推
11/17 21:58, , 23F
11/17 21:58, 23F
這是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
→
11/17 22:55, , 24F
11/17 22:55, 24F
→
11/17 22:55, , 25F
11/17 22:55, 25F
還是看不懂...麻煩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
→
11/17 23:26, , 26F
11/17 23:26, 26F
→
11/17 23:27, , 27F
11/17 23:27, 27F
有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
→
11/17 23:50, , 28F
11/17 23:50, 28F
→
11/17 23:51, , 29F
11/17 23:51, 29F
→
11/17 23:51, , 30F
11/17 23:51, 30F
→
11/17 23:52, , 31F
11/17 23:52, 31F
→
11/17 23:53, , 32F
11/17 23:53, 32F
底下有一個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
推
11/18 00:24, , 33F
11/18 00:24, 33F
→
11/18 00:24, , 34F
11/18 00:24, 34F
→
11/18 00:24, , 35F
11/18 00:24, 35F
→
11/18 00:54, , 36F
11/18 00:54, 36F
→
11/18 00:54, , 37F
11/18 00:54, 37F
→
11/18 00:55, , 38F
11/18 00:55, 38F