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

    Solved Fedora Block Device Full How - Extend Partition

    IT Discussion
    fedora lvm extend partition
    7
    46
    5.1k
    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.
    • F
      Francesco Provino
      last edited by

      I see you are using LVM (that's good!), so…

      • First, create a new block device in the free space;
      • PVadd the new block device to your VG (fedora, I think);
      • lvextend your root LV;
      • xfs_growfs your root FS, and you'll be done ;).
      DustinB3403D 1 Reply Last reply Reply Quote 3
      • F
        Francesco Provino
        last edited by

        Of course, you can incrementally add multiple virtual disks to the VM, adding it as PV to your VG etc…

        1 Reply Last reply Reply Quote 0
        • DustinB3403D
          DustinB3403 @Francesco Provino
          last edited by

          @Francesco-Provino OK give me a moment, working to create the block device.

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

            @DustinB3403

            pvcreate /dev/newpartition
            vgextend fedora /dev/newpartition
            lvextend -l 100%FREE /dev/fedora/root /dev/newpartition
            

            I don't know the command to expand an ext4 file system off the top of my head 😕

            DustinB3403D F 2 Replies Last reply Reply Quote 0
            • DustinB3403D
              DustinB3403 @travisdh1
              last edited by gjacobse

              @travisdh1

              0_1484666961800_XenCenterMain_2017-01-17_10-29-14.png

              travisdh1T 1 Reply Last reply Reply Quote 0
              • stacksofplatesS
                stacksofplates
                last edited by

                Is /dev/xvda2 mounted somewhere?

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

                  @DustinB3403 If you're sure that /dev/xvda2 is not being used by something else, try the pvcreate with -ff. It should force the command to complete.

                  1 Reply Last reply Reply Quote 0
                  • F
                    Francesco Provino @travisdh1
                    last edited by

                    @travisdh1 said in Fedora Block Device Full How - Extend Partition:

                    @DustinB3403

                    pvcreate /dev/newpartition
                    vgextend fedora /dev/newpartition
                    lvextend -l 100%FREE /dev/fedora/root /dev/newpartition
                    

                    I don't know the command to expand an ext4 file system off the top of my head 😕

                    His root is XFS, so xfs_grows should do the trick.

                    1 Reply Last reply Reply Quote 0
                    • DustinB3403D
                      DustinB3403
                      last edited by

                      The system is saying that xvda2 is mounted.

                      Yet I have no idea how it's mounted.

                      stacksofplatesS F 2 Replies Last reply Reply Quote 0
                      • stacksofplatesS
                        stacksofplates @DustinB3403
                        last edited by

                        @DustinB3403 said in Fedora Block Device Full How - Extend Partition:

                        The system is saying that xvda2 is mounted.

                        Yet I have no idea how it's mounted.

                        df -h

                        DustinB3403D 1 Reply Last reply Reply Quote 0
                        • F
                          Francesco Provino @DustinB3403
                          last edited by

                          @DustinB3403 said in Fedora Block Device Full How - Extend Partition:

                          The system is saying that xvda2 is mounted.

                          Yet I have no idea how it's mounted.

                          So, just grep /etc/mtab for xvda2.

                          1 Reply Last reply Reply Quote 0
                          • DustinB3403D
                            DustinB3403 @stacksofplates
                            last edited by gjacobse

                            @stacksofplates

                            0_1484667298820_XenCenterMain_2017-01-17_10-34-47.png

                            F 1 Reply Last reply Reply Quote 0
                            • F
                              Francesco Provino @DustinB3403
                              last edited by

                              @DustinB3403 said in Fedora Block Device Full How - Extend Partition:

                              @stacksofplates 0_1484667298820_XenCenterMain_2017-01-17_10-34-47.png

                              So, I think you can safely force the pvcreate.

                              DustinB3403D 1 Reply Last reply Reply Quote 0
                              • DustinB3403D
                                DustinB3403 @Francesco Provino
                                last edited by

                                @Francesco-Provino when I try for force pvcreate using

                                pvcreate /dev/xdva2 -ff it results in

                                0_1484667384836_XenCenterMain_2017-01-17_10-36-19.png

                                1 Reply Last reply Reply Quote 0
                                • stacksofplatesS
                                  stacksofplates
                                  last edited by stacksofplates

                                  Oh, xvda2 is your root filesystem. What's the output of fdisk -l? It looks like it should be xvda3

                                  xvda1 is the boot partition.

                                  DustinB3403D 1 Reply Last reply Reply Quote 1
                                  • DustinB3403D
                                    DustinB3403 @stacksofplates
                                    last edited by

                                    @stacksofplates 0_1484667420065_XenCenterMain_2017-01-17_10-36-53.png

                                    1 Reply Last reply Reply Quote 0
                                    • stacksofplatesS
                                      stacksofplates
                                      last edited by

                                      Did you create a partition for the free space? You need to use fdisk to make a third primary partition.

                                      DustinB3403D 1 Reply Last reply Reply Quote 1
                                      • DustinB3403D
                                        DustinB3403 @stacksofplates
                                        last edited by

                                        @stacksofplates ok, following this here.

                                        1 Reply Last reply Reply Quote 0
                                        • DustinB3403D
                                          DustinB3403
                                          last edited by

                                          Dumb question, would it be easier for me to simply add a separate drive, and then extend the root drive into the new drive?

                                          F 1 Reply Last reply Reply Quote 0
                                          • F
                                            Francesco Provino @DustinB3403
                                            last edited by

                                            @DustinB3403 said in Fedora Block Device Full How - Extend Partition:

                                            Dumb question, would it be easier for me to simply add a separate drive, and then extend the root drive into the new drive?

                                            Maybe.
                                            You can skip the fdisk stuff and add a whole new block device to LVM if you add another virtual disk.

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