grow fs on dd'ed file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

I guess this question has been discussed earlier, and is probably well
documented somewhere, but I somehow can't find a saticfying answer.

What I have is a laptop running debian. I've dd'ed up a 30GB file from
urandom and added dmcrypt/luks ontop of it & mounted it through the
loopback and a plain reiserfs, no lvm or so. 
This is my homedirectory, and it gets mounted whenever I logon/logoff, PAM.

And now to the problem.
30 GB aint enuff, I have more diskspace available (20GB) in the rootfs,
which I would like to allocate to the encrypted file.

What I THINK I should do is to simply dd up (with >>) 10 more GB to the
already existing file, use cryptsetup resize (lacking syntax atm) to
expand the crypto over the new 10GB aswell, and finally let the reiserfs
grow over the remaining GB's.

Problem is that I do not have 30GB's free to play with, so I can't do a
simple backup of the file. I dont have another *nix host around with
30GBs free space either, so I cant do ne fancy netcat or similar either.
simply, It has to work at the first try.


So, can anyone provide me with more info? will my dd >> cryptofile,
cryptsetup resize, and reiserfs grow expand my cryptofs in the way I
want? or will it somehow fiddle with something so I either loose the
10GB's added or even worse loose the content of the existing cryptofile?
Any tips would be appreciated.


ps, 
bonus quiz 1) Does my cryptofile contain everything I need? ie all keys
etc? so if I had a backup on another host, I'd be able to remount it
with my existing keys?

bonus quiz 2) a lil curious, If I would dd up space, forget the
cryptosetup resize part, and resize my reiserfs. Wat would happend?
Would 1/4th (10 of total 40GB) of my data reside on unencrypted storage?
ds.


Thanks,
Jesse.



---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux