typ** command lsblk for checking the space added
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 40G 0 disk
├─sda1 8:1 0 1G 0 part /extra-storage
└─sda2 8:2 0 39G 0 part
├─cl_stag--elk--testing1-root 253:0 0 35.1G 0 lvm /
└─cl_stag--elk--testing1-swap 253:1 0 4G 0 lvm [SWAP]
sdb 8:16 0 20G 0 disk 20GB added
sr0 11:0 1 1024M 0 rom
[root@stag-elk-testing1 extra-storage]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xcc8319d1.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-41943039, default 2048): 2048
Last sector, +sectors or +size{K,M,G,T,P} (2048-41943039, default 41943039): try enter and then if signature option comes apply for remove
Created a new partition 1 of type 'Linux' and of size 20 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
[root@stag-elk-testing1 extra-storage]# fdisk -l clear picture of the partitions and space alloted to it
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disklabel type: dos
Disk identifier: 0xa263bb60
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 83886079 81786880 39G 8e Linux LVM
Disk /dev/mapper/cl_stag--elk--testing1-root: 35.1 GiB, 37652267008 bytes, 73539584 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disk /dev/mapper/cl_stag--elk--testing1-swap: 4 GiB, 4219469824 bytes, 8241152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disklabel type: dos
Disk identifier: 0xcc8319d1
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 41943039 41940992 20G 83 Linux
[root@stag-elk-testing1 extra-storage]# mkfs.ext4 /dev/s Formatting
sda sda2 sdb1 sg1 shm/ snd/ stderr stdout
sda1 sdb sg0 sg2 snapshot sr0 stdin
[root@stag-elk-testing1 extra-storage]# mkfs.ext4 /dev/sdb
sdb sdb1
[root@stag-elk-testing1 extra-storage]# mkfs.ext4 /dev/sdb1 Formatting
mke2fs 1.45.6 (20-Mar-2020)
Discarding device blocks: done
Creating filesystem with 5242624 4k blocks and 1310720 inodes
Filesystem UUID: 940eadc0-dbc0-4519-8bc2-c5d4d23c4823
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
I created a partition using the above sdb1 in which there is 30GB something.
I wanted to mount it at /home/kafka_data where there is 20GB already and data also.
The thing is when i mounted that space at /home/kafka_data all the data got replaced and is hidden and my kafka stopped working.
In the output of df-h now there is two home one is the older one with the 20 GB and the other one is /home/kafka_data 30 GB space.
But the older data ishidden /home/kafka_data is empty