[GLLUG] Partition Resizing

bfdamkoehler bfdamkoehler at sbcglobal.net
Wed Jan 6 19:34:50 EST 2016


Were you always tight on space or is this something that has gotten 
worse over time?

You might want to search for huge files and see if something is eating 
up your space.

If you are running a Red Hat operating system its abrtd collects data 
about executables that crash in the directory /var/spool/abrt. Those can 
be removed without harm.

If you are running a Debian system like raspbian it saves a copy of each 
package that you install in /var/cache/apt.

If you have lots of stuff in /var/log the log file rotation process may 
be leaving more than you have space for.

You can move stuff like /usr/share/doc into a new partition and symlink 
/usr/share/doc to the new partition. The system will run without this, 
even if it gets lost somehow.

I do think that to resize an ext4 filesystem it has to be unmounted. 
Since you can't umount / and keep running, this means that you would 
have to boot from another device to do this.

These are just some thoughts.




On 01/06/2016 02:31 PM, David L Lambert wrote:
> Yes, I've used resize2fs to expand a filesystem, and yes, it did leave 
> the filesystem still usable, with all files and directories still 
> there.  I've usually done it with a filesystem that was already on top 
> of LVM, but if you use some other tool to expand the partition it sees 
> the expanded partition and expands the filesystem to fit. I have done 
> that as well.
>
> The tricky part about what you're proposing to do is expanding the 
> partition without losing the exact beginning-point. The "fdisk" tool 
> forces you to delete than then recreate a partition, but gparted has a 
> "grow" operation (and, as I recall, can even "move" a partion to 
> another overlapping spot on the disk).
>
> On 01/06/2016 01:33 PM, Chick Tower wrote:
>> The ext4 root (/, not user) partition of my PC is 94% full, so I want 
>> to add space to it.  I don't have LVM running, so that's not a 
>> solution.  I could back-up that partition, destroy it, re-create it 
>> in a larger size, format it, and restore the data, but I'd rather try 
>> to leave the data intact, back it up, and just expand the partition 
>> and then the filesystem.  Has anyone ever used resize2fs to expand 
>> the filesystem? If so, did it leave the data intact?
>>
>> I also know I could create new partitions for /var, and maybe other 
>> parts of the installation.  /home is already on a separate partition. 
>> It also appears that parted/gparted can do what I want, so I'm going 
>> to check that out.  Are there any other solutions I'm missing?
>
>



More information about the linux-user mailing list