First off, I hope I'm posting to the right place... I was going to post in Kernel & Hardware (maybe), but it seems like most dm-crypt questions end up here.
I had to re-partition my drive after using arch for a while and for an extra degree of difficulty I decided to try out full disk encryption.
I walked through the wiki on encrypting the entire system using dm-crypt and LUKS and everything worked fine.
Until recently everything was good, then I loaded up some software (docker) that uses some sort of device mapper voodoo and it created a huge pool out of my entire disk. I immediately killed it, uninstalled, and now I'm trying to fix the issue with the developers, but now when I boot my dm-crypt root is really small and 100% full. Every time I try to write to the drive it complains about the disk being full. (ie "write error: No space left on device")
My dm-crypt mapping (/dev/mapper/root) is suddenly very small and 100% full. It doesn't map to the full size of the encrypted partition it's supposedly mapped to (/dev/sda6).
# fdisk -l Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors ... Device Start End Size Type ... /dev/sda5 313672936 313935079 128M Linux filesystem /dev/sda6 313935080 625142414 148.4G Linux filesystem Disk /dev/mapper/root: 148.4 GiB, 159336058368 bytes, 311203239 sectors ... # df -h /dev/mapper/root 9.8G 9.4G 0 100% / dev 3.8G 0 3.8G 0% /dev run 3.8G 656K 3.8G 1% /run tmpfs 3.8G 456K 3.8G 1% /dev/shm tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup tmpfs 3.8G 136K 3.8G 1% /tmp /dev/sda5 120M 29M 83M 26% /boot tmpfs 774M 4.0K 774M 1% /run/user/1000 # dmsetup info root Name: root State: ACTIVE Read Ahead: 256 Tables present: LIVE Open count: 1 Event number: 0 Major, minor: 254, 0 Number of targets: 1 UUID: CRYPT-LUKS1-<hex garbage>-root #cat /etc/fstab ... # UUID=<UUID that isn't anywhere else> /dev/mapper/root / ext4 rw,relatime,data=ordered0 1 # UUID=<another UUID that isn't anywhere else> /dev/sda5 /boot ext4 rw,relatime,data=ordered0 2 #cat /etc/default/grub ... GRUB_CMDLINE_LINUX_DEFAULT="quiet rootflag=data=writeback cryptdevice=/dev/sda6:root ... #cat /etc/mkinitcpio.conf ... HOOKS="base udev autodetect modconf block encrypt filesystems keyboard fsck" ...
Searching (both here and Google). I haven't found much, maybe you have some magic keywords.
Checking my disk health with S.M.A.R.T tools
Anybody know how I can persuade device mapper that the root mapping should be bigger?
Am I totally missing something crucial in my setup?
Am I making some noob mistake?
Thanks in advance!
Last edited by andrewclarkson (2014-04-19 01:29:13)
I ran through a bunch of device mapper articles and troubleshooting. It seems that the mapped disk was resized for whatever reason (docker).
Apparently, you can resize it back to the full partition size (while mounted and active) like so:
# resize2fs <mapped dev path>
Just for clarity, apparently this requires a kernel of 2.6 or newer that supports "on-line resizing"
I figured I should share my solution; I ended up finding my original post while searching for solutions. Ha!