What is the proper way to shrink a LVM partition?

1,814

I'm not sure if you're just trying to learn using these tools or are trying to get something done, in either case I think I'd encourage you to use gparted instead of doing it using the straight commands in this manner.

Use GParted to resize the LVM physical volume. GParted won't let you shrink the LVM physical volume to a size smaller than what the unallocated space allows.

References

Share:
1,814

Related videos on Youtube

LosManos
Author by

LosManos

Updated on September 18, 2022

Comments

  • LosManos
    LosManos almost 2 years

    I just can't get an object out of Neo4j through Neo4jClient and Cypher.

    var client = new GraphClient(new Uri("http://mymachine:7474/db/data"));
    client.Connect();
    var myList = client.RootNode.StartCypher("root")
        .Match("root-[:RELATED_TO]->(user)")
        .Return<User>("user").Results;
    

    I get a User object in myList[0] alright but its properties are empty.

    I get the same (object with empty properties) through

    client.ExecuteGetCypherResults<User>(
        new CypherQuery("start n=node(1) return n;",null, CypherResultMode.Set)
    );
    

    What obvious thing have I overlooked?

    (Neo4j 1.8 MS5, Neo4jClient 1.0.0.388)

    /Neo4jClient/Neo4j noob.

    • slm
      slm over 10 years
    • Question Overflow
      Question Overflow over 10 years
      @slm, I am referring to the physical partition, not logical volume.
    • slm
      slm over 10 years
      They're called VG & LV. Volume Group and Logical Volumes.
    • Question Overflow
      Question Overflow over 10 years
      @slm, I am referring to shrinking a partition such as /dev/sda3 containing the VG and LVs.
    • slm
      slm over 10 years
      I believe to reduce the VG so you can eventually shrink the partition they're on using fdisk you'd need to follow this: unix.stackexchange.com/questions/67702/…
    • slm
      slm over 10 years
      Are you just trying to learn using these tools or are you trying to get something done? I think I'd encourage you to use gparted instead of doing it in this manner.
    • 41754
      41754 over 10 years
      But obviously to use gparted or, if available, partitionmanager, only after reducing the VG, right?
    • Question Overflow
      Question Overflow over 10 years
      @slm, thanks for the link, pvresize is what I am looking for.
  • LosManos
    LosManos almost 11 years
    Googling the same question a year later I found another Culprit. The fields of the User class must be public. Internal is not enough.
  • Tatham Oddie
    Tatham Oddie over 10 years
    Instead of using Return<Node<User>>, then throwing it away with the Select call, just use Return<User>.
  • Jaeda
    Jaeda about 6 years
    Gparted doesn't support LVM2 as stated here and on my personal experience. It even doesn't show used space on LVM partition properly.
  • Gaia
    Gaia about 6 years
    according to this Gparted does support most operations on LVM2: gparted.org/features.php
  • slm
    slm about 6 years
    Yeah I'm not sure why that comment was left. LVM 1/2 is supported.
  • Admin
    Admin about 2 years
    "9.5. Using the LVM utility system-config-lvm" link is down.
  • Admin
    Admin about 2 years
    @Scorpion - ty fixed