0

I just started using Linux again as a media server, because Windows10 was just giving me too much trouble. I'm trying to mount a RAID 10 array that I was using on the Windows 10 machine that contains all of my media but am running into issues. I'm using a Vantec HX4R as my RAID controller and it's simply connected via USB 3.0 to my Linux box.

Using the below fdisk command you can see the sdb disk (RAID array) looks to be separated into 2 "Microsoft type" partitions.

$ sudo fdisk  -l
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x326e74f3

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1  *         2048 218023935 218021888  104G 83 Linux
/dev/sda2       218025982 234440703  16414722  7.8G  5 Extended
/dev/sda5       218025984 234440703  16414720  7.8G 82 Linux swap / Solaris


The primary GPT table is corrupt, but the backup appears OK, so that will be used.
Disk /dev/sdb: 3.7 TiB, 4000694927360 bytes, 7813857280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 68A32E80-0B76-4EBB-9EC8-2545316B2462

Device      Start        End    Sectors  Size Type
/dev/sdb1      34     262177     262144  128M Microsoft reserved
/dev/sdb2  264192 7813855231 7813591040  3.7T Microsoft basic data

If I try to mount with something like

sudo ntfs-3g /dev/sdb2 /mnt/wind_D

I get an error:

ntfs-3g: Failed to access volume '/dev/sdb2': No such file or directory

parted shows that it recognizes the RAID hardware:

$ sudo parted /dev/sdb print
Error: The primary GPT table is corrupt, but the backup appears OK, so that will
be used.
OK/Cancel? OK                                                             
Model: JMicron H/W RAID10 (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  134MB   134MB                Microsoft reserved partition  msftres
 2      135MB   4001GB  4001GB  ntfs         Basic data partition          msftdata

What I'm doing wrong? What I could be missing? I'm having a hell of a time trying to figure out how to get Ubuntu to mount this. All I need is that sbd2 partition.

4
  • Welcome to Ask Ubuntu! It looks like the kernel rejects the invalid partition table. Can you please try to use gdisk (specifically its backup option from the recovery menu) or a similar tool to fix the GPT using its back-up (as indicated by fdisk) and report back? Thanks. Jul 7, 2018 at 15:09
  • Thanks David, when I try to launch gdisk with the \dev\sdb2 partition I get the following: sudo gdisk /dev/sdb2 GPT fdisk (gdisk) version 1.0.1 Problem opening /dev/sdb2 for reading! Error is 2. The specified file does not exist! --- UPDATE sorry once (/dev/sdb) I targeted the disk I got in to the menu
    – ganjeii
    Jul 7, 2018 at 15:30
  • /dev/sdb2 is a reference to a drive partition – which the kernel didn't create because it didn't find a respective valid partition table entry for it. The related partition table is on the underlying drive whose reference is stored at /dev/sdb. Thus you need to run sudo gdisk /dev/sdb to fix the aforementioned partition table. Jul 7, 2018 at 15:36
  • Also, could you please edit your post when you want to add information? Especially file or program output listings (with the help of the {} button in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall it’s best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks. Jul 7, 2018 at 15:39

2 Answers 2

0

Did you try to mount the disk with

sudo mount -t ntfs-3g -o rw,users,umask=000 /dev/sdb2 /mnt/wind_D

Raid10 needs 4 disks. Since your device has 4 bays, be sure that you have input 4 disks into it! A good description can be found on What is Raid10?

Regarding the partition table:
The scsi controller of your vantec makes the disks looks like one disk from outside, in case you have configured as raid10. Be sure that you set up the raid10 the right way, usually a software has been shipped within your device to make this settings.

Hence, in my mind it makes less sense to rewrite the partition table with

sudo gdisk /dev/sdb

(type l to list the partions, and w to write the table to disk if it's correct)

10
  • Thanks abua. Rewriting the partition table could cause the drive not to mount in Windows is that correct?
    – ganjeii
    Jul 7, 2018 at 14:40
  • No. But it's a strange behaviour that you have the only a backup of the gpt can be read. But maybe the reason is your Vantec. How many disks do you have? What kind of Raid are you using? is it really Raid 10, and did you configured it the right way? For me it seems that it isn't set up correctly.
    – abu_bua
    Jul 7, 2018 at 14:46
  • Yea it works fine in Windows. The raid10 jumper is set on the vantec hardware. Its running full with 4 4TB HDDs
    – ganjeii
    Jul 7, 2018 at 14:49
  • What i am wondering is that only one really partition (sdb2) is shown! Raid 10 needs 4 partition to work, but maybe it's ok since you only want to mount the disk from an external view. Did you install mdadm? This is the way it is done from linux. Afterwards you can create a device with mdadm --create /dev/md/md0 --level=raid10 --raid-devices=<your sd devices>
    – abu_bua
    Jul 7, 2018 at 15:04
  • Does the command lsblk output something like md? Post this output, maybe we can find the device here.
    – abu_bua
    Jul 7, 2018 at 15:06
0

Thanks guys for all of your help. I was able to resolve this by using TestDisk.

  1. TestDisk detected an issue witht he primary GPT partition.
  2. I analyzed the drive.
  3. TestDisk found a good copy (probably the backup) of the Primary partition.
  4. I chose to continue and write the partition.
  5. Rebooted PC.
  6. Powered down my HW RAID.
  7. Powered back on.

RAID was properly detected by Linux.

Profit

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .