Re: Growing Array (More Devices) - new devices are slightly smaller than the existing drives, unable to shrink array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat Sep 28, 2013 at 10:49:49AM -0400, Matt Callaghan wrote:

> Hello mdadm Linux-RAID experts;
> 
> My Goal: Expand (grow) my array from 6xHDD (RAID6) to 8xHDD (RAID6)
> 
> This is my root cause problem: when I went to try to add the new drive 
> (already formatted for Linux RAID partition):
> 
> fermulator@fermmy-server:~$ sudo mdadm --add /dev/md2000 /dev/sdq1
> mdadm: /dev/sdq1 not large enough to join array
> 
> As I have researched and learned, I need to:
>   A) shrink the filesystem (ext4) -- done (shrunk by a generous 1.6GB)
>   B) shrink the array size -- incomplete (unable to proceed, the --grow 
> command doesn't do anything)
> 
> I've been following this guide: 
> http://webapp5.rrz.uni-hamburg.de/SuSe-Dokumentation/manual/sles-manuals_en/manual/raidresize.html#resizedecrraid 
> 
> 
> This pastebin shows my array details, the 'existing' drives (fdisk) and 
> 'new' drives (fdisk) - http://pastebin.com/U04VJpE4
> 
> Any ideas?
> 
Firstly, your new drives are exactly the same size as the old ones:
    Disk /dev/sdk: 2000.4 GB, 2000398934016 bytes
    Disk /dev/sdq: 2000.4 GB, 2000398934016 bytes

Your partition sizes are different though, probably because newer
versions on fdisk default to a higher start point. You can replicate the
partitions from the old disks onto the new ones using sfdisk:
    sfdisk -d /dev/sdk | sfdisk /dev/sdq

You can do the same thing manually using fdisk - just make sure you set
the units to sectors (fdisk -u=sectors) as the cylinder information
differs between the disks (and is obsolete and meaningless).

If you do want to stick with the partitions you have and continue with
shrinking the array, the value passed with the "-z" parameter is the
device size, not the array size. You're passing a value larger than the
disk size, so it's being ignored. It also needs to be a multiple of the
chunk size (64k in your case). So you need to take your 7812441960,
divide by the number of active disks (4) and round up to the nearest
64k. This gives you a new device size of 1953110528.

Cheers,
    Robin

-- 
     ___        
    ( ' }     |       Robin Hill        <robin@xxxxxxxxxxxxxxx> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux