Are there size restrictions on LUKS encrypted partitions?

Discussion in 'HOWTO-Related Questions' started by TTown, Oct 26, 2007.

  1. TTown

    TTown New Member

    SOLVED --- Are there size restrictions on LUKS encrypted partitions?

    I installed an extra hdd analog to the howto "How to encrypt a diskdrive in (X)Ubuntu Feisty with dm-crypt and LUKS" on a ubuntu 6.06LTS server.
    The new HDD is 500GB size.
    I run a samba server and make it accessible over the local network. Now that I have almost 100GB transfered to it I get "no more space available" error messages. I do not enforce quotas.

    Cryptsetup status says:
    [email protected]:~$ sudo cryptsetup status lo2
    /dev/mapper/lo2 is active:
    cipher: aes-cbc-plain
    keysize: 256 bits
    device: /dev/evms/hda
    offset: 2056 sectors
    size: 234491000 sectors
    mode: read/write

    df says:
    [email protected]:~$ df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/sda1 4909772 653536 4006832 15% /
    varrun 79240 112 79128 1% /var/run
    varlock 79240 4 79236 1% /var/lock
    udev 79240 56 79184 1% /dev
    devshm 79240 0 79240 0% /dev/shm
    /dev/mapper/lo2 115404900 109542708 0 100% /home/member/kn1​
    The last line indicates that there are 100% of the space used.

    Almost all files on the drive (mapped to /home/member/kn1) are larger than 1MB. Is there a way of changing the 1K-blocks to something larger? (If that has anything to do with it...)

    It does not seem to be an inode issue:
    [email protected]:~$ df -i
    Filesystem Inodes IUsed IFree IUse% Mounted on
    /dev/sda1 624000 25641 598359 5% /
    varrun 19810 32 19778 1% /var/run
    varlock 19810 3 19807 1% /var/lock
    udev 19810 794 19016 5% /dev
    devshm 19810 1 19809 1% /dev/shm
    /dev/mapper/lo2 14663680 25106 14638574 1% /home/member/kn1​
    because here the last line indicates that only 1% of the inodes are used.

    Thank you for your sharing your ideas.


    P.s.: Some additional info (it is so hard to determine what is meaningful information when all you have very limited knowledge):
    [email protected]:~$ sudo cryptsetup luksDump /dev/hda
    LUKS header information for /dev/hda

    Version: 1
    Cipher name: aes
    Cipher mode: cbc-plain
    Hash spec: sha1
    Payload offset: 2056
    MK bits: 256
    MK digest: 3b f6 7f 0f 5a 11 10 ca 02 ad 80 4c 4b 10 52 7e 76 6a 18 7d
    MK salt: 96 9e bf 31 fc d7 c9 71 42 2c 8c 01 2a 0f 3e df
    81 29 fa 6a 8f 9f ac 1e 5f fd df 18 b6 e2 99 4b
    MK iterations: 10
    UUID: 0ba50819-c3ca-4cec-b86e-8619b3213180

    Key Slot 0: ENABLED
    Iterations: 95758
    Salt: 50 c6 6d e6 7d 1e ba ff 82 6a 41 5d ac ff c3 92
    67 12 f9 c0 6e ac 09 39 2a f5 78 1d 11 23 9d c2
    Key material offset: 8
    AF stripes: 4000
    Key Slot 1: DISABLED
    Key Slot 2: DISABLED
    Key Slot 3: DISABLED
    Key Slot 4: DISABLED
    Key Slot 5: DISABLED
    Key Slot 6: DISABLED
    Key Slot 7: DISABLED
     
    Last edited: Oct 26, 2007
  2. sjau

    sjau Local Meanie Moderator

    whats the output of:

    Code:
    sudo fdisk -l
    
    I tend to think you only assigned 100gb to that partition.
     
  3. TTown

    TTown New Member

    solved

    All my own fault.
    It is a dedicated hdd of a virtual machine. I swapped the old 110GB hdd for the new 500GB drive but didn't check VMware's Interface. The VM was still applying the old size settings. I had to remove the drive from the settings and then add the new drive. I could not simply adjust the settings.
    Your advice was right on the mark.
    Thank you.
     

Share This Page