ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Unsolved Question about fdisk

    IT Discussion
    centos 7 fdisk partition
    6
    19
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch @1337
      last edited by JaredBusch

      @Pete-S said in Question about fdisk:

      @JaredBusch said in Question about fdisk:

      @Pete-S said in Question about fdisk:

      You're running a virtual disk under Hyper-V so physical sectors has no bearing at all.

      Of course they matter, because the guest OS doesn't know or care that it is virtual.

      Oh, so you thought partition alignment is about the OS?

      Where did I say that? Are you implying I thought it mattered to the guest OS, because I used that term? This entire post is about fdisk and fdisk runs inside the CentOS 7 operation system in this case. That version of fdisk complains about the partition alignment as soon as you run it. It also refuses to allow you to specify sector 1 if you want to resize the partition. Thus within the OS that I am able to manage the partition from, I am unable to use fdisk as needed.

      Partition alignment is only about optimizing the performance of the storage subsystem.

      I know what partition alignment is actually about.

      I know you seem all hot and bothered to prove me wrong about something but give it up.

      1 1 Reply Last reply Reply Quote 0
      • 1
        1337 @JaredBusch
        last edited by

        @JaredBusch said in Question about fdisk:

        I know you seem all hot and bothered to prove me wrong about something but give it up.

        No, not at all. I was just trying to add some context to why partition alignment makes no practical difference in this and many other cases and that warnings can be disregarded.

        I would consider it a bug that fdisk couldn't resize your partition the way it was setup.

        1 Reply Last reply Reply Quote 0
        • travisdh1T
          travisdh1
          last edited by

          So raw partitions with no LVM? Sad geek.

          Is parted available in CentOS7? It's been so long I forget, but parted tends to act better if you are able to use it.

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @travisdh1
            last edited by

            @travisdh1 said in Question about fdisk:

            So raw partitions with no LVM? Sad geek.

            Is parted available in CentOS7? It's been so long I forget, but parted tends to act better if you are able to use it.

            If I remember correctly, it is.

            JaredBuschJ 1 Reply Last reply Reply Quote 0
            • JaredBuschJ
              JaredBusch @scottalanmiller
              last edited by JaredBusch

              @scottalanmiller said in Question about fdisk:

              @travisdh1 said in Question about fdisk:

              So raw partitions with no LVM? Sad geek.

              Is parted available in CentOS7? It's been so long I forget, but parted tends to act better if you are able to use it.

              If I remember correctly, it is.

              Yes, by default. No idea how he went with that assumption.

              The disk is bigger.
              da88b6eb-d8a7-474e-bedf-fd7a8064cfd0-image.png

              But it is not visible yet.
              1f791d8c-81f8-4de0-98a7-2f8dffb6711e-image.png

              Normally, you simply use fdisk to delete the partition and recreate it, then LVM and such see the space. But I cannot do that because of the above.

              travisdh1T 1 Reply Last reply Reply Quote 0
              • travisdh1T
                travisdh1 @JaredBusch
                last edited by

                @JaredBusch said in Question about fdisk:

                @scottalanmiller said in Question about fdisk:

                @travisdh1 said in Question about fdisk:

                So raw partitions with no LVM? Sad geek.

                Is parted available in CentOS7? It's been so long I forget, but parted tends to act better if you are able to use it.

                If I remember correctly, it is.

                Yes, by default. No idea how he went with that assumption.

                The disk is bigger.
                da88b6eb-d8a7-474e-bedf-fd7a8064cfd0-image.png

                But it is not visible yet.
                1f791d8c-81f8-4de0-98a7-2f8dffb6711e-image.png

                Normally, you simply use fdisk to delete the partition and recreate it, then LVM and such see the space. But I cannot do that because of the above.

                That would not be normal at all when using LVM. fdisk/parted shouldn't need to be used.

                pvresize /dev/pathtopv
                lvextend -r -l +95%FREE /dev/pathtolv (pick you're preferred percentage, I like to leave room for temporary snapshots)

                The final step depends on the filesystem in use.
                XFS xfs_growfs /mount/point
                EXT4 resize2fs /mount/point

                The deleting and recreating the partition bit is only needed when directly on the physical hardware. Since you resized the virtual partition, just skip that.

                JaredBuschJ 1 Reply Last reply Reply Quote 0
                • JaredBuschJ
                  JaredBusch @travisdh1
                  last edited by

                  @travisdh1 said in Question about fdisk:

                  pvresize /dev/pathtopv

                  712ffaf2-0924-497f-be84-87d24fa9d5a5-image.png

                  travisdh1T 1 Reply Last reply Reply Quote 0
                  • travisdh1T
                    travisdh1 @JaredBusch
                    last edited by

                    @JaredBusch said in Question about fdisk:

                    @travisdh1 said in Question about fdisk:

                    pvresize /dev/pathtopv

                    712ffaf2-0924-497f-be84-87d24fa9d5a5-image.png

                    Looks like I was forgetting a few steps. Try https://samsig.dk/extending-gpt-lvm-disk-on-centos/ (It doesn't have you delete/create the partition).

                    JaredBuschJ 1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch @travisdh1
                      last edited by JaredBusch

                      @travisdh1 said in Question about fdisk:

                      (It doesn't have you delete/create the partition).

                      No, but it tells you to use tools to deal with the "physical" partition same as simply using fdisk to delete and create. Speficially parted or gdisk, and those tools don't like what they see either.

                      1 Reply Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch
                        last edited by JaredBusch

                        As an update to this, the issue is not resolved, but I purged a couple old nextcloud user accounts, that once deleted, and got enough space to get the needed users fully sync'd again.

                        I'll be spinning up a new Nextcloud instance and simply manually migrating users to it I think.

                        1 Reply Last reply Reply Quote 2
                        • 1 / 1
                        • First post
                          Last post