2

I recently got a 1TB disk to supplement my two 500GB disks, and I decided to use some form of RAID on the latter. I divided the 500GB disks into two partitions each. Then, I created a RAID0 using the first partitions and mdadm, and on Windows, a striped volume on the second partitions (converting the disk to dynamic). The RAID0 volume works fine on Linux, and the striped volume works fine on Windows. How do I access the striped volume from Linux?

Disk layout:

# lsblk /dev/sd[bc] -o NAME,SIZE,TYPE,MAJ:MIN
NAME          SIZE TYPE  MAJ:MIN
sdb         465.8G disk    8:16 
├─sdb1        250G part    8:17 
│ └─md0       500G raid0   9:0  
│   ├─md0p1    40G md    259:0  
│   ├─md0p2   100G md    259:1  
│   └─md0p3   360G md    259:2  
└─sdb2      215.8G part    8:18 
sdc         465.8G disk    8:32 
├─sdc1        250G part    8:33 
│ └─md0       500G raid0   9:0  
│   ├─md0p1    40G md    259:0  
│   ├─md0p2   100G md    259:1  
│   └─md0p3   360G md    259:2  
└─sdc2      215.8G part    8:34 

sdb2 and sdc2 are the partitions comprising the striped volume.

ldmtool detects something:

# ldmtool scan
[
  "c0a36d19-7bcb-11e5-9c2a-0090f5e33807"
]
# ldmtool show diskgroup c0a36d19-7bcb-11e5-9c2a-0090f5e33807
{
  "name" : "BRO3886-PC-Dg0",
  "guid" : "c0a36d19-7bcb-11e5-9c2a-0090f5e33807",
  "volumes" : [
    "Volume1",
    "Volume2",
    "Volume3"
  ],
  "disks" : [
    "Disk1",
    "Disk2"
  ]
}

It looks like it detected the RAID0 volume made by mdadm, though the UUID doesn't show up in the output of anything else. Running ldmtool scan /dev/sd[cb]2 shows the same UUID, ldmtool scan -d /dev/sdc2 -d /dev/sdb2 gives an empty array.

What can I do?

I'm on Arch Linux:

# uname -r
4.2.5-1-ARCH

ldmtool create all fails, as it tries to work with the detected group (which is RAID0, not the Windows striped volume):

# ldmtool create all                 
Unable to create volume Volume1 in disk group c0a36d19-7bcb-11e5-9c2a-0090f5e33807: ldm_vol_BRO3886-PC-Dg0_Volume1: Stacking NODE_DEL [verify_udev]
Unable to create volume Volume2 in disk group c0a36d19-7bcb-11e5-9c2a-0090f5e33807: ldm_vol_BRO3886-PC-Dg0_Volume2: Stacking NODE_DEL [verify_udev]
Unable to create volume Volume3 in disk group c0a36d19-7bcb-11e5-9c2a-0090f5e33807: ldm_vol_BRO3886-PC-Dg0_Volume3: Stacking NODE_DEL [verify_udev]
[
]

The Windows striped volume has only one "volume" on top of it.

fdisk output doesn't even show the second set of partitions on the disks:

# fdisk -l /dev/sd[bc]
Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 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: dos
Disk identifier: 0x00000c35

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1          63 976771119 976771057 465.8G 42 SFS

Partition 1 does not start on physical sector boundary.
Disk /dev/sdc: 465.8 GiB, 500107862016 bytes, 976773168 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: dos
Disk identifier: 0x000b5336

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdc1          63 976771119 976771057 465.8G 42 SFS

Partition 1 does not start on physical sector boundary.

blkid shows no information about /dev/sd[bc]2 either:

# blkid            
/dev/sdc1: UUID="e55a4863-d81c-3f39-3daf-44e995671ffb" UUID_SUB="3f774ed1-d5b1-ac30-4eb0-44b490ab96ee" LABEL="ica-ext:0" TYPE="linux_raid_member"
/dev/sdb1: UUID="e55a4863-d81c-3f39-3daf-44e995671ffb" UUID_SUB="c906ce18-e525-32f0-cedf-01ef0e3068a3" LABEL="ica-ext:0" TYPE="linux_raid_member"
/dev/md0p1: LABEL="arch" UUID="046a554b-d9f5-4b23-82e6-ffaeb98284aa" TYPE="ext4" PARTUUID="000da16b-01"
/dev/md0p2: LABEL="devel" UUID="69624d11-f53d-463e-b5c8-5ec417401d33" TYPE="ext4" PARTUUID="000da16b-02"
/dev/md0p3: LABEL="var" UUID="ec253608-fff7-4d66-80f1-3fcb9e09e5f8" TYPE="ext4" PARTUUID="000da16b-03"
/dev/md0: PTUUID="000da16b" PTTYPE="dos"

All commands shown so far were run as root.

  • See askubuntu.com/questions/41667/… – cas Nov 8 '15 at 4:04
  • @cas what in it? Are you saying there's no way to have the second partitions show up? – muru Nov 8 '15 at 4:08
  • As far as linux is concerned there IS only one partition on each disk, with type SFS. It's somehow managing to see inside them to get the mdadm raid "partitions", so there should be some way for linux to see the windows "partitions". – cas Nov 8 '15 at 4:10
  • @cas I wouldn't say "as far as Linux is concerned", since lsblk shows the correct layout. fdisk is a tool with plenty of limitations. I am surprised, however, that parted also shows the same layout as fdisk. – muru Nov 8 '15 at 4:12
1

According to man ldmtool, ldmtool create ... will create device-mapper device nodes which you can use (mount, unmount, etc) just like any other device node.

create {volume { disk group GUID } { volume name } | all}

Create a device-mapper device for either the specified volume or all volumes in all detected disk groups.

Returns a list of the device-mapper device names which were created by this action. Note that if a device already existed for a volume it will not be returned in this list.

If your distro's ldmtool package does not come with the man page then submit a bug report. man pages should be packaged with the binaries they document.

  • Ah, I forgot to include the most important bit of information. I did run that command, and it fails, because, as the manual says, its for all detected disk groups. The one I want hasn't been detected, and the one that has been detected is not something ldmtool can use. It errors out - I'll add the error shortly, but its pretty irrelevant. – muru Nov 8 '15 at 3:11
  • so you tried ldmtool create volume "c0a36d19-7bcb-11e5-9c2a-0090f5e33807" or ldmtool create volume "BRO3886-PC-Dg0" ? (btw, i've never used ldmtool, i'm just going by what i read in the man page) – cas Nov 8 '15 at 3:18
  • create all, and the resulting error mentioned the UUID given in the question. – muru Nov 8 '15 at 3:19
  • I would expect that ldmtool needs to be run as root to create device nodes in /dev. Try sudo ldmtool create all or sudo ldmtool create volume "c0a36d19-7bcb-11e5-9c2a-0090f5e33807" – cas Nov 8 '15 at 3:46
  • everything mentioned so far was run as root. Even so, it would have been useless: the detected disk group is the raid0 volume, which has already been detected and started by mdadm just fine. I need to get the Windows striped volume, which hasn't even been detected so far. – muru Nov 8 '15 at 3:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.