LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-17-2020, 09:56 PM   #1
flamery
LQ Newbie
 
Registered: Jun 2020
Posts: 2

Rep: Reputation: Disabled
LVM drive stretch


Hi friends,

made a bit of a stupid mistake when stretching a disk, I added 550Gb to the existing disk in vmware, created a partition in fdisk, created a pv, stretched the group onto that pv, then stretched the lv to 100%.

after doing all this I realised the partition I had created was only 15Gb (I used fdisk default values I didn't check thoroughly!!). I went back into fdisk, deleted the partition, created a new partition with the same starting point and full size this time and rebooted.



Now the problem is, it seems like the change I make in fdisk is not actually taking effect, for example, after reboot fdisk sees the correct partition size, but parted does not (still shows the partition as 15gb and 500gb of free space. This has prevented me from doing a pvresize, it still thinks the disk is only 15g. Any ideas what else I could do to try and claim this space? I wanted to just delete the pv and start over but I cant do a pvmove because there is no free space to move the new pv off to and because the disk is so full its starting consuming space on this pv aswell.



some outputs:
pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg_one lvm2 a-- 15.42g 0
/dev/sda3 vg_one lvm2 a-- 1.00t 0


fdisk -l

Disk /dev/sda: 1664.3 GB
Device Boot Start End Blocks Id System
/dev/sda1 1 2202009599 1101004769+ ee GPT
/dev/sda2 2202009600 3040870389 419430300 ee GPT


pvmove /dev/sda2
No extents available for allocation



pvdisplay /dev/sda2
--- Physical volume ---
PV Name /dev/sda2
VG Name vg_one
PV Size 15.65 GiB / not usable 24.78 MiB
Allocatable yes (but full)
PE Size 32.00 MiB
Total PE 500
Free PE 0
Allocated PE 500



pvresize /dev/sda2
Physical volume "/dev/sda2" changed
1 physical volume(s) resized / 0 physical volume(s) not resized



vgs
VG #PV #LV #SN Attr VSize VFree
vg_one 2 2 0 wz--n- 1.00t 0
 
Old 06-17-2020, 11:43 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
/dev/sda3 doesn't exist, yet LVM thinks it does. I'd say pvremove sda3 and restart from scratch.
 
Old 06-18-2020, 12:53 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,154

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
And you need to come up with better subject - I thought this was a Debian problem
 
1 members found this post helpful.
Old 06-18-2020, 03:30 AM   #4
flamery
LQ Newbie
 
Registered: Jun 2020
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
/dev/sda3 doesn't exist, yet LVM thinks it does. I'd say pvremove sda3 and restart from scratch.
Yes that is strange, do you think that would cause data loss? Sda3 (which is really sda1) has 1tb space and its file system is 90% full with files and is also the root partition.
 
Old 06-18-2020, 06:01 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by flamery View Post
Sda3 (which is really sda1)
What do you mean by that? Partition 3 is sda3, partition 1 is sda1. How can they be identical?
If sda3 exists, why is it not listed?

I'd like to see the output of a few other commands:
Code:
lsblk /dev/sda
sudo parted /dev/sda print
sudo blkid
 
  


Reply



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
Advice on re-partitioning default Debian 9 stretch to support LVM postcd Linux - General 6 07-08-2017 06:34 AM
Possible to change non-LVM to LVM? darthfoolish Linux - Software 2 08-01-2008 03:47 AM
LXer: Managing LVM with the LVM Manager LXer Syndicated Linux News 0 03-16-2008 11:10 AM
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM
To LVM or not to LVM? illtbagu Linux - Software 3 12-29-2003 04:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:36 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