I have a partition which contains MySQL data which is constantly growing. My LVM PV has precious little free space remaining and therefore I find I'm frequently adding additional space to my /var
partition using lvextend
and resize2fs
in smallish increments (250-500 MB at a time) so as not to give too much space to /var
and then be unable to allocate those PEs to other partitions should I need to later.
I'm concerned about reaching some limit or causing a problem by calling resize2fs
too often to grow this filesystem. Is there a limit to how often resize2fs
can be used to grow an Ext3 filesystem? Is it better to do one large Ext3 resize rather than many small ones? Does resizing using resize2fs
too often carry a potential for problems or data loss?
Best Answer
Beyond the wear and tear on the HDDs I can't see any reason why this would be dangerous. I've never come across a EXT3/EXT4 parameter that limits the amount of times you can do this. There isn't any counter I've seen either.
In looking through the output from
tune2fs
I see nothing that I would find alarming which would lead me to believe that performing many resizes would be harmful to the filesystem or the device, beyond the wear and tear.Example
dumpe2fs
You can also poke at the EXT3/EXT4 filesystems using
dumpe2fs
which essentially shows the same info astune2fs
. The output from that command is too much to include here, mainly because it includes information about the groups of inodes within the filesystem. But when I went through the output, again I saw no mention of any counters that were inherent within the EXT3/EXT4 filesystems.