Unable to add space

I have / root directory has file system /dev/sda1 with 19G space
I want to add some more space to /home directory but unable to do it while running below command getting below message

$sudo mkfs -t ext4 /dev/sda2
mke2fs 1.42.9 (4-Feb-2014)
mkfs.ext4: inode_size (128) * inodes_count (0) too big for a
filesystem with 0 blocks, specify higher inode_ratio (-i)
or lower inode count (-N).

#lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 55G 0 disk
sda1 8:1 0 19G 0 part /
sda2 8:2 0 1K 0 part
sda5 8:5 0 1022M 0 part [SWAP]
sr0 11:0 1 33M 0 rom

Partition /dev/sda2 is an extended partition, used to encapsulate all the logical partitions, like /dev/sda5 (swap). You can not use that to put a filesystem on it.

You need to create another partition number /dev/sda6 , (use fdisk or parted for that), then you can create a filesystem ext4 on it.

My view is that you have allocated almost all the space to /dev/sda1 and the others (/dev/sda2 & /dev/sda5 are probably too small for a filesystem to be formed. I might be wrong, so I would be happy for any correction.

Did you allocate the space directed to the / filesystem or is a logical volume manager in play here?

Robin

/dev/sda is reporting 55G and /dev/sda1 has only 19G . Which makes your view improvable.

Unfortunately, the lsblk output provided does not give the information needed to determinate the type of partitions. However, there are enough clues to understand that what you said it is very unlikely.

The Ubuntu default partition scheme is to create a /dev/sda1 primary partition with mounting point on /
The second partition in /dev/sda2 is an extended partition, thus the 1k size.
And the third partition is /dev/sda5 (another clue) for swap.

And this is an Ubutu subforum.

Thus, why I suggested to continue with the schema and create another logical partition /dev/sda6 using some of the space available from the 55G shown.

Yes, I didn't spot that. Apologies.