I presume PJ was just referring to the part about creating a filesystem using a file and a loopback mount - a need for encryption was not mentioned. If the requirement is really for a new physical... [by pschaff]
on 07/29/2009 – Made popular on 07/29/2009
I know I can create and use a loopback device like this:
# Create the file
truncate disk.img 2G
# Setup a loopback device
losetup /dev/loop0 disk.img
# Create a filesystem
# Mount to use
mount /dev/loop0 /mnt
# Clean up
losetup -d /dev/loop0
However in this case the disk image is fixed at 2GB. It's 2GB when it's empty, and it's 2GB when it's full.
I doubleboot Win 7 and Centos 6.6, I needed Centos because of research software. Initially, I only allocated 50 GB for the Linux LVM partition, however, I would now need more space on the linux partition, although I do use symbolic links to the ntfs partition, there is no chmod etc. One way is to resize the partitions, but I do find this risky.