Skip to contentSkip to conversation

1T and 500+500 mirror, but different speeds

DISCUSSION David T-G 2 participants 4 messages Jul 9, 2021 – Jul 11, 2021 MD RAID

lore
Share & tools
lore

David T-G

author
#0 lore raw

Hi, all --

I have a 1T drive

jpo:~ # parted /dev/sdb print
Model: ATA ST31000524AS (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

  Number  Start   End     Size    Type     File system  Flags
   1      1049kB  1000GB  1000GB  primary  ntfs         type=07

jpo:~ # smartctl -i /dev/sdb
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-lp152.78-default] (SUSE RPM) Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

  Model Family:     Seagate Barracuda 7200.12
  Device Model:     ST31000524AS
  Serial Number:    9VPG4SHD
  LU WWN Device Id: 5 000c50 04d20d244
  Firmware Version: JC45
  User Capacity:    1,000,204,886,016 bytes [1.00 TB]
  Sector Size:      512 bytes logical/physical
  Rotation Rate:    7200 rpm
  Device is:        In smartctl database [for details use: -P show]
  ATA Version is:   ATA8-ACS T13/1699-D revision 4
  SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
  Local Time is:    Thu Jul  8 11:32:27 2021 UTC

SMART support is: Available - device has SMART capability. SMART support is: Enabled

and also two 500G drives

jpo:~ # parted /dev/sdc print
Model: ATA WDC WD5000AAVS-0 (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

  Number  Start   End    Size    File system  Name                                  Flags
   1      1049kB  356GB  356GB                ata-WDC_WD5000AAVS-00ZTB0_WD-WMASU06  raid
   2      356GB   495GB  139GB                                                      raid
   4      495GB   500GB  5001MB  reiserfs     wwn-0x50014ee055b724ad

jpo:~ # smartctl -i /dev/sdc
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-lp152.78-default] (SUSE RPM) Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

  Model Family:     Western Digital Caviar Green
  Device Model:     WDC WD5000AAVS-00ZTB0
  Serial Number:    WD-WMASU0686160
  LU WWN Device Id: 5 0014ee 055b724ad
  Firmware Version: 01.01B01
  User Capacity:    500,107,862,016 bytes [500 GB]
  Sector Size:      512 bytes logical/physical
  Device is:        In smartctl database [for details use: -P show]
  ATA Version is:   ATA8-ACS (minor revision not indicated)
  SATA Version is:  SATA 2.5, 3.0 Gb/s
  Local Time is:    Thu Jul  8 11:32:35 2021 UTC

SMART support is: Available - device has SMART capability. SMART support is: Enabled

that I plan to stripe together to use to protect the first. The Caviars are listed as variable speed, but in practice they apparently are just 5400 rpm, so I'd like to take advantage of striping to make them as fast as possible. This isn't the black magic ;-) of RAID10-on-two-drives, so I don't have to think of one as "front" and one as "back", but do I want more than one partition on each to stripe 4 or 6 slices to avoid hammering on one, or do I just go with each device as a whole and let mdadm handle the magic for me?

I also plan to use a partition on the 1T drive, but once I have the striped metadevice do I particularly want or particlularly not want to slice a partition out of it? I figured I would partition since that would let me exactly match the mirror halves to each other.

Oh, and to make this more fun the two 500s are actually part of a 3-dev RAID5 set holding the data to migrate to the 1T to then mirror, so I don't get to destructively play with this a dozen times :-)

Thanks in advance & have a great day!

:-D

Signature · 3 lines
David T-G
See http://justpickone.org/davidtg/email/
See http://justpickone.org/davidtg/tofu.txt
#1 lore raw
Quoted 14 lines · David T-G

Hi, all --

I have a 1T drive

jpo:~ # parted /dev/sdb print
Model: ATA ST31000524AS (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

  Number  Start   End     Size    Type     File system  Flags
   1      1049kB  1000GB  1000GB  primary  ntfs         type=07
Quoted 6 lines

jpo:~ # smartctl -i /dev/sdb
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-lp152.78-default] (SUSE RPM) Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.12

Barracuda ... DO NOT USE THIS IN A PARITY RAID ARRAY !!!

Mirroring as you plan here is okay.

Quoted 44 lines

Device Model: ST31000524AS
Serial Number: 9VPG4SHD
LU WWN Device Id: 5 000c50 04d20d244
Firmware Version: JC45

  User Capacity:    1,000,204,886,016 bytes [1.00 TB]
  Sector Size:      512 bytes logical/physical
  Rotation Rate:    7200 rpm
  Device is:        In smartctl database [for details use: -P show]
  ATA Version is:   ATA8-ACS T13/1699-D revision 4
  SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
  Local Time is:    Thu Jul  8 11:32:27 2021 UTC

