Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Resize losetup/cryptsetup container file

    Hello, I would like to resize a container file and mounted file system is mounted with losetup on /dev/loop1 and then cryptsetup luksOpen from a file. How does one do this?

  2. #2
    I have done:

    dd if=/dev/zero of=/backups/archive bs=1048576 count=22000


    cryptsetup resize /dev/mapper/archive

    and but I get:

    resize2fs /dev/mapper/archive
    resize2fs 1.41.14 (22-Dec-2010)
    The filesystem is already 5631743 blocks long. Nothing to do!

    Please help on how to resize a container created with the following:

    dd if=/dev/zero of=/backups/archive bs=1048576 count=22000
    losetup /dev/loop1 /backups/archive
    cryptsetup luksFormat /dev/loop1
    cryptsetup luksOpen /dev/loop1 archive
    mkfs.ext2 /dev/mapper/archive

  3. #3
    The above along with e2fsck before resize2fs worked. I accidently dd appeneded to a different file which is why it wasnt working. Really sad that no one bothered to help Stackoverflow and this forum are both kinda sucking

  4. $spacer_open
  5. #4
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    It looks like you're upset because we're not psychic and thus unable to figure out that what you were doing didn't work because of something you didn't tell us. I apologize for the whole forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts