Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #185144

Buster: problem changing partition size on a RAID 5 array

From Gary Dale <garydale@torfree.net>
Newsgroups linux.debian.user
Subject Buster: problem changing partition size on a RAID 5 array
Date 2017-08-14 06:40 +0200
Message-ID <uefkt-7Y4-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


I just added another drive to my RAID 5 array, so it now has 6. 
Unfortunately I can't seem to use the extra space. After the array 
finished reshaping, I tried to grow the file system but resize2fs 
complained that the file system was already the maximum size. Running 
gdisk revealed the following:

Disk /dev/md1: 39068861440 sectors, 18.2 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): EFF29D11-D982-4933-9B57-B836591DEF02
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31255089118
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
    1            2048     31255089118   14.6 TiB    8300  Linux filesystem


As you can see, there is a discrepancy between the device size (18.2T) 
and the partition size (14.6T).

cat /proc/mdstat confirms that the device has all the drives running:

md1 : active raid5 sdb1[0] sdh1[6] sdc1[5] sdl1[3] sdm1[2] sdk1[1]
       19534430720 blocks super 1.2 level 5, 512k chunk, algorithm 2 
[6/6] [UUUUUU]
       bitmap: 0/30 pages [0KB], 65536KB chunk


Neither fdisk nor gdisk let me create a partition larger than the 
existing one. Nor do they let me create a new partition anywhere except 
in the first 2047 sectors.

I tried commenting out the mount lines in /etc/fstab and rebooting to 
rescue mode but that didn't help.

I finally tried gparted and it immediately noticed the problem and 
offered to fix it. It "found" the free space at the end of the device 
and I was able to resize the existing partition to fill it. I'm now 
using the full array size!

I'm not sure what the problem is that gparted was able to see but fdisk 
and gdisk couldn't and whether this is a bug in mdadm or something else, 
but I thought I should report it somewhere.

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Buster: problem changing partition size on a RAID 5 array Gary Dale <garydale@torfree.net> - 2017-08-14 06:40 +0200
  Re: Buster: problem changing partition size on a RAID 5 array Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-08-14 20:00 +0200
    Re: Buster: problem changing partition size on a RAID 5 array Gary Dale <garydale@torfree.net> - 2017-08-15 21:50 +0200
      Re: Buster: problem changing partition size on a RAID 5 array Nicholas Geovanis <nickgeovanis@gmail.com> - 2017-08-16 19:50 +0200
        Re: Buster: problem changing partition size on a RAID 5 array Gary Dale <garydale@torfree.net> - 2017-08-16 23:20 +0200
      Re: Buster: problem changing partition size on a RAID 5 array Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-08-20 16:10 +0200
        Re: Buster: problem changing partition size on a RAID 5 array Gary Dale <garydale@torfree.net> - 2017-08-21 21:00 +0200
  Re: Buster: problem changing partition size on a RAID 5 array Jimmy Johnson <field.engineer@gmail.com> - 2017-08-17 19:50 +0200

csiph-web