SMART support is: Available - device has SMART capability. SMART support is: Enabled

and also two 500G drives

jpo:~ # parted /dev/sdc print
Model: ATA WDC WD5000AAVS-0 (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

  Number  Start   End    Size    File system  Name                                  Flags
   1      1049kB  356GB  356GB                ata-WDC_WD5000AAVS-00ZTB0_WD-WMASU06  raid
   2      356GB   495GB  139GB                                                      raid
   4      495GB   500GB  5001MB  reiserfs     wwn-0x50014ee055b724ad

jpo:~ # smartctl -i /dev/sdc
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-lp152.78-default] (SUSE RPM) Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

  Model Family:     Western Digital Caviar Green
  Device Model:     WDC WD5000AAVS-00ZTB0
  Serial Number:    WD-WMASU0686160
  LU WWN Device Id: 5 0014ee 055b724ad
  Firmware Version: 01.01B01
  User Capacity:    500,107,862,016 bytes [500 GB]
  Sector Size:      512 bytes logical/physical
  Device is:        In smartctl database [for details use: -P show]
  ATA Version is:   ATA8-ACS (minor revision not indicated)
  SATA Version is:  SATA 2.5, 3.0 Gb/s
  Local Time is:    Thu Jul  8 11:32:35 2021 UTC
Quoted 7 lines

SMART support is: Available - device has SMART capability. SMART support is: Enabled

that I plan to stripe together to use to protect the first. The Caviars are listed as variable speed, but in practice they apparently are just 5400 rpm, so I'd like to take advantage of striping to make them as fast as possible.

Caviar Green ??? Caviars should be okay, but the "green" moniker makes me nervous. Check SCT/ERC, but striping/mirroring will be fine.

Quoted 6 lines

This isn't the black magic ;-) of RAID10-on-two-drives,
so I don't have to think of one as "front" and one as "back", but do I want more than one partition on each to stripe 4 or 6 slices to avoid hammering on one, or do I just go with each device as a whole and let mdadm handle the magic for me?

Quoted 9 lines

I also plan to use a partition on the 1T drive, but once I have the striped metadevice do I particularly want or particlularly not want to slice a partition out of it? I figured I would partition since that would let me exactly match the mirror halves to each other.

Oh, and to make this more fun the two 500s are actually part of a 3-dev RAID5 set holding the data to migrate to the 1T to then mirror, so I don't get to destructively play with this a dozen times :-)

Okay, the simple approach.

Create a single-device mirror using the 1TB and the special device "missing". Copy everything across and make sure it's all okay. (I'm assuming you can safely wipe this drive as it has nothing on it you wish to keep.)

Create a striped device using the two 500GB drives.

Add the striped device to the 1TB mirror.

Plan to replace all the disks with something like Seagate Ironwolves or Toshiba N300s in the near future :-)

https://raid.wiki.kernel.org/index.php/Linux_Raid

Read especially the page on timeout mismatch as this DOES apply to your Barracuda !!!

Cheers,
Wol

author
#2 lore raw

Wol, et al --

...and then Wols Lists said...
%
% On 09/07/21 13:27, David T-G wrote:
% > Hi, all --
% >
% > I have a 1T drive
% >
% > jpo:~ # parted /dev/sdb print
% > Model: ATA ST31000524AS (scsi)
...
% > jpo:~ # smartctl -i /dev/sdb
...
% > Model Family: Seagate Barracuda 7200.12
%
% Barracuda ... DO NOT USE THIS IN A PARITY RAID ARRAY !!!

I am aware of the general problem, and I run the handy timeout script

  # set the timeouts on the local drives
  printf "${CBLU}Drive timeouts${CBLK}: "
  for DISK in sda sdb sdc sdd sde sdf sdg sdh     # a-d on mobo ; e-h on card
  do
    printf "$DISK "
    smartctl -q errorsonly -l scterc,70,70 /dev/$DISK
    if [ 4 -eq $? ]
    then
      echo 180 > /sys/block/$DISK/device/timeout
      printf "${CYLO}180"
    else
      printf "${CGRN}Y"
    fi
    printf "${CBLK} ; "
  done
  echo ''

to reset as needed, and I even have no plans to parity this drive, but I didn't realize that it was a problem disk! Thanks for the heads-up.

%
% Mirroring as you plan here is okay.

That's good. Of course, that then makes me scratch my head a bit since it's still paired with other and needs to not blow up ... I'll have to back and read more to see why mirror is safe.

%
...
% > and also two 500G drives
% >
% > jpo:~ # parted /dev/sdc print
% > Model: ATA WDC WD5000AAVS-0 (scsi)
...
% > jpo:~ # smartctl -i /dev/sdc
...
% > Model Family: Western Digital Caviar Green
...
% > that I plan to stripe together to use to protect the first. The Caviars % > are listed as variable speed, but in practice they apparently are just % > 5400 rpm, so I'd like to take advantage of striping to make them as fast % > as possible.
%
% Caviar Green ??? Caviars should be okay, but the "green" moniker makes

Yeah, I'm not too happy about that ... Supposedly they will vary speed based on demand, so they can deliver 7200rpm performance, but apparently they always stay at 5400rpm and so they're just basic drives. Meh.

% me nervous. Check SCT/ERC, but striping/mirroring will be fine.

More of that confusion stuff :-) but happy.

%
% > This isn't the black magic ;-) of RAID10-on-two-drives,
% > so I don't have to think of one as "front" and one as "back", but do I % > want more than one partition on each to stripe 4 or 6 slices to avoid % > hammering on one, or do I just go with each device as a whole and let % > mdadm handle the magic for me?
% >
...
% Okay, the simple approach.
%
% Create a single-device mirror using the 1TB and the special device % "missing". Copy everything across and make sure it's all okay. (I'm % assuming you can safely wipe this drive as it has nothing on it you wish % to keep.)

Correct.

%
% Create a striped device using the two 500GB drives.

That's the fun part ... I'm thinkin' I'm just going to have to do sector math to predict how large the new dev can be so that I can back into a proper partition size on the 1T so that both halves can match.

How much overhead does md need for striping (RAID0)? Given these two

jpo:~ # parted /dev/sdc unit s print free
Model: ATA WDC WD5000AAVS-0 (scsi)
Disk /dev/sdc: 976773168s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

  Number  Start       End         Size        File system  Name                                  Flags
          34s         2047s       2014s       Free Space
   1      2048s       696250367s  696248320s               ata-WDC_WD5000AAVS-00ZTB0_WD-WMASU06  raid
   2      696250368s  967006207s  270755840s                                                     raid
   4      967006208s  976773119s  9766912s    reiserfs     wwn-0x50014ee055b724ad
          976773120s  976773134s  15s         Free Space

500G disks (976773100 total sectors each, right?), how large a partition can I create on this

jpo:~ # parted /dev/sdb unit s print free
Model: ATA ST31000524AS (scsi)
Disk /dev/sdb: 1953525168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

  Number  Start        End          Size         Type     File system  Flags
          63s          2047s        1985s                 Free Space
   1      2048s        1953521663s  1953519616s  primary  ntfs         type=07
          1953521664s  1953525167s  3504s                 Free Space

1T disk (1953525104 sectors, which is 21096 less than the 2ea others together) can I create and expect to be able to match it across the pair?

Is this something I could mock up with overlays without destroying the existing data?

%
% Add the striped device to the 1TB mirror.

At that point it becomes easy :-)

%
% Plan to replace all the disks with something like Seagate Ironwolves or % Toshiba N300s in the near future :-)

Actually, I have four Seagate 4T drives

diskfarm:~ # parted /dev/sdd print
Model: ATA ST4000DM000-1F21 (scsi)
Disk /dev/sdd: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

  Number  Start   End     Size    File system  Name                             Flags
   1      1049kB  4001GB  4001GB  xfs          ata-ST4000DM000-1F2168_W300EYNA  raid
   2      4001GB  4001GB  134MB   reiserfs     wwn-0x5000c50069a8d76f

diskfarm:~ # smartctl -i /dev/sdd
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-lp152.63-default] (SUSE RPM) Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

  Model Family:     Seagate Desktop HDD.15
  Device Model:     ST4000DM000-1F2168
  Serial Number:    W300EYNA
  LU WWN Device Id: 5 000c50 069a8d76f
  Firmware Version: CC52
  User Capacity:    4,000,787,030,016 bytes [4.00 TB]
  Sector Sizes:     512 bytes logical, 4096 bytes physical
  Rotation Rate:    5900 rpm
  Form Factor:      3.5 inches
  Device is:        In smartctl database [for details use: -P show]
  ATA Version is:   ATA8-ACS T13/1699-D revision 4
  SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
  Local Time is:    Sat Jul 10 21:38:12 2021 UTC

SMART support is: Available - device has SMART capability. SMART support is: Enabled

in another machine that I plan to upgrade to larger disks and hand down to this one. They're older, and they don't

diskfarm:~ # smartctl -l scterc /dev/sdd
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-lp152.63-default] (SUSE RPM) Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

SCT Error Recovery Control command not supported

have SMART error handling, but at least they aren't SMR :-)

%
% https://raid.wiki.kernel.org/index.php/Linux_Raid
%
% Read especially the page on timeout mismatch as this DOES apply to your % Barracuda !!!

I'll go back again :-)

%
% Cheers,
% Wol

Have a great weekend!

:-D

Signature · 3 lines
David T-G
See http://justpickone.org/davidtg/email/
See http://justpickone.org/davidtg/tofu.txt
#3 lore raw
Quoted 8 lines · David T-G

Wol, et al --

...and then Wols Lists said...
%

Quoted 7 lines

%
% Mirroring as you plan here is okay.

That's good. Of course, that then makes me scratch my head a bit since it's still paired with other and needs to not blow up ... I'll have to back and read more to see why mirror is safe.

Mirroring is safe because, whatever happens to the mirror, you only need one disk to recover. So if the raid falls apart your data is not in danger.

Quoted 47 lines

%
...
% > and also two 500G drives
% >
% > jpo:~ # parted /dev/sdc print
% > Model: ATA WDC WD5000AAVS-0 (scsi)
...
% > jpo:~ # smartctl -i /dev/sdc
...
% > Model Family: Western Digital Caviar Green
...
% > that I plan to stripe together to use to protect the first. The Caviars % > are listed as variable speed, but in practice they apparently are just % > 5400 rpm, so I'd like to take advantage of striping to make them as fast % > as possible.
%
% Caviar Green ??? Caviars should be okay, but the "green" moniker makes

Yeah, I'm not too happy about that ... Supposedly they will vary speed based on demand, so they can deliver 7200rpm performance, but apparently they always stay at 5400rpm and so they're just basic drives. Meh.

% me nervous. Check SCT/ERC, but striping/mirroring will be fine.

More of that confusion stuff :-) but happy.

%
% > This isn't the black magic ;-) of RAID10-on-two-drives,
% > so I don't have to think of one as "front" and one as "back", but do I % > want more than one partition on each to stripe 4 or 6 slices to avoid % > hammering on one, or do I just go with each device as a whole and let % > mdadm handle the magic for me?
% >
...
% Okay, the simple approach.
%
% Create a single-device mirror using the 1TB and the special device % "missing". Copy everything across and make sure it's all okay. (I'm % assuming you can safely wipe this drive as it has nothing on it you wish % to keep.)

Correct.

Quoted 6 lines

%
% Create a striped device using the two 500GB drives.

That's the fun part ... I'm thinkin' I'm just going to have to do sector math to predict how large the new dev can be so that I can back into a proper partition size on the 1T so that both halves can match.

Do you need the entire space? Can you create a 900GB mirror on the 1TB? You can always grow the mirror and the filesystem later.

Quoted 45 lines

%
% Plan to replace all the disks with something like Seagate Ironwolves or % Toshiba N300s in the near future :-)

Actually, I have four Seagate 4T drives

diskfarm:~ # parted /dev/sdd print
Model: ATA ST4000DM000-1F21 (scsi)
Disk /dev/sdd: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

  Number  Start   End     Size    File system  Name                             Flags
   1      1049kB  4001GB  4001GB  xfs          ata-ST4000DM000-1F2168_W300EYNA  raid
   2      4001GB  4001GB  134MB   reiserfs     wwn-0x5000c50069a8d76f

diskfarm:~ # smartctl -i /dev/sdd
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-lp152.63-default] (SUSE RPM) Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

  Model Family:     Seagate Desktop HDD.15
  Device Model:     ST4000DM000-1F2168
  Serial Number:    W300EYNA
  LU WWN Device Id: 5 000c50 069a8d76f
  Firmware Version: CC52
  User Capacity:    4,000,787,030,016 bytes [4.00 TB]
  Sector Sizes:     512 bytes logical, 4096 bytes physical
  Rotation Rate:    5900 rpm
  Form Factor:      3.5 inches
  Device is:        In smartctl database [for details use: -P show]
  ATA Version is:   ATA8-ACS T13/1699-D revision 4
  SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
  Local Time is:    Sat Jul 10 21:38:12 2021 UTC

SMART support is: Available - device has SMART capability. SMART support is: Enabled

in another machine that I plan to upgrade to larger disks and hand down to this one. They're older, and they don't

Quoted 8 lines

diskfarm:~ # smartctl -l scterc /dev/sdd
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-lp152.63-default] (SUSE RPM) Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

SCT Error Recovery Control command not supported

have SMART error handling, but at least they aren't SMR :-)

They're no better! "SCT Error Recovery Control command not supported". This is the red flag. This is the same problem as with the Barracudas.

Quoted 9 lines

%
% https://raid.wiki.kernel.org/index.php/Linux_Raid
%
% Read especially the page on timeout mismatch as this DOES apply to your % Barracuda !!!

I'll go back again :-)

And it applies to your 4TBs as well. I wouldn't worry too much - I'm running a mirror on two 3TB Barracudas (I wouldn't have bought them if I'd realised, but I was a raid newbie back then ...)

Cheers,
Wol