This is just a tips.

Here is an example error when creating a filesystem on a device that has filesystem/partition on it.

# mkfs -L lun11 /dev/mapper/SATA_LUN11 -v

      mke2fs 1.41.12 (17-May-2010)
      /dev/mapper/SATA_LUN11 is apparently in use by the system; will
      not make a filesystem here! 

So, it appears that you need to specify option -F to overwrite existing filesystem when doing the filesystem creating .

Most of time, it should work. However, if the device has multiple partitions on the device, then it won't work.

Check disk partitions

For example:

# parted /dev/mapper/SATA_LUN11
      GNU Parted 2.1
      Using /dev/mapper/SATA_LUN11
      Welcome to GNU Parted! Type 'help' to view a list of commands.
      (parted) p                                                                
      Model: Linux device-mapper (multipath) (dm)
      Disk /dev/mapper/SATA_LUN11: 1649GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt

      Number  Start   End     Size    File system  Name          Flags
       2      1049kB  1049MB  1048MB               ceph journal
       1      1050MB  1649GB  1648GB  xfs          ceph data

Remove the partitions first

You have to remove the partitions on the device first

 Parted
      (parted) rm      1                                                             
      (parted) rm      2                                                             
      (parted) p                                                                
      Model: Linux device-mapper (multipath) (dm)
      Disk /dev/mapper/SATA_LUN11: 1649GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      Number  Start  End  Size  File system  Name  Flags

mkfs again

 # mkfs -t xfs -L lun11 /dev/mapper/SATA_LUN11

   mkfs.xfs: /dev/mapper/SATA_LUN11 appears to contain an existing filesystem (ext2).

   mkfs.xfs: Use the -f option to force overwrite.

   # mkfs -t xfs -L lun11 /dev/mapper/SATA_LUN11 -f
   meta-data=/dev/mapper/SATA_LUN11 isize=256    agcount=4,agsize=100663296 blks
            =                       sectsz=512   attr=2,projid32bit=0
   data     =                       bsize=4096   blocks=402653184,imaxpct=5
            =                       sunit=0      swidth=0 blks
   naming   =version 2              bsize=4096   ascii-ci=0
   log      =internal log           bsize=4096   blocks=196608,version=2
            =                       sectsz=512   sunit=0 blks,lazy-count=1
   realtime =none                   extsz=4096   blocks=0,
   rtextents=0

All good.