For Fedora 17 last year, though, I wanted to upgrade all my file systems from the ext3 format to ext4. It's "better". You can do it in place, but there are attributes that won't apply to any old file system entries, only to new ones (new files that get added). I could in theory have upgraded it in place, and then just copied files back and forth from another drive, but whatever. Clean start. I backed up all my personal files, and reformatted the whole disk as ext4, and moved it back.
Now, the disk setup was this.
- 0.5GB boot partition (device: /dev/sda1, mount point: /boot)
- 465GB volume group (device: /dev/sda2)
- 4GB swap partition
- 24GB ext4 root volume (mount point: /)
This is where all the system files go, like programs. - 200GB LUKS ext4 volume (mount point: /home)
This was my primary file system for personal files. It's encrypted so that if someone steals my laptop, they won't be able to read my data. :) - 237GB ext4 volume (mount point: /home2)
This was a secondary one. I wasn't sure whether the LUKS encryption on /home would slow down IO-heavy activities, like managing media files. I didn't mind having things like videos and music stored unencrypted.
Ultimately, though, I found /home2 was unnecessary. /home was adequately fast for my media. While I have a laptop, it's 7200RPM rather than 5400RPM, so that helps. Thanks to my photography habit, I found /home getting almost full, only 1GB free! I considered moving my music collection to /home2, but decided instead to try to get rid of /home2 and expand /home over that space.
I used system-config-lvm to delete /home2 and then used it to resize /home over top it. However, that alone did not resize my file system to cover it. Interestingly, gnome-disks reports the LUKS volume and ext4 file system as taking up the full space, but df reports the ext4 file system as taking up only 200GB. Uh oh.
So, I read this tutorial on Ubuntu forums about resizing encrypted file systems, and found the one step I still needed to take. Apparently, system-config-lvm won't really resize the ext4 file system, even though gnome-disks claims afterwards that it larger. So, I just ran resize2fs on it. I used mount to figure out which volume it was on (mine was /dev/mapper/luks-blah-blah-blah) and then ran resize2fs /dev/mapper/luks-blah-blah-blah, while it was even mounted (!). Hooray for live resizing. It worked well, and after a reboot still worked too.
Keine Kommentare:
Kommentar veröffentlichen