linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* not able to resize/grow RAID-1 (beyond 1 TB?)
@ 2012-01-13 20:35 Tomasz Chmielewski
       [not found] ` <4F11E4F4.1030309@stud.tu-ilmenau.de>
  0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Chmielewski @ 2012-01-13 20:35 UTC (permalink / raw)
  To: linux-raid

Hi,

I have mdadm RAID-1 array which is 1 TB big.

I would like to increase it to ~3 TB, since this is what the new 
partition size is - however, mdadm doesn't want to do it and stays with 
the old size.

Here, mdadm -D output showing the array is 1024 GB:

# mdadm -D /dev/md2
/dev/md2:
         Version : 1.2
   Creation Time : Fri Jan 13 07:02:29 2012
      Raid Level : raid1
      Array Size : 1073740800 (1024.00 GiB 1099.51 GB)
   Used Dev Size : 1073740800 (1024.00 GiB 1099.51 GB)
    Raid Devices : 2
   Total Devices : 2
     Persistence : Superblock is persistent

     Update Time : Fri Jan 13 21:25:09 2012
           State : clean
  Active Devices : 2
Working Devices : 2
  Failed Devices : 0
   Spare Devices : 0

            Name : rescue:2
            UUID : 9fc28b3f:7b91d523:8aa20629:5f5bd029
          Events : 6699

     Number   Major   Minor   RaidDevice State
        0       8        3        0      active sync   /dev/sda3
        1       8       19        1      active sync   /dev/sdb3


Here, we can see the partitions used by /dev/md2 are ~3 TB big:

# parted /dev/sda
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
  5      1049kB  2097kB  1049kB                     bios_grub
  1      2097kB  34.4GB  34.4GB                     raid
  2      34.4GB  34.9GB  537MB                      raid
  3      34.9GB  3001GB  2966GB                     raid

(parted) q

# parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
  5      1049kB  2097kB  1049kB                     bios_grub
  1      2097kB  34.4GB  34.4GB                     raid
  2      34.4GB  34.9GB  537MB                      raid
  3      34.9GB  3001GB  2966GB                     raid

(parted) q



Now, let's try to grow - it stays unchanged at 1024 GB:

# mdadm --grow /dev/md2 --size=max
mdadm: component size of /dev/md2 has been set to 1073740800K


What am I doing wrong here?


-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: not able to resize/grow RAID-1 (beyond 1 TB?)
       [not found] ` <4F11E4F4.1030309@stud.tu-ilmenau.de>
@ 2012-01-14 21:15   ` Tomasz Chmielewski
  0 siblings, 0 replies; 2+ messages in thread
From: Tomasz Chmielewski @ 2012-01-14 21:15 UTC (permalink / raw)
  To: stefan.huebner, linux-raid

On 01/14/2012 09:26 PM, Stefan /*St0fF*/ Hübner wrote:
> Hi Tomasz,
>
> at first: if you had 1TB drives before, dd'ed them to the new 3TB drives
> and changed the partitioning scheme accordingly - that all looks OK.
> The weird thing here is that 1TB disks never had 1024GiB, but 931GiB.
> So the reshape has already happened to "the system's maximum".
>
> I do suspect you have a 32bit system and mdadm is not the latest version?

No, the system was 64 bit from the very beginning; mdadm may not be the 
latest one, but is far from being obsoletes, too (Debian Squeeze).

The issue is actually solved now.

What I had to do was:

mdadm /dev/md2 -f /dev/sdb3
mdadm /dev/md2 -r /dev/sdb3
# not necessarily 10 MB needs cleaning, but it's a small number...
dd if=/dev/zero of=/dev/sdb3 bs=1M count=10
mdadm /dev/md2 -a /dev/sdb3
# wait till it syncs, and do the same for /dev/sda3
reboot


If I did the same without dd if=/dev/zero, it somehow didn't want to 
work and /dev/md2 was still only 1 TB big.
Unless I've messed up somewhere!



-- 
Tomasz Chmielewski
http://wpkg.org


--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-14 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 20:35 not able to resize/grow RAID-1 (beyond 1 TB?) Tomasz Chmielewski
     [not found] ` <4F11E4F4.1030309@stud.tu-ilmenau.de>
2012-01-14 21:15   ` Tomasz Chmielewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).