Page 1 of 1

delete a primary partition

Posted: 2019/06/18 17:29:21
by buggy_the_clown
Hey guys,

I installed centOS using manual option in creating the partitions and the mount so i just create a /root and a /swap partition. Then i created a third partition of size 20G and xfs file system. Then i wanted to get it bigger up to 70GB. So i run fdisk , d for delete and the a for add...but it remembers everything both the data and the old size when i mount it. Please see the result of some commands below:

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 11G 7,9G 2,7G 75% /
devtmpfs 3,8G 0 3,8G 0% /dev
tmpfs 3,8G 0 3,8G 0% /dev/shm
tmpfs 3,8G 9,7M 3,8G 1% /run
tmpfs 3,8G 0 3,8G 0% /sys/fs/cgroup
/dev/sda3 19G 17G 2,6G 87% /data
tmpfs 3,8G 24K 3,8G 1% /tmp
/dev/sda1 497M 238M 260M 48% /boot
tmpfs 772M 8,0K 772M 1% /run/user/42
tmpfs 772M 0 772M 0% /run/user/0

ls /data
15.qcow2 generic.qcow2 Windows7Ultimate(64 Bit)PreActivatedbyc4rl05.iso

blockdev --getsize64 /dev/sda3
75161927680

fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sda: 120.0 GB, 120034123776 bytes, 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a7b99

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 25241599 12107776 8e Linux LVM
/dev/sda3 25241600 172042239 73400320 8e Linux LVM

blkid
/dev/mapper/cl-root: UUID="2ca828ba-fbbb-4fc3-a52d-0f0149039231" TYPE="xfs"
/dev/sda2: UUID="TQP7A5-YKZs-uQXA-NRyZ-E3tH-fEPJ-YzlLE1" TYPE="LVM2_member"
/dev/sda1: UUID="058cda12-fd09-4757-929f-edeb233590c1" TYPE="xfs"
/dev/sda3: UUID="d9e6d7cb-830c-4067-b1e3-fff17f152178" TYPE="xfs"
/dev/mapper/cl-swap: UUID="f8158d55-a51a-40a8-9ad5-175662125838" TYPE="swap"
/dev/sdb1: LABEL="Rinnegan" UUID="9C34FB8F34FB6B22" TYPE="ntfs"

whats the difference between xfs and LVM2_member? i now notice that blkid command still sees the partition as xfs. Also, /dev/sda2 doesnt appear in df -h listing .. why is that?

Thank you for your time

Re: delete a primary partition

Posted: 2019/06/18 21:04:25
by buggy_the_clown
it worked, i run mkfs.xfs on the /dev/sda3 and after the mounting is being read with the new size (70G)