Creating an md with 3TB drives.

Creating an md with 3TB drives.

am 28.09.2011 10:05:19 von lists

Hi guys.


I have two 3TB drives and I want to set them up as RAID0.
The problem is I can't use all of the space on them.
I only get 4TB of the 6 in total.

What I tried was:
# parted /dev/sde
GNU Parted 2.3
Using /dev/sde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
Warning: The existing disk label on /dev/sde will be destroyed and all
data on this disk will be lost. Do you want
to continue?
Yes/No? yes
(parted) mkpart primary 0 -0
Warning: The resulting partition is not properly aligned for best
performance.
Ignore/Cancel? ignore
(parted) print
Model: ATA Hitachi HDS72303 (scsi)
Disk /dev/sde: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17.4kB 3001GB 3001GB primary

(parted) quit

Then I used fdisk to change the partition type to Linux raid auto

Finally I ran
mdadm --create /dev/md2 --level=0 --raid-devices=2 /dev/sdd1 /dev/sde1

but mdadm -QD /dev/md2 shows 2TBs are gone.
Array Size : 4294964224 (4096.00 GiB 4398.04 GB)

What to do in this case? How can I a 6TB raid array ?




--

Marcin M. Jessa
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Creating an md with 3TB drives.

am 28.09.2011 10:23:02 von NeilBrown

--Sig_/SfKaUKaow+NC1Nw9hal911+
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Wed, 28 Sep 2011 10:05:19 +0200 "Marcin M. Jessa" wrot=
e:

> Hi guys.
>=20
>=20
> I have two 3TB drives and I want to set them up as RAID0.
> The problem is I can't use all of the space on them.
> I only get 4TB of the 6 in total.
>=20
> What I tried was:
> # parted /dev/sde
> GNU Parted 2.3
> Using /dev/sde
> Welcome to GNU Parted! Type 'help' to view a list of commands.
> (parted) mklabel gpt
> Warning: The existing disk label on /dev/sde will be destroyed and all=20
> data on this disk will be lost. Do you want
> to continue?
> Yes/No? yes
> (parted) mkpart primary 0 -0
> Warning: The resulting partition is not properly aligned for best=20
> performance.
> Ignore/Cancel? ignore
> (parted) print
> Model: ATA Hitachi HDS72303 (scsi)
> Disk /dev/sde: 3001GB
> Sector size (logical/physical): 512B/512B
> Partition Table: gpt
>=20
> Number Start End Size File system Name Flags
> 1 17.4kB 3001GB 3001GB primary

I wouldn't bother with a partition table - just use the whole device.
But partition tables should work if you want that.

>=20
> (parted) quit
>=20
> Then I used fdisk to change the partition type to Linux raid auto

You can do that if you like but it will have no effect. The "raid auto"
partition type only means anything on MBR partitions. You don't need to, so
don't bother.

>=20
> Finally I ran
> mdadm --create /dev/md2 --level=3D0 --raid-devices=3D2 /dev/sdd1 /dev/sde1
>=20
> but mdadm -QD /dev/md2 shows 2TBs are gone.
> Array Size : 4294964224 (4096.00 GiB 4398.04 GB)
>=20
> What to do in this case? How can I a 6TB raid array ?
>=20
Hmm... maybe you have an old version of mdadm.
Or maybe mdadm is broken.
Please report:
mdadm -E /dev/sdd1 /dev/sde1
blockdev --getsz /dev/md2
cat /proc/mdstat

NeilBrown


>=20


--Sig_/SfKaUKaow+NC1Nw9hal911+
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iD8DBQFOgtlmG5fc6gV+Wb0RAt2hAKDRvlcbByS0lc+XrB+1PKgllvLySACe KQGK
17ct3K66CFNKbuphWZq7wsw=
=IEo4
-----END PGP SIGNATURE-----

--Sig_/SfKaUKaow+NC1Nw9hal911+--
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Creating an md with 3TB drives.

am 28.09.2011 10:31:57 von lists

On 9/28/11 10:23 AM, NeilBrown wrote:
[...]

>>
>> Then I used fdisk to change the partition type to Linux raid auto
>
> You can do that if you like but it will have no effect. The "raid auto"
> partition type only means anything on MBR partitions. You don't need to, so
> don't bother.

Thanks Neil.
Not using fdisk worked like a charm.

# mdadm -QD /dev/md2
mdadm: bad uuid: UUID=aaa23fb6:a7bce189:b5293030:df5c4a2
/dev/md2:
Version : 1.2
Creation Time : Wed Sep 28 10:27:31 2011
Raid Level : raid0
Array Size : 5860530176 (5589.04 GiB 6001.18 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent

Update Time : Wed Sep 28 10:27:31 2011
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Chunk Size : 512K

Name : odin:2 (local to host odin)
UUID : 5577bbc0:8ec6a7ff:07aff1ed:5610061c
Events : 0

Number Major Minor RaidDevice State
0 8 49 0 active sync /dev/sdd1
1 8 65 1 active sync /dev/sde1



--

Marcin M. Jessa
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Creating an md with 3TB drives.

am 28.09.2011 10:43:47 von David Brown

On 28/09/2011 10:31, Marcin M. Jessa wrote:
> On 9/28/11 10:23 AM, NeilBrown wrote:
> [...]
>
>>>
>>> Then I used fdisk to change the partition type to Linux raid auto
>>
>> You can do that if you like but it will have no effect. The "raid auto"
>> partition type only means anything on MBR partitions. You don't need
>> to, so
>> don't bother.
>
> Thanks Neil.
> Not using fdisk worked like a charm.
>

Using fdisk probably resulted in the disks going over to MBR rather than
GPT, and thus you have a 2TB limit.

By the way, you should probably try the parted again and fix the
alignment issue (rather than just "ignoring" it) - it will make a /big/
difference.



--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Creating an md with 3TB drives.

am 28.09.2011 17:09:00 von lists

On 9/28/11 10:43 AM, David Brown wrote:
> On 28/09/2011 10:31, Marcin M. Jessa wrote:
>> On 9/28/11 10:23 AM, NeilBrown wrote:
>> [...]
>>
>>>>
>>>> Then I used fdisk to change the partition type to Linux raid auto
>>>
>>> You can do that if you like but it will have no effect. The "raid auto"
>>> partition type only means anything on MBR partitions. You don't need
>>> to, so
>>> don't bother.
>>
>> Thanks Neil.
>> Not using fdisk worked like a charm.
>>
>
> Using fdisk probably resulted in the disks going over to MBR rather than
> GPT, and thus you have a 2TB limit.
>
> By the way, you should probably try the parted again and fix the
> alignment issue (rather than just "ignoring" it) - it will make a /big/
> difference.

In terms of speed?
This RAID array is temporarily just so I can back up/restore my broken
5x2TB RAID6 but it would be interesting to know what to do.
I was running
# parted -a optimal /dev/sdd
which was suppose to fix that warning but it didn't.


--

Marcin M. Jessa
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Creating an md with 3TB drives.

am 29.09.2011 11:09:18 von David Brown

On 28/09/2011 17:09, Marcin M. Jessa wrote:
> On 9/28/11 10:43 AM, David Brown wrote:
>> On 28/09/2011 10:31, Marcin M. Jessa wrote:
>>> On 9/28/11 10:23 AM, NeilBrown wrote:
>>> [...]
>>>
>>>>>
>>>>> Then I used fdisk to change the partition type to Linux raid auto
>>>>
>>>> You can do that if you like but it will have no effect. The "raid auto"
>>>> partition type only means anything on MBR partitions. You don't need
>>>> to, so
>>>> don't bother.
>>>
>>> Thanks Neil.
>>> Not using fdisk worked like a charm.
>>>
>>
>> Using fdisk probably resulted in the disks going over to MBR rather than
>> GPT, and thus you have a 2TB limit.
>>
>> By the way, you should probably try the parted again and fix the
>> alignment issue (rather than just "ignoring" it) - it will make a /big/
>> difference.
>
> In terms of speed?
> This RAID array is temporarily just so I can back up/restore my broken
> 5x2TB RAID6 but it would be interesting to know what to do.
> I was running
> # parted -a optimal /dev/sdd
> which was suppose to fix that warning but it didn't.
>

Yes, I was thinking in terms of speed. I haven't gone beyond 2 TB disks
with MBR myself, so I can't comment on whether your partitions really
are misaligned, or if it is just an incorrect warning. But if these
disks are like most 2 TB disks with 4K sectors but which lie and claim
to have 512 byte sectors (for compatibility with ancient and inferior
OS'es), then partition misalignment will be major performance hit. It's
worth double-checking that you've got it right here, before you go to
far with the array.



--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Creating an md with 3TB drives.

am 29.09.2011 11:23:35 von lists

On 9/29/11 11:09 AM, David Brown wrote:
> On 28/09/2011 17:09, Marcin M. Jessa wrote:
>> On 9/28/11 10:43 AM, David Brown wrote:
>>> On 28/09/2011 10:31, Marcin M. Jessa wrote:
>>>> On 9/28/11 10:23 AM, NeilBrown wrote:
>>>> [...]
>>>>
>>>>>>
>>>>>> Then I used fdisk to change the partition type to Linux raid auto
>>>>>
>>>>> You can do that if you like but it will have no effect. The "raid
>>>>> auto"
>>>>> partition type only means anything on MBR partitions. You don't need
>>>>> to, so
>>>>> don't bother.
>>>>
>>>> Thanks Neil.
>>>> Not using fdisk worked like a charm.
>>>>
>>>
>>> Using fdisk probably resulted in the disks going over to MBR rather than
>>> GPT, and thus you have a 2TB limit.
>>>
>>> By the way, you should probably try the parted again and fix the
>>> alignment issue (rather than just "ignoring" it) - it will make a /big/
>>> difference.
>>
>> In terms of speed?
>> This RAID array is temporarily just so I can back up/restore my broken
>> 5x2TB RAID6 but it would be interesting to know what to do.
>> I was running
>> # parted -a optimal /dev/sdd
>> which was suppose to fix that warning but it didn't.
>>
>
> Yes, I was thinking in terms of speed. I haven't gone beyond 2 TB disks
> with MBR myself, so I can't comment on whether your partitions really
> are misaligned, or if it is just an incorrect warning. But if these
> disks are like most 2 TB disks with 4K sectors but which lie and claim
> to have 512 byte sectors (for compatibility with ancient and inferior
> OS'es), then partition misalignment will be major performance hit. It's
> worth double-checking that you've got it right here, before you go to
> far with the array.

These are 3TB Hitachi drives and Hitachi kept 512 byte sectors:
http://www.hitachigst.com/internal-drives/desktop/deskstar/d eskstar-7k3000



--

Marcin M. Jessa
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Creating an md with 3TB drives.

am 29.09.2011 13:18:46 von David Brown

On 29/09/2011 11:23, Marcin M. Jessa wrote:
> On 9/29/11 11:09 AM, David Brown wrote:
>> On 28/09/2011 17:09, Marcin M. Jessa wrote:
>>> On 9/28/11 10:43 AM, David Brown wrote:
>>>> On 28/09/2011 10:31, Marcin M. Jessa wrote:
>>>>> On 9/28/11 10:23 AM, NeilBrown wrote:
>>>>> [...]
>>>>>
>>>>>>>
>>>>>>> Then I used fdisk to change the partition type to Linux raid auto
>>>>>>
>>>>>> You can do that if you like but it will have no effect. The "raid
>>>>>> auto"
>>>>>> partition type only means anything on MBR partitions. You don't need
>>>>>> to, so
>>>>>> don't bother.
>>>>>
>>>>> Thanks Neil.
>>>>> Not using fdisk worked like a charm.
>>>>>
>>>>
>>>> Using fdisk probably resulted in the disks going over to MBR rather
>>>> than
>>>> GPT, and thus you have a 2TB limit.
>>>>
>>>> By the way, you should probably try the parted again and fix the
>>>> alignment issue (rather than just "ignoring" it) - it will make a /big/
>>>> difference.
>>>
>>> In terms of speed?
>>> This RAID array is temporarily just so I can back up/restore my broken
>>> 5x2TB RAID6 but it would be interesting to know what to do.
>>> I was running
>>> # parted -a optimal /dev/sdd
>>> which was suppose to fix that warning but it didn't.
>>>
>>
>> Yes, I was thinking in terms of speed. I haven't gone beyond 2 TB disks
>> with MBR myself, so I can't comment on whether your partitions really
>> are misaligned, or if it is just an incorrect warning. But if these
>> disks are like most 2 TB disks with 4K sectors but which lie and claim
>> to have 512 byte sectors (for compatibility with ancient and inferior
>> OS'es), then partition misalignment will be major performance hit. It's
>> worth double-checking that you've got it right here, before you go to
>> far with the array.
>
> These are 3TB Hitachi drives and Hitachi kept 512 byte sectors:
> http://www.hitachigst.com/internal-drives/desktop/deskstar/d eskstar-7k3000
>

I did not know such drives existed - I thought all 2TB+ drives were 4K
sector size. If these drives really have 512 byte sectors, then
alignment will not be an issue.



--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Creating an md with 3TB drives.

am 06.10.2011 00:25:23 von Sebastian Muniz

On 9/28/2011 5:05 AM, Marcin M. Jessa wrote:

> # parted /dev/sde
> GNU Parted 2.3
> Using /dev/sde
> Welcome to GNU Parted! Type 'help' to view a list of commands.
> (parted) mklabel gpt
> Warning: The existing disk label on /dev/sde will be destroyed and all
> data on this disk will be lost. Do you want
> to continue?
> Yes/No? yes
> (parted) mkpart primary 0 -0
> Warning: The resulting partition is not properly aligned for best
> performance.
> Ignore/Cancel? ignore
> (parted) print
> Model: ATA Hitachi HDS72303 (scsi)
> Disk /dev/sde: 3001GB
> Sector size (logical/physical): 512B/512B
> Partition Table: gpt
>
> Number Start End Size File system Name Flags
> 1 17.4kB 3001GB 3001GB primary
>
> (parted) quit
>
I run into something similar working with 2Terabytes disks.
I had to use % instead o sizes.
Eg:
(parted) mkpart
Partition name? []? 1
File system type? [ext2]?
Start? 0
End? 100%
(parted) set 1
Flag to Invert? raid
New state? [on]/off? on

I think the "primary" concept is for DOS 3.3 partition tables and might
not apply here.
Please, correct if I am wrong.
THanks
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Creating an md with 3TB drives.

am 06.10.2011 01:20:29 von jeromepoulin

> On 9/28/2011 5:05 AM, Marcin M. Jessa wrote:
>
> # parted /dev/sde
> GNU Parted 2.3
> Using /dev/sde
> Welcome to GNU Parted! Type 'help' to view a list of commands.

Try with gdisk instead, I find it much more command friendly than parted.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html