How to shrink a lvm partition?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I'm trying to shrink an lvm partition, I have already shrunk the home volume, but I still can't shrink the partition in gparted. I am getting the following error:



Archiving volume group fedora metadata (seqno 6).
WARNING: /dev/sda3: Pretending size is 517775360 not 622632960 sectors.
Resizing volume /dev/sda3 to 517775360 sectors.
Resizing physical volume /dev/sda3 from 76004 to 63204 extents.
/dev/sda3: cannot resize to 63204 extents as later ones are allocated.


pvs, vgs, lvs output:



[root@localhost-live liveuser]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 fedora lvm2 a-- 296.89g 50.00g
[root@localhost-live liveuser]# vgs
VG #PV #LV #SN Attr VSize VFree
fedora 1 3 0 wz--n- 296.89g 50.00g
[root@localhost-live liveuser]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home fedora -wi-a----- 189.14g
root fedora -wi-a----- 50.00g
swap fedora -wi-ao---- <7.75g


What am I doing wrong?










share|improve this question



















  • 1





    You have to move the offending extents, example unix.stackexchange.com/a/171472/30851 so in your case that might be pvmove --alloc=anywhere /dev/sda3:63204-76003

    – frostschutz
    Feb 4 at 22:19
















1















I'm trying to shrink an lvm partition, I have already shrunk the home volume, but I still can't shrink the partition in gparted. I am getting the following error:



Archiving volume group fedora metadata (seqno 6).
WARNING: /dev/sda3: Pretending size is 517775360 not 622632960 sectors.
Resizing volume /dev/sda3 to 517775360 sectors.
Resizing physical volume /dev/sda3 from 76004 to 63204 extents.
/dev/sda3: cannot resize to 63204 extents as later ones are allocated.


pvs, vgs, lvs output:



[root@localhost-live liveuser]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 fedora lvm2 a-- 296.89g 50.00g
[root@localhost-live liveuser]# vgs
VG #PV #LV #SN Attr VSize VFree
fedora 1 3 0 wz--n- 296.89g 50.00g
[root@localhost-live liveuser]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home fedora -wi-a----- 189.14g
root fedora -wi-a----- 50.00g
swap fedora -wi-ao---- <7.75g


What am I doing wrong?










share|improve this question



















  • 1





    You have to move the offending extents, example unix.stackexchange.com/a/171472/30851 so in your case that might be pvmove --alloc=anywhere /dev/sda3:63204-76003

    – frostschutz
    Feb 4 at 22:19














1












1








1








I'm trying to shrink an lvm partition, I have already shrunk the home volume, but I still can't shrink the partition in gparted. I am getting the following error:



Archiving volume group fedora metadata (seqno 6).
WARNING: /dev/sda3: Pretending size is 517775360 not 622632960 sectors.
Resizing volume /dev/sda3 to 517775360 sectors.
Resizing physical volume /dev/sda3 from 76004 to 63204 extents.
/dev/sda3: cannot resize to 63204 extents as later ones are allocated.


pvs, vgs, lvs output:



[root@localhost-live liveuser]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 fedora lvm2 a-- 296.89g 50.00g
[root@localhost-live liveuser]# vgs
VG #PV #LV #SN Attr VSize VFree
fedora 1 3 0 wz--n- 296.89g 50.00g
[root@localhost-live liveuser]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home fedora -wi-a----- 189.14g
root fedora -wi-a----- 50.00g
swap fedora -wi-ao---- <7.75g


What am I doing wrong?










share|improve this question
















I'm trying to shrink an lvm partition, I have already shrunk the home volume, but I still can't shrink the partition in gparted. I am getting the following error:



Archiving volume group fedora metadata (seqno 6).
WARNING: /dev/sda3: Pretending size is 517775360 not 622632960 sectors.
Resizing volume /dev/sda3 to 517775360 sectors.
Resizing physical volume /dev/sda3 from 76004 to 63204 extents.
/dev/sda3: cannot resize to 63204 extents as later ones are allocated.


pvs, vgs, lvs output:



[root@localhost-live liveuser]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 fedora lvm2 a-- 296.89g 50.00g
[root@localhost-live liveuser]# vgs
VG #PV #LV #SN Attr VSize VFree
fedora 1 3 0 wz--n- 296.89g 50.00g
[root@localhost-live liveuser]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home fedora -wi-a----- 189.14g
root fedora -wi-a----- 50.00g
swap fedora -wi-ao---- <7.75g


What am I doing wrong?







partition lvm gparted






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 4 at 22:24









frostschutz

27.2k15584




27.2k15584










asked Feb 4 at 21:56









michaelmichael

62




62







  • 1





    You have to move the offending extents, example unix.stackexchange.com/a/171472/30851 so in your case that might be pvmove --alloc=anywhere /dev/sda3:63204-76003

    – frostschutz
    Feb 4 at 22:19













  • 1





    You have to move the offending extents, example unix.stackexchange.com/a/171472/30851 so in your case that might be pvmove --alloc=anywhere /dev/sda3:63204-76003

    – frostschutz
    Feb 4 at 22:19








1




1





You have to move the offending extents, example unix.stackexchange.com/a/171472/30851 so in your case that might be pvmove --alloc=anywhere /dev/sda3:63204-76003

– frostschutz
Feb 4 at 22:19






You have to move the offending extents, example unix.stackexchange.com/a/171472/30851 so in your case that might be pvmove --alloc=anywhere /dev/sda3:63204-76003

– frostschutz
Feb 4 at 22:19











0






active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f498682%2fhow-to-shrink-a-lvm-partition%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f498682%2fhow-to-shrink-a-lvm-partition%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?