Increase/Expand xfs partition in CentOS 7 (not using LVM)?

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











up vote
0
down vote

favorite












I'm trying to increase the system partition size of my CentOS 7 in vmware machine following the tutorial https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/



But there is a difference with my output of fdisk -l that I dare not to implement the procedure in the tutorial:



Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00070da2

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 38914047 19456000 83 Linux
/dev/sda2 38914048 41924607 1505280 82 Linux swap / Solaris


As you can see, there isn't a LVM mark followed my partition, does that mean I have no need to follow the tutorial in question which is written for LVM partitions? Can I simply use xfs_growfs /dev/sda1 as this tutorial says?



By the way, I have increased the size of the underlying storage already.







share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm trying to increase the system partition size of my CentOS 7 in vmware machine following the tutorial https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/



    But there is a difference with my output of fdisk -l that I dare not to implement the procedure in the tutorial:



    Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0x00070da2

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 38914047 19456000 83 Linux
    /dev/sda2 38914048 41924607 1505280 82 Linux swap / Solaris


    As you can see, there isn't a LVM mark followed my partition, does that mean I have no need to follow the tutorial in question which is written for LVM partitions? Can I simply use xfs_growfs /dev/sda1 as this tutorial says?



    By the way, I have increased the size of the underlying storage already.







    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to increase the system partition size of my CentOS 7 in vmware machine following the tutorial https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/



      But there is a difference with my output of fdisk -l that I dare not to implement the procedure in the tutorial:



      Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk label type: dos
      Disk identifier: 0x00070da2

      Device Boot Start End Blocks Id System
      /dev/sda1 * 2048 38914047 19456000 83 Linux
      /dev/sda2 38914048 41924607 1505280 82 Linux swap / Solaris


      As you can see, there isn't a LVM mark followed my partition, does that mean I have no need to follow the tutorial in question which is written for LVM partitions? Can I simply use xfs_growfs /dev/sda1 as this tutorial says?



      By the way, I have increased the size of the underlying storage already.







      share|improve this question














      I'm trying to increase the system partition size of my CentOS 7 in vmware machine following the tutorial https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/



      But there is a difference with my output of fdisk -l that I dare not to implement the procedure in the tutorial:



      Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk label type: dos
      Disk identifier: 0x00070da2

      Device Boot Start End Blocks Id System
      /dev/sda1 * 2048 38914047 19456000 83 Linux
      /dev/sda2 38914048 41924607 1505280 82 Linux swap / Solaris


      As you can see, there isn't a LVM mark followed my partition, does that mean I have no need to follow the tutorial in question which is written for LVM partitions? Can I simply use xfs_growfs /dev/sda1 as this tutorial says?



      By the way, I have increased the size of the underlying storage already.









      share|improve this question













      share|improve this question




      share|improve this question








      edited 22 hours ago









      Rui F Ribeiro

      34.6k1269113




      34.6k1269113










      asked Apr 11 at 16:21









      Edward

      1386




      1386




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.



          You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).



          You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).



          After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.






          share|improve this answer




















          • Will my data be erased with the easier method: delete and recreate the first partition?
            – Edward
            Apr 11 at 17:12










          • No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
            – sapensadler
            Apr 11 at 17:59











          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f437074%2fincrease-expand-xfs-partition-in-centos-7-not-using-lvm%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.



          You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).



          You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).



          After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.






          share|improve this answer




















          • Will my data be erased with the easier method: delete and recreate the first partition?
            – Edward
            Apr 11 at 17:12










          • No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
            – sapensadler
            Apr 11 at 17:59















          up vote
          2
          down vote



          accepted










          You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.



          You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).



          You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).



          After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.






          share|improve this answer




















          • Will my data be erased with the easier method: delete and recreate the first partition?
            – Edward
            Apr 11 at 17:12










          • No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
            – sapensadler
            Apr 11 at 17:59













          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.



          You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).



          You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).



          After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.






          share|improve this answer












          You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.



          You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).



          You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).



          After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 11 at 17:08









          sapensadler

          48016




          48016











          • Will my data be erased with the easier method: delete and recreate the first partition?
            – Edward
            Apr 11 at 17:12










          • No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
            – sapensadler
            Apr 11 at 17:59

















          • Will my data be erased with the easier method: delete and recreate the first partition?
            – Edward
            Apr 11 at 17:12










          • No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
            – sapensadler
            Apr 11 at 17:59
















          Will my data be erased with the easier method: delete and recreate the first partition?
          – Edward
          Apr 11 at 17:12




          Will my data be erased with the easier method: delete and recreate the first partition?
          – Edward
          Apr 11 at 17:12












          No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
          – sapensadler
          Apr 11 at 17:59





          No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
          – sapensadler
          Apr 11 at 17:59













           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f437074%2fincrease-expand-xfs-partition-in-centos-7-not-using-lvm%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)