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 @JaredBusch
      last edited by JaredBusch

      @JaredBusch said in Question about fdisk:

      Can I safely use fdisk? I

      As expected, deleting and creating the partition again left the system dead.

      Restoring backup. Will see if that does anything with the issue of booting the VM to a DVD or not (do not expect it to).

      Then I will probably recreate the VM with a new disk and restore the files from the Veeam backup instead of restore the entire VM. Way more work than I want to do just to expand this old Nextcloud instance a little.

      Problem: the LVM is full. I want to expand the LVM, but first, the partition needs to see the new space. pretty basic.

      Once the disk is expanded, and the user's desktop nextcloud clients can get fully synchronized again, I'll be migrating the entire thing to a new VM. But I want full clean sync first.

      Additionally, because this is on CentOS 7, I cannot (easily) continue to upgrade Nextcloud. I've been meaning to deal with this side of it for a while, but it has been a low priority. I'm stuck on 20.0.14 because of MariaDB version or something.
      1ccbd121-549a-41a0-8d0a-c8b417384b1f-image.png

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

        @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? It's not. The OS doesn't care (and never has) about partition alignment - regardless if it runs in a VM or on bare metal.

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

        JaredBuschJ 1 Reply Last reply Reply Quote 1
        • 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