Re: Resizing LVM partitions

2024-01-26 Thread Miroslav Skoric
On 1/24/24 11:27 PM, Greg Wooledge wrote: On Wed, Jan 24, 2024 at 10:43:51PM +0100, Miroslav Skoric wrote: I do not have root account. Sure you do. You might not have a root *password* set. (I use sudo from my user account.) I think I already tried rescue mode in the past but was not

Re: Resizing LVM partitions

2024-01-25 Thread Stefan Monnier
BTW, instead of rescue mode, you can use the initramfs to do such things (I like to do that when I don't have a LiveUSB at hand because it lets you manipulate *all* partitions, including /). I.e. do something like: - Reboot - In Grub, edit your boot script (with `e`) to add `break=mount` to the

Re: Resizing LVM partitions

2024-01-24 Thread Greg Wooledge
On Wed, Jan 24, 2024 at 10:43:51PM +0100, Miroslav Skoric wrote: > I do not have root account. Sure you do. You might not have a root *password* set. > (I use sudo from my user account.) I think I > already tried rescue mode in the past but was not prompted for root > password. You can set a

On the deprecation of separate /usr (Was: Re: Resizing LVM partitions)

2024-01-24 Thread Andy Smith
Hello, On Wed, Jan 24, 2024 at 09:20:47AM +0700, Max Nikulin wrote: > Notice that separate /usr is not supported by latest systemd that should be > a part of the next Debian release. I don't think this is the case. What I think is not supported is a separate /usr that is not mounted by

Re: Resizing LVM partitions

2024-01-24 Thread Miroslav Skoric
On 1/24/24 3:20 AM, Max Nikulin wrote: On 24/01/2024 06:29, Miroslav Skoric wrote:  # df -h /dev/mapper/localhost-root  6.2G  4.7G  1.2G  81% / Taking into account size of kernel packages, I would allocate a few G more for the root partition. dpkg -s linux-image-6.1.0-17-amd64 | grep -i

Re: Resizing LVM partitions

2024-01-24 Thread Miroslav Skoric
On 1/24/24 12:42 AM, Greg Wooledge wrote: You'll have to unmount it, which generally means you will have to reboot in single-user mode, or from rescue media, whichever is easier. If you aren't opposed to setting a root password (some people have *weird* self-imposed restrictions, seriously),

Re: Resizing LVM partitions

2024-01-24 Thread Andy Smith
Hi, On Wed, Jan 24, 2024 at 12:29:18AM +0100, Miroslav Skoric wrote: > Dunno ... in any case, for some reason the rescue mode I went to by booting > from an old installation CD (dated back to Debian 6.0.1A Squeeze!) did not > see partitions in form of e.g. /dev/mapper/localhost-home, but rather >

Re: Resizing LVM partitions

2024-01-24 Thread Greg Wooledge
On Wed, Jan 24, 2024 at 06:45:12AM +0100, to...@tuxteam.de wrote: > On Tue, Jan 23, 2024 at 06:42:43PM -0500, Greg Wooledge wrote: > > You'll have to unmount it, which generally means you will have to reboot > > in single-user mode, or from rescue media, whichever is easier. > > If you log in as

Re: Resizing LVM partitions

2024-01-23 Thread tomas
On Tue, Jan 23, 2024 at 06:42:43PM -0500, Greg Wooledge wrote: > On Wed, Jan 24, 2024 at 12:29:18AM +0100, Miroslav Skoric wrote: > > Total PE 76249 > > Alloc PE / Size 75146 / <293.54 GiB > > Free PE / Size 1103 / <4.31 GiB > > VG UUID

Re: Resizing LVM partitions

2024-01-23 Thread Max Nikulin
On 24/01/2024 06:29, Miroslav Skoric wrote: # df -h /dev/mapper/localhost-root  6.2G  4.7G  1.2G  81% / Taking into account size of kernel packages, I would allocate a few G more for the root partition. dpkg -s linux-image-6.1.0-17-amd64 | grep -i size Installed-Size: 398452 Notice

Re: Resizing LVM partitions

2024-01-23 Thread Greg Wooledge
On Wed, Jan 24, 2024 at 12:29:18AM +0100, Miroslav Skoric wrote: > Total PE 76249 > Alloc PE / Size 75146 / <293.54 GiB > Free PE / Size 1103 / <4.31 GiB > VG UUID fbCaw1-u3SN-2HCy-w6y8-v0nK-QsFE-FETNZM > > ... seems that I still have some 4 GB of

Re: Resizing LVM partitions

2024-01-23 Thread Miroslav Skoric
On 1/23/24 7:36 AM, Andy Smith wrote: 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

Re: Resizing LVM partitions

2024-01-23 Thread Miroslav Skoric
On 1/22/24 11:21 PM, Greg Wooledge wrote: On Mon, Jan 22, 2024 at 10:41:57PM +0100, Miroslav Skoric wrote: As I need to extend & resize more than one LV in the file system (/, /usr, and /var), should they all need to be unmounted before the operation? As I remember, it is ext3 system on that

Re: Resizing LVM partitions

2024-01-23 Thread Miroslav Skoric
On 1/22/24 7:01 PM, to...@tuxteam.de wrote: Ah, forgot to say: "pvdisplay -m" will give you a "physical" map of your physical volume. So you get an idea what is where and where you find gaps. "pvdisplay -m" provided some idea that there was some free space but (if I am not wrong) not how

Re: Resizing LVM partitions

2024-01-23 Thread Miroslav Skoric
On 1/22/24 5:02 PM, Greg Wooledge wrote: On Mon, Jan 22, 2024 at 03:17:36PM +, Alain D D Williams wrote: The shrinking of /home is the hard part. You MUST first unmount /home, then resize the file system, then resize the logical volume. Before doing any of that, one should check the

Re: Resizing LVM partitions

2024-01-22 Thread Andy Smith
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 +, Alain D D Williams wrote: > > > On Mon, Jan 22, 2024 at 10:29:55AM -0500, Stefan Monnier wrote: > > > > lvreduce --size -50G --resizefs

Re: Resizing LVM partitions

2024-01-22 Thread tomas
On Mon, Jan 22, 2024 at 10:59:55PM +0100, Miroslav Skoric wrote: [...] > That last resize2fs (without params) would not work here, or at least it > would not work for my three file systems that need to be extended: / , /usr > , and /var . Maybe to extend each of them separately like this: > >

Re: Resizing LVM partitions

2024-01-22 Thread Greg Wooledge
On Mon, Jan 22, 2024 at 10:41:57PM +0100, Miroslav Skoric wrote: > As I need to extend & resize more than one LV in the file system (/, /usr, > and /var), should they all need to be unmounted before the operation? As I > remember, it is ext3 system on that comp. What?? I don't think these

Re: Resizing LVM partitions

2024-01-22 Thread Miroslav Skoric
On 1/22/24 6:59 PM, to...@tuxteam.de wrote: On Mon, Jan 22, 2024 at 03:40:06PM +, Alain D D Williams wrote: On Mon, Jan 22, 2024 at 10:29:55AM -0500, Stefan Monnier wrote: lvextend --size +1G --resizefs /dev/mapper/localhost-home Ie get lvextend to do the maths & work it out for me.

Re: Resizing LVM partitions

2024-01-22 Thread Miroslav Skoric
On 1/22/24 4:40 PM, Alain D D Williams wrote: On Mon, Jan 22, 2024 at 10:29:55AM -0500, Stefan Monnier wrote: lvextend --size +1G --resizefs /dev/mapper/localhost-home Ie get lvextend to do the maths & work it out for me. Those who are cleverer than me might be able to tell you how to get it

Re: Resizing LVM partitions

2024-01-22 Thread Miroslav Skoric
On 1/22/24 4:17 PM, Alain D D Williams wrote: On Mon, Jan 22, 2024 at 03:32:30PM +0100, sko...@uns.ac.rs wrote: I am getting the following message at any boot: "The volume "Filesystem root" has only 221.1 MB disk space remaining." df -h says: Filesystem Size Used Avail

Re: Resizing LVM partitions

2024-01-22 Thread Greg Wooledge
On Mon, Jan 22, 2024 at 07:01:13PM +0100, to...@tuxteam.de wrote: > On Mon, Jan 22, 2024 at 11:02:06AM -0500, Greg Wooledge wrote: > > On Mon, Jan 22, 2024 at 03:17:36PM +, Alain D D Williams wrote: > > > The shrinking of /home is the hard part. You MUST first unmount /home, > > > then > > >

Re: Resizing LVM partitions

2024-01-22 Thread Greg Wooledge
On Mon, Jan 22, 2024 at 01:06:16PM -0500, Gremlin wrote: > I use to use LVM and RAID but I quit using that after finding out that > partition the drive and using gparted was way more easier If you allocate all the space during installation and don't leave any to make adjustments, or to make

Re: Resizing LVM partitions

2024-01-22 Thread Gremlin
On 1/22/24 10:17, Alain D D Williams wrote: On Mon, Jan 22, 2024 at 03:32:30PM +0100, sko...@uns.ac.rs wrote: I am getting the following message at any boot: "The volume "Filesystem root" has only 221.1 MB disk space remaining." df -h says: Filesystem Size Used Avail Use%

Re: Resizing LVM partitions

2024-01-22 Thread tomas
On Mon, Jan 22, 2024 at 11:02:06AM -0500, Greg Wooledge wrote: > On Mon, Jan 22, 2024 at 03:17:36PM +, Alain D D Williams wrote: > > The shrinking of /home is the hard part. You MUST first unmount /home, then > > resize the file system, then resize the logical volume. > > Before doing any of

Re: Resizing LVM partitions

2024-01-22 Thread tomas
On Mon, Jan 22, 2024 at 03:40:06PM +, Alain D D Williams wrote: > On Mon, Jan 22, 2024 at 10:29:55AM -0500, Stefan Monnier wrote: > > > lvextend --size +1G --resizefs /dev/mapper/localhost-home > > > > > > Ie get lvextend to do the maths & work it out for me. > > > > > > Those who are cleverer

Re: Resizing LVM partitions

2024-01-22 Thread Greg Wooledge
On Mon, Jan 22, 2024 at 03:17:36PM +, Alain D D Williams wrote: > The shrinking of /home is the hard part. You MUST first unmount /home, then > resize the file system, then resize the logical volume. Before doing any of that, one should check the volume group and see if there are unallocated

Re: Resizing LVM partitions

2024-01-22 Thread Alain D D Williams
On Mon, Jan 22, 2024 at 10:29:55AM -0500, Stefan Monnier wrote: > > lvextend --size +1G --resizefs /dev/mapper/localhost-home > > > > Ie get lvextend to do the maths & work it out for me. > > > > Those who are cleverer than me might be able to tell you how to get it right > > first time! > >

Re: Resizing LVM partitions

2024-01-22 Thread Stefan Monnier
> lvextend --size +1G --resizefs /dev/mapper/localhost-home > > Ie get lvextend to do the maths & work it out for me. > > Those who are cleverer than me might be able to tell you how to get it right > first time! lvreduce --size -50G --resizefs /dev/mapper/localhost-home ? Stefan

Re: Resizing LVM partitions

2024-01-22 Thread Alain D D Williams
On Mon, Jan 22, 2024 at 03:32:30PM +0100, sko...@uns.ac.rs wrote: > I am getting the following message at any boot: > > "The volume "Filesystem root" has only 221.1 MB disk space remaining." > > df -h says: > > Filesystem Size Used Avail Use% Mounted on > udev

Resizing LVM partitions

2024-01-22 Thread skoric
I am getting the following message at any boot: "The volume "Filesystem root" has only 221.1 MB disk space remaining." df -h says: Filesystem Size Used Avail Use% Mounted on udev1.5G 0 1.5G 0% /dev tmpfs 297M 9.0M 288M