0

how to know if some data already exist on device - disk

The simple way to check if disk include filesystem is to do:

 mount /grid/sdb /mnt

and if sdb or other /dev/sdx have file-system then mount will be succeeded, if not ... probably file system exists!

but this is ugly way to check that..

what the other elegant alternative to check file-system on disk?

my target is to check if file-system already configured on disk's as /dev/sdb - /dev/sdx

King David
  • 1,001

1 Answers1

0

You could use parted -l to list partitions (and filesystems). In case you are interested in damaged or partially wiped filesystems you can use recovery tools such as testdisk.

sebasth
  • 850