I created a partition with parted
and then removed it using parted /dev/<partition> rm partition number
. After that I executed partprobe
,udevadm settle
and systmelctl daemon-reload
. Then I used lsblk
and the partition was not showing. Then when I tried to create another partition with same size using parted
I was able to but when I tried to use mkfs.xfs
on that partition, it said the data already exists. It said use the -f
option overwrite the data with new file system.
My question is that can you remove the partition and filesystem at the same time using parted? If not, then using fdisk
or gdisk
is better?
Also, what's the difference between partprobe
,udevadm settle
and systmelctl daemon-reload
? Do you use it after creating a partition with parted or after writing a file system on it or both?