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

Re: LVM partition full (was:what is /command directory?)



On Mon, 2007-08-27 at 09:02 -0700, David Brodbeck wrote:

> Shrinking a logical volume, though...that's full of pitfalls.  I've  
> gotten bitten repeatedly by the fact that resize2fs and LVM's tools  
> apparently don't do math the same way when calculating sizes,  
> especially if you use human-readable units.  I now avoid shrinking  
> logical volumes unless I have an automated tool to do it for me,  
> because I have never found a safe way to do it manually.

The way I was told to do it, and which seems to work ok:

1. Shrink the fs to significantly smaller than the final desired size
2. Shrink the LV to the desired size
3. Grow the fs to fill the LV

I guess that could be a problem if the desired size is very close to the
amount of data already in the filesystem, but other than that it seems
to work.

Richard




Reply to: