title: cryptsetup luksFormat error: Requested offset is beyond real size of device /dev/loop1
body: <p>I'm getting an error when I try to run the cryptsetup luksFormat command on Ubuntu.Can someone please help me with this issue</p>
  
  <p>Command:
        $ loop_dev= losetup --find
        $ echo YES | cryptsetup -v luksFormat --key-file="/path/to/keyfile" $loop_dev</p>
  
  <p>Error:
          Requested offset is beyond real size of device /dev/loop1.
          Command failed with code 22: Requested offset is beyond real size of device /dev/loop1</p>
  
  <p>This is happening to all the loop devices from /dev/loop0-/dev/loop7</p>