--
Jonathan Wiebe

Our passions are there to drive us to act, not to be the seasoning of our 
emotional stew.

Sent with Proton Mail secure email.

On Sunday, October 27th, 2024 at 11:29, Geert Stappers <stapp...@stappers.nl> 
wrote:

> On Sun, Oct 27, 2024 at 06:11:45PM +0000, Jonathan Wiebe wrote:
> 

> > On Sunday, October 27th, 2024 at 02:28, Geert Stappers wrote:
> > 

> > > On Sun, Oct 27, 2024 at 05:04:19AM +0000, Jonathan Wiebe wrote:
> > > 

> > > > I ran into an issue with my root partition being too small. My plan
> > > > was to reduce the size of my home partition and increase the size of
> > > > my root partition. Here is what I have done:
> > > > 

> > > > First, I rebooted in single user mode.
> > > > Then I did the following:
> > > > # mount / -rw -o remount
> > > 

> > > I understand the '-o remount', not the '-rw'.
> > > And I think "that command might be the culprit"
> > > 

> > > > # amount /home
> > > 

> > > Assuming an ugly typo.
> > > 

> > > > umount: /home: not mounted.
> > > 

> > > I think: That is strange.
> > > And wonder: Why was /home not mounted?
> > > 

> > > > # fsck -f /dev/mapper/debian --vg-home
> > > > fsck from util-linux 2.38.1
> > > > e2fsck 1.47.0 (5-Feb-2023)
> > > > Pass 1: Checking inodes, blocks, and sizes
> > > > Inode 8803015 extent tree (at level 1) could be shorter. Optimize<y>? 
> > > > yes
> > > > Inode 8919578 extent tree (at level 1) could be shorter. Optimize<y>? 
> > > > yes
> > > > Inode 9328852 extent tree (at level 1) could be shorter. Optimize<y>? 
> > > > yes
> > > > Inode 11273442 extent tree (at level 1) could be shorter. Optimize<y>? 
> > > > yes
> > > > Pass 1E: Optimizing extent trees
> > > > Pass 2: Checking directory structure
> > > > Pass 3: Checking directory connectivity
> > > > Pass 4: Checking reference counts
> > > > Pass 5: Checking group summary information
> > > > 

> > > > /dev/mapper/debian--vg-home: ***** FILE SYSTEM WAS MODIFIED *****
> > > > /dev/mapper/debian--vg-home: 329100/29302784 files (1.8% 
> > > > non-contiguous), 12560416/117196800 blocks
> > > 

> > > Acknowledge on "/home had some burses"
> > > 

> > > > # fsck -f /dev/mapper/debian--vg-home
> > > > fsck from util-linux 2.38.1
> > > > e2fsck 1.47.0 (5-Feb-2023)
> > > > Pass 1: Checking inodes, blocks, and sizes
> > > > Pass 2: Checking directory structure
> > > > Pass 3: Checking directory connectivity
> > > > Pass 4: Checking reference counts
> > > > Pass 5: Checking group summary information
> > > > /dev/mapper/debian--vg-home: 329100/29302784 files (1.8% 
> > > > non-contiguous), 12560416/117196800 blocks
> > > 

> > > Acknowledge on "fsck is happy"
> > > 

> > > > # resize2fs /dev/mapper/debian--vg-home 400G
> > > > resize2fs 1.47.0 (5-Feb-2023)
> > > > Resizing the filesystem on /dev/mapper/debian--vg-home to 104857600 
> > > > (4k) blocks.
> > > > The filesystem on /dev/mapper/debian--vg-home is now 104857600 (4k) 
> > > > blocks long.
> > > 

> > > Assuming something as "home was and is 400G"
> > > 

> > > > # lvreduce -L -39G /dev/mapper/debian--vg-home
> > > > WARNING: Reducing active logical volume to 408.07 GiB.
> > > > THIS MAY DESTROY YOUR DATA (filesystem etc.)
> > > > Do you really want to reduce debian--vg/home? [y/n]: y
> > > > Size of logical volume debian--vg/home changed from 447.07 GiB (114450 
> > > > extents) to 408.07 GiB (104466 extents).
> > > > Logical volume debian--vg/home successfully resized.
> > > 

> > > Acknowledge
> > > NOTE: Only the logical volume was resized. [1]
> > > 

> > > > This is where I am stalled. The prompt has not come back and I have
> > > > been waiting about 10.5 hours. Is it normal for this to take this
> > > > long? Should I just be patient? Or has something gone wrong? I am not
> > > > sure what to do at this point.
> > > 

> > > Think "have shot my self in the foot", "learnt much today".
> > > 

> > > Even on slow hardware is ten hour response time an indicator for
> > > "something is wrong".
> > > 

> > > My guess is root filesystem mounted readonly being the culprit.
> > > 

> > > > Thanks in advance for your assistance.
> > > 

> > > Oh, that is cheap. I do read it as:
> > > 

> > > You must spend time on my problem and report back to me!
> > > Do not expect any follow-up from me, I have already said "Thanks"!!!
> > > 

> > > Input for follow-up:
> > > * Powercycle the system.
> > > * Continue with reaching the intended goal
> > > * complete resizing of /home [1]
> > > * resize / [1]
> > > 

> > > > Jonathan
> > > 

> > > Groeten
> > > Geert Stappers
> > > 

> > > [1] Be aware of the command `resize2fs` and the flag `--resizefs` for
> > > the command `lvresize`.
> > 

> > Thank-you for your help Geert.
> > 

> > After a power cycle the system came back up normally
> 

> 

> OK, nice.
> 

> > and I was able to continue.
> 

> 

> And which notes will be shared with this mailinglist?
> 

> 

> 

> 

> Groeten
> Geert Stappers
> 

> > As to your last comment, I am sorry that you took it that way. :)
> > 

> > I think we have a cultural translation issue. Here in Canada we often
> > thank people in advance without any expectations.
> > 

> > Then we follow up.
> 

> 

> Just do it
> 

> 

> --
> Silence is hard to parse

After the reboot I continued with:

# resize2fs /dev/mapper/debian--vg-home
# lvextend -L +20G /dev/mapper/debian--vg-root

(Saving some free space for future use.)

At this point I rebooted and forced a fsck on the root partition by appending 
fsck.mode=force to the grub boot line starting with linux...

After a successful fsck:

# resize2fs /dev/mapper/debian--vg-root

And finally rebooted the system and checked that all partitions were the 
expected sizes.

Thanks all for your help!

Attachment: publickey - jonathan.b.wiebe@proton.me - 0x835A0CE0.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to