I'm looking to create a script that lists the unformatted partitions/disks in Linux OS.
I couldn't find a reliable way of listing the unformatted disks / partitions.
I tried to use lsblk --output NAME,FSTYPE,MOUNTPOINT | grep "sd"
which outputted:
sda
└─sda1 xfs /
sdb
└─sdb1 ext4 /mnt/resource
sdc
sdd
The names which do not have mountpoint listed against them are unformatted disks. How can I get those names? Or what would be the best way to get these?
I'm on CentOS Linux release 7.3.1611 (Core)