public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Unable to expand ext4 partition
@ 2022-02-05 17:43 Julien Roy
  2022-02-05 19:09 ` Wol
  0 siblings, 1 reply; 9+ messages in thread
From: Julien Roy @ 2022-02-05 17:43 UTC (permalink / raw
  To: Gentoo User

[-- Attachment #1: Type: text/plain, Size: 3152 bytes --]

Hello,

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 !...
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).
I seem to have done everything in order since I can see all 4 drives are used when I run the vgdisplay command, and lvdisplay tells me that there is 16.37TB of usable space in the logical volume.
In fact, running fdisk -l on the lv confirms this as well :
Disk /dev/vgraid/lvraid: 16.37 TiB

However, the partition on it is still at 12TB (or a little bit less in HDD units) and I am unable to expand it.
When I run the resize2fs 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, resize2fs halts with the following error:
doas resize2fs /dev/vgraid/lvraid
resize2fs 1.46.4 (18-Aug-2021)
Resizing the filesystem on /dev/vgraid/lvraid to 4395386880 (4k) blocks.
resize2fs: Input/output error while trying to resize /dev/vgraid/lvraid
Please run 'e2fsck -fy /dev/vgraid/lvraid' to fix the filesystem
after the aborted resize operation.

A few seconds after the resize2fs gives the "input/output" error, I can see the following lines appearing multiple times in dmesg:
Feb  5 12:35:50 gentoo kernel: Buffer I/O error on dev dm-8, logical block 2930769920, lost async page write

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.
I have then tried running the e2fsck command as instructed, which fixes some things [1], and then running the resize2fs command again, but it does the same thing every time.

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

Thanks !
Julien

[0] https://wiki.archlinux.org/title/User:Ctag/Notes#Growing_LVM_Raid5
[1] doas e2fsck -fy /dev/vgraid/lvraid
e2fsck 1.46.4 (18-Aug-2021)
Resize inode not valid.  Recreate? yes

Pass 1: Checking inodes, blocks, and sizes
Inode 238814586 extent tree (at level 1) could be narrower.  Optimize? yes

Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(2080--2096) +(2304--2305) +(2307--2321)
Fix? yes

Free blocks count wrong for group #0 (1863, counted=1864).
Fix? yes


/dev/vgraid/lvraid: ***** FILE SYSTEM WAS MODIFIED *****
/dev/vgraid/lvraid: 199180/366284800 files (0.8% non-contiguous), 2768068728/2930257920 blocks

[-- Attachment #2: Type: text/html, Size: 8265 bytes --]

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

end of thread, other threads:[~2022-02-06  8:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-05 17:43 [gentoo-user] Unable to expand ext4 partition Julien Roy
2022-02-05 19:09 ` Wol
2022-02-05 19:37   ` Julien Roy
2022-02-05 22:02     ` Wols Lists
2022-02-05 22:16       ` Julien Roy
2022-02-05 23:04         ` Wol
2022-02-06  0:37           ` Julien Roy
2022-02-06  0:47             ` Mark Knecht
2022-02-06  8:12               ` Wols Lists

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox