Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Which is the best way in order to resize an encrypted (ecryptfs) ext4 home partition ?

Pros nad Cons of each method are greatly appreciated.

$ fdisk -l
Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    41945714    20972826    7  HPFS/NTFS/exFAT
/dev/sda2       207007744   211206554     2099405+  82  Linux swap / Solaris
/dev/sda3        42946560    82008063    19530752   83  Linux
/dev/sda4        82008064   207007743    62499840   83  Linux
share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted
+50

Boot Ubuntu from the LiveCD (or a USB-key) and run gparted. In the top-right you can select your harddisk. When it is selected you can just right-click on the partition and chose resize.

eCryptfs encrypts single files and not the whole partition. So can safely resize the partition as you like. Remember that you should have backups of your things!

share|improve this answer
    
Are you sure? Resizing an encrypted partition is somewhat complicated. GUI tools such as Gparted see the LUKS container or crypt as unpartitioned space and thus resizing encrypted partitions must be performed entirely from the command line Source –  pl1nk Aug 9 '12 at 19:19
    
Yes, I'm sure. As I stated, ecryptfs ist not an encrypted container, but a file-based encryption. –  mniess Aug 9 '12 at 20:07
add comment

eCryptfs doesn't have on-disk partitions. To be safe, be sure that you've unmounted your eCryptfs-encrypted home directory and then follow the usual steps to resize the ext4 filesystem.

share|improve this answer
1  
Which are the "usual steps to resize the ext4 filesystem" ? –  pl1nk Jul 22 '12 at 14:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.