LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-04-2017, 09:43 AM   #1
dj_thrive
LQ Newbie
 
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27

Rep: Reputation: Disabled
"No volume groups found" when using LVM to decrease partition size


Good morning and thanks for your time,

First time using LVM here, and am out of options other than to decrease the size of my /dev/sda4 partition and give some of the space to /dev/sda1 (this is my system partition and is completely full because the previous admin only gave it 16 GBs). I've attached a screenshot of "df -h" output for convenience.

Long story short, /dev/sda1 is full and i need to extend the partition size. /dev/sda4 is 2 TB, so I need to reduce it by 1 TB, and give 700 GB to /dev/sda1 and 200 GB to /dev/sda2 (also way too small). This drive is part of a hardware Raid (mirroring); I'm wondering if this has anything to do with my issue.

Here's what I've done so far and the error I receive:
I booted into Rescue Mode and unmounted /dev/sda4, then ran the following commands...
Code:
e2fsck -f /dev/sda4

resize2fs /dev/sda4 1000G

lvreduce -L 1050G /dev/sda4
then receive this error
Code:
Volume Group "sda4" not found
When I ran
Code:
vgdisplay
I receive this error
Code:
No volume groups found
I'm hoping I'm just typing a command wrong or forgetting a command. Thanks for any advice you can provide!
Attached Thumbnails
Click image for larger version

Name:	DRIVESPACE.jpg
Views:	123
Size:	47.0 KB
ID:	26039  
 
Old 10-04-2017, 11:32 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
/dev/sda1 and /dev/sda4 aren't part of a VG, they are stand alone partitions and not managed as part of an LVM.

You could take the system down and try with gparted to resize / move the partitions on the physical disk.

BUT TAKE A FULL BACKUP OF YOUR SYSTEM AND VERIFY YOU CAN RESTORE IT FIRST.
 
Old 10-04-2017, 02:04 PM   #3
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
As noted, /dev/sda1 and /dev/sda4 aren't using LVM. There is a traditional *nix alternative to resizing the partitions. You can directories folders from / to /state/partition1 and use symlinks or bind mounts within /.

It takes some experience and knowledge to know what things are safe to migrate off of "/", though. For example, do NOT migrate all of /usr, but /usr/share/doc is a good way to get a decent chunk of space.

But more basically, it's a little strange for "/" to be out of space. 16GB should be plenty of space. Something in particular must be consuming a lot of space. I'd migrate that off of "/".
 
Old 10-04-2017, 07:44 PM   #4
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
Quote:
Long story short, /dev/sda1 is full and I need to extend the partition size. /dev/sda4 is 2 TB, so I need to reduce it by 1 TB, and give 700 GB to /dev/sda1 and 200 GB to /dev/sda2 (also way too small).
You can't just "give 700 GB to /dev/sda1" from sda4 as they aren't contiguous. You could do this with LVM but not regular physical partitions. However considering how much space you have you could create a new future root partition of 700 GB or less such as sda5, rsync all of the contents (only 16 GB) to it, and then mount it as the new root. The old 16 GB sda1 could then be used for something else.

However as Isaac said you don't need 700 GB for a / partition. You also don't need a 200GB /var when you are only using 62% of a 3.9 GB /var. Increase it yes but not by 50X. You could re-use sda1 after its contents have been moved to the new root.

Quote:
This drive is part of a hardware Raid (mirroring); I'm wondering if this has anything to do with my issue.
If this is true 100% hardware RAID then it should be transparent to the OS.

Also as others have said sda4 is not part of LVM.
 
1 members found this post helpful.
Old 10-05-2017, 09:45 AM   #5
dj_thrive
LQ Newbie
 
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27

Original Poster
Rep: Reputation: Disabled
Thank you all, these were very helpful. I've been learning a lot about this in the last couple days.I really like the idea mentioned by "tofino_surfer"
Quote:
create a new future root partition of 700 GB or less such as sda5, rsync all of the contents (only 16 GB) to it, and then mount it as the new root. The old 16 GB sda1 could then be used for something else
...this sounds fairly simple, but I've never done anything like this on Linux? Any resources you could share that may help walk me through this?
 
Old 10-05-2017, 05:19 PM   #6
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by dj_thrive View Post
Thank you all, these were very helpful. I've been learning a lot about this in the last couple days.I really like the idea mentioned by "tofino_surfer" ...this sounds fairly simple, but I've never done anything like this on Linux? Any resources you could share that may help walk me through this?
If you don't already know how to do it, it's...not quite so simple. After copying over the OS files, you must:

1) Modify /etc/fstab - the "/" entry in particular. Specifying the device by UUID is typically the most robust option.

2) Use something like update-grub while still booted in the old system to create new boot entries to let you boot into the new install. I'm familiar with how to do this in Debian and Ubuntu based linux distributions. You have not specified what you're using.

3) Reboot and use the new boot entry to boot into your new system

4) Do some stuff to fix up /boot because it will be all messed up. Find/replace with UUIDs on /boot/grub/grub.cfg may be a crude temporary fix, or maybe something like update-grub will work.

5) Do a grub-install to install a new grub2 MBR bootloader pointed at the new partition instead of the old partition.

6) Reboot and hopefully it works...
 
Old 10-05-2017, 05:21 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Simpler still is to use a gparted liveCD to move partitions as required as suggested above. This presents a GUI picture of the disk, including unallocated space, where you can drag the partition to where it is needed to arrange free space, then enlarge others as required.
It resizes the filesystem as well as the partition once you click the "Apply changes" button. Very professional piece of work.

Edit: note I was referring to post #5 - this and the prior post crossed in flight.

Last edited by syg00; 10-05-2017 at 05:22 PM.
 
  


Reply

Tags
lvm, partition



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Mint 17 "No Volume Groups Found" at boot (Grub2 / Luks / LVM) anon209 Linux Mint 0 06-03-2015 11:46 PM
Extending a partition with LVM, "device not found" koichirose Ubuntu 10 04-07-2015 04:38 PM
Upgraded kernel, trying to update grub but getting message "No volume groups found" slacker_ Linux - Newbie 6 09-10-2013 03:55 AM
recovering from a controller upgrade - "no volume groups found" djjoshuad Linux - Enterprise 1 11-21-2008 05:58 PM
How to undo an fdisk? "No volume groups found" stickyc Linux - Newbie 2 12-03-2006 01:02 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 02:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration