<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <div>Hello,<br></div><div dir="auto"><br></div><div dir="auto">I've been running an LVM RAID 5 on my home lab for a while, and recently it's been getting awfully close to 100% full, so I decided to buy a new drive to add to it, however, growing an LVM RAID is more complicated than I thought! I found very few documentation on how to do this, and settled on following some user's notes on the Arch Wiki [0]. I should've used mdadm !...<br></div><div dir="auto">My RAID 5 consisted of 3x6TB drives giving me a total of 12TB of usable space. I am trying to grow it to 18TB now (4x6TB -1 for parity).<br></div><div dir="auto">I seem to have done everything in order since I can see all 4 drives are used when I run the <span class="" style="font-family: monospace, sans-serif;">vgdisplay</span> command, and <span class="" style="font-family: monospace, sans-serif;">lvdisplay</span> tells me that there is 16.37TB of usable space in the logical volume.<br></div><div dir="auto">In fact, running <span class="" style="font-family: monospace, sans-serif;">fdisk -l</span> on the lv confirms this as well :<br></div><div dir="auto"><span class="" style="font-family: monospace, sans-serif;">Disk /dev/vgraid/lvraid: 16.37 TiB</span><br></div><div dir="auto"><br></div><div dir="auto">However, the partition on it is still at 12TB (or a little bit less in HDD units) and I am unable to expand it.<br></div><div dir="auto">When I run the <span class="" style="font-family: monospace, sans-serif;">resize2fs</span> command on the logical volume, I can see that it's doing something, and I can hear the disks doing HDD noises, but after just a few minutes (perhaps seconds), the disks turn quiet, and then a few more minutes later, <span class="" style="font-family: monospace, sans-serif;">resize2fs</span> halts with the following error:<br></div><div dir="auto"><span class="" style="font-family: monospace, sans-serif;">doas resize2fs /dev/vgraid/lvraid</span><br></div><div dir="auto"><span class="" style="font-family: monospace, sans-serif;">resize2fs 1.46.4 (18-Aug-2021)<br></span></div><div dir="auto"><span class="" style="font-family: monospace, sans-serif;">Resizing the filesystem on /dev/vgraid/lvraid to 4395386880 (4k) blocks.<br></span></div><div dir="auto"><span class="" style="font-family: monospace, sans-serif;">resize2fs: Input/output error while trying to resize /dev/vgraid/lvraid<br></span></div><div dir="auto"><span class="" style="font-family: monospace, sans-serif;">Please run 'e2fsck -fy /dev/vgraid/lvraid' to fix the filesystem<br></span></div><div dir="auto"><span class="" style="font-family: monospace, sans-serif;">after the aborted resize operation.</span><br></div><div dir="auto"><br></div><div dir="auto"><div dir="auto">A few seconds after the <span class="" style=""><span style="font-family:monospace, sans-serif" class="">resize2fs</span></span> gives the "input/output" error, I can see the following lines appearing multiple times in dmesg:<br></div><div dir="auto"><span class="" style=""><span style="font-family:monospace, sans-serif" class="">Feb 5 12:35:50 gentoo kernel: Buffer I/O error on dev dm-8, logical block 2930769920, lost async page write</span></span><br></div></div><div dir="auto"><br></div><div dir="auto">At first I was worried about data corruption or a defective drive, but I ran a smartctl test on all 4 drives and they all turn out healthy. Also, I am still capable of mounting the LVM partition and accessing all the data without any issue.<br></div><div dir="auto">I have then tried running the <span style="font-family: monospace, sans-serif;" class="">e2fsck</span> command as instructed, which fixes some things [1], and then running the <span style="font-family: monospace, sans-serif;" class="">resize2fs</span> command again, but it does the same thing every time.<br></div><div dir="auto"><br></div><div dir="auto">My Google skills seem to not be good enough for this one so I am hoping someone else here has an idea what is wrong...<br></div><div dir="auto"><br></div><div dir="auto">Thanks !<br></div><div>Julien<br></div><div dir="auto"><br></div><div dir="auto">[0] <a target="_blank" rel="noopener noreferrer" href="https://wiki.archlinux.org/title/User:Ctag/Notes#Growing_LVM_Raid5">https://wiki.archlinux.org/title/User:Ctag/Notes#Growing_LVM_Raid5</a><br></div><div dir="auto">[1] <span class="font" style="font-family: monospace, sans-serif;">doas e2fsck -fy /dev/vgraid/lvraid</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">e2fsck 1.46.4 (18-Aug-2021)</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Resize inode not valid. Recreate? yes</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Pass 1: Checking inodes, blocks, and sizes</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Inode 238814586 extent tree (at level 1) could be narrower. Optimize? yes</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Pass 1E: Optimizing extent trees</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Pass 2: Checking directory structure</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Pass 3: Checking directory connectivity</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Pass 4: Checking reference counts</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Pass 5: Checking group summary information</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Block bitmap differences: -(2080--2096) +(2304--2305) +(2307--2321)</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Fix? yes</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Free blocks count wrong for group #0 (1863, counted=1864).</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">Fix? yes</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">/dev/vgraid/lvraid: ***** FILE SYSTEM WAS MODIFIED *****</span><span class="font" style="font-family: monospace, sans-serif;"><br></span></div><div dir="auto"><span class="font" style="font-family: monospace, sans-serif;">/dev/vgraid/lvraid: 199180/366284800 files (0.8% non-contiguous), 2768068728/2930257920 blocks</span><br></div> </body> </html>