Server does not boot after lvreduce

Quick to answer questions about finding your way around LMDE as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums within the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
-jago-
Level 1
Level 1
Posts: 1
Joined: Mon Aug 08, 2022 7:59 am

Server does not boot after lvreduce

Post by -jago- »

Hi, by typing df -hT, I realized two days ago that in one of my old servers the partition /dev/mapper/vg0-root was filled-up to 100% while the corresponding home was at some 70%. The server is a i7-2600K 16GB RAM, 1TB + 2TB HDDs, with the old LMDE distro.
I deleted some files in /usr, /var, and /tmp and I got some free space in the root partition (some MB out of 40 GB). Then I was googling and I read how to increase space for the root volume and shrink it for the home.
I'm some 500 km far from that computer so I worked on-line, no backup copies... The filesystem is ext4.
OK, following a number of answers on this issue I used the following commands, in this order:

Code: Select all

# lvextend -L +5G /dev/mapper/VG0-root 
# lvreduce -L -5G /dev/mapper/VG0-home 
# resize2fs /dev/mapper/VG0-root
The size of the root was increased as I needed, as shown with df -h. Then I tried

Code: Select all

# resize2fs /dev/mapper/VG0-home
and it gave me an error, I could not shrink it. I also realyzed that I should resize the filesystem first and only then use the lvreduce command for the logical volume.

My last action (so bad in the end!) was rebooting the system... now it does not boot and the server is unreachable in remote. At present I cannot provide outputs from lvs or gvs
My next move: I'll travel tomorrow to the place where the computer is and will try to boot into it with a Linux Mint distro from an USB drive. But I do not know if just reversing the lvreduce it will work.
I very much appreciate any help someone could give me on this.
The system is critical and I do need to recover it. Yes, at these moments one realizes how bad and dangerous is not doing backups
Last edited by LockBot on Wed Feb 08, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Beginner Questions”