Hi, On Mon, Jan 22, 2024 at 10:59:55PM +0100, Miroslav Skoric wrote: > On 1/22/24 6:59 PM, to...@tuxteam.de wrote: > > On Mon, Jan 22, 2024 at 03:40:06PM +0000, Alain D D Williams wrote: > > > On Mon, Jan 22, 2024 at 10:29:55AM -0500, Stefan Monnier wrote: > > > > lvreduce --size -50G --resizefs /dev/mapper/localhost-home > > > > > > Oh, even better. It is a long time since I looked at than man page. > > > > > > Does this still need to be done with the file system unmounted or can it > > > be > > > done with an active file system these days ? > > > > You have first to shrink the file system (if it's ext4, you can use > > resize2fs: note that you can only *grow* an ext4 which is mounted > > (called "online resizing) -- to *shrink* it, it has to be unmounted. > > > > I will check it again but I think that file systems in that LVM are ext3. So > it requires all of them to be unmounted prior to resizing ?
ext filesystems do need to be unmounted when shrinking them (they can grow online, though). When you use the --resizefs (-r) option, LVM asks you if you wish to unmount. Obviously you cannot do that on a fiulesystme which is in use, which means you'll need a live or rescue environment to do it for the root filesystem. I'd shrink what else I could and then see where I am at. It's okay to do them one at a time. LVM will just not do it if there's a problem. Another thing I sometimes do in these situations is make a new LV and move some of the things in / out into it where possible, to free up some more space on /. Thanks, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting