I want to reduce a soft raid1 disk size,

but the following cmd shows an error,

root@GalensSynology:~# mdadm --grow /dev/md2 --size=83886080
mdadm: Can't read enough disk from md2
mdadm: component size of /dev/md2 unchanged at 483433472K

I already resized filesystem,

root@GalensSynology:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/md0        2.3G  952M  1.3G  43% /
none            1.9G     0  1.9G   0% /dev
/tmp            1.9G  3.5M  1.9G   1% /tmp
/run            1.9G  7.6M  1.9G   1% /run
/dev/shm        1.9G   24K  1.9G   1% /dev/shm
none            4.0K     0  4.0K   0% /sys/fs/cgroup
cgmfs           100K     0  100K   0% /run/cgmanager/fs
/dev/md3        3.5T  546G  3.0T  16% /volume2
/dev/md2         24G  5.7G   18G  24% /volume1

and the raid disk info:

root@GalensSynology:~# mdadm -D /dev/md2
        Version : 1.2
  Creation Time : Thu Sep 26 14:46:34 2019
     Raid Level : raid1
     Array Size : 483433472 (461.04 GiB 495.04 GB)
  Used Dev Size : 483433472 (461.04 GiB 495.04 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu Oct 17 21:33:11 2019
          State : active 
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : GalensSynology:2  (local to host GalensSynology)
           UUID : ce0e9aff:a0d43a65:acbf6b7f:d9786045
         Events : 1045

    Number   Major   Minor   RaidDevice State
       0       8       67        0      active sync   /dev/sde3
       1       8       83        1      active sync   /dev/sdf3
  • "Can't read enough disk" is a message I can't find anywhere, not in mdadm sourcecode nor with Google, if this is really the message you got then it's probably something specific to Synology? – frostschutz Oct 17 '19 at 14:14

From manual pages of mdadm

       -G, --grow
              Change the size or shape of an active array.

So this mean, you can not change the size (in MB, GB or smth). After shrinking the filesystem you can shrink the partitions size which you have used for mdadm raid. In this way, you should 'recover' space on disk to create new one partition(s).

|improve this answer|||||
  • you can definitely shrink a mdadm array with that --grow option. See howtoforge.com/… – SYN Oct 17 '19 at 14:12
  • OK, but you 'recover' the space which will be unusable. Right? And the second important thing - the mdadm array which you want to resize must be inactive (unmounted). – mariaczi Oct 17 '19 at 14:17

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.