`growpart` failed on Debian











up vote
0
down vote

favorite












I am running Debian 8.7 on Google Cloud. The instance had a disk of size 50G, and I increased its size to 100G, as shown in the lsblk output below:



NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
`-sda1 8:1 0 50G 0 part /


I then tried to increase the size of sda1 using



sudo growpart /dev/sda 1


, but got the following error:



failed [sfd_list:1] sfdisk --list --unit=S /dev/sda
FAILED: failed: sfdisk --list /dev/sda


It didn't tell me the specific reason for the failure. I googled around and couldn't find anyone who got this issue.



I followed the gcloud documentation and cannot figure out where the problem is.










share|improve this question




















  • 1




    I wrote an article about this for Debian 9. I am not sure if Debian 8.7 has the same commands: jhanley.com/google-cloud-debian-9-resize-root-file-system
    – John Hanley
    Nov 22 at 7:17










  • @JohnHanley Thank you! I didn't know gcloud would automatically resize the file system. Everything's fine now after restarting the instance.
    – Alex Ling
    Nov 22 at 10:55










  • I added an answer based upon this.
    – John Hanley
    Nov 22 at 18:09















up vote
0
down vote

favorite












I am running Debian 8.7 on Google Cloud. The instance had a disk of size 50G, and I increased its size to 100G, as shown in the lsblk output below:



NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
`-sda1 8:1 0 50G 0 part /


I then tried to increase the size of sda1 using



sudo growpart /dev/sda 1


, but got the following error:



failed [sfd_list:1] sfdisk --list --unit=S /dev/sda
FAILED: failed: sfdisk --list /dev/sda


It didn't tell me the specific reason for the failure. I googled around and couldn't find anyone who got this issue.



I followed the gcloud documentation and cannot figure out where the problem is.










share|improve this question




















  • 1




    I wrote an article about this for Debian 9. I am not sure if Debian 8.7 has the same commands: jhanley.com/google-cloud-debian-9-resize-root-file-system
    – John Hanley
    Nov 22 at 7:17










  • @JohnHanley Thank you! I didn't know gcloud would automatically resize the file system. Everything's fine now after restarting the instance.
    – Alex Ling
    Nov 22 at 10:55










  • I added an answer based upon this.
    – John Hanley
    Nov 22 at 18:09













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am running Debian 8.7 on Google Cloud. The instance had a disk of size 50G, and I increased its size to 100G, as shown in the lsblk output below:



NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
`-sda1 8:1 0 50G 0 part /


I then tried to increase the size of sda1 using



sudo growpart /dev/sda 1


, but got the following error:



failed [sfd_list:1] sfdisk --list --unit=S /dev/sda
FAILED: failed: sfdisk --list /dev/sda


It didn't tell me the specific reason for the failure. I googled around and couldn't find anyone who got this issue.



I followed the gcloud documentation and cannot figure out where the problem is.










share|improve this question















I am running Debian 8.7 on Google Cloud. The instance had a disk of size 50G, and I increased its size to 100G, as shown in the lsblk output below:



NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
`-sda1 8:1 0 50G 0 part /


I then tried to increase the size of sda1 using



sudo growpart /dev/sda 1


, but got the following error:



failed [sfd_list:1] sfdisk --list --unit=S /dev/sda
FAILED: failed: sfdisk --list /dev/sda


It didn't tell me the specific reason for the failure. I googled around and couldn't find anyone who got this issue.



I followed the gcloud documentation and cannot figure out where the problem is.







google-cloud-platform debian google-compute-engine






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 at 19:27









Maxim

76219




76219










asked Nov 22 at 6:24









Alex Ling

729731




729731








  • 1




    I wrote an article about this for Debian 9. I am not sure if Debian 8.7 has the same commands: jhanley.com/google-cloud-debian-9-resize-root-file-system
    – John Hanley
    Nov 22 at 7:17










  • @JohnHanley Thank you! I didn't know gcloud would automatically resize the file system. Everything's fine now after restarting the instance.
    – Alex Ling
    Nov 22 at 10:55










  • I added an answer based upon this.
    – John Hanley
    Nov 22 at 18:09














  • 1




    I wrote an article about this for Debian 9. I am not sure if Debian 8.7 has the same commands: jhanley.com/google-cloud-debian-9-resize-root-file-system
    – John Hanley
    Nov 22 at 7:17










  • @JohnHanley Thank you! I didn't know gcloud would automatically resize the file system. Everything's fine now after restarting the instance.
    – Alex Ling
    Nov 22 at 10:55










  • I added an answer based upon this.
    – John Hanley
    Nov 22 at 18:09








1




1




I wrote an article about this for Debian 9. I am not sure if Debian 8.7 has the same commands: jhanley.com/google-cloud-debian-9-resize-root-file-system
– John Hanley
Nov 22 at 7:17




I wrote an article about this for Debian 9. I am not sure if Debian 8.7 has the same commands: jhanley.com/google-cloud-debian-9-resize-root-file-system
– John Hanley
Nov 22 at 7:17












@JohnHanley Thank you! I didn't know gcloud would automatically resize the file system. Everything's fine now after restarting the instance.
– Alex Ling
Nov 22 at 10:55




@JohnHanley Thank you! I didn't know gcloud would automatically resize the file system. Everything's fine now after restarting the instance.
– Alex Ling
Nov 22 at 10:55












I added an answer based upon this.
– John Hanley
Nov 22 at 18:09




I added an answer based upon this.
– John Hanley
Nov 22 at 18:09












1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










Google Cloud images for Debian, Ubuntu, etc. have the ability to automatically resize the root file system on startup. If you resize the disk while the system is running, the next time the system is rebooted the partition and file system will be resized.



You can also resize the root file system while the system is running without rebooting.



Replace INSTANCE_NAME and ZONE in the following commands. The second command assumes that the file system is EXT4. Check for your system setup.



Resize the disk:



gcloud compute disks resize INSTANCE_NAME --zone ZONE --size 30GB --quiet


Resize the partition and file system:



gcloud compute ssh INSTANCE_NAME --zone ZONE --command "sudo expand-root.sh /dev/sda 1 ext4"


Debian 9 – Resize Root File System






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53424983%2fgrowpart-failed-on-debian%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    Google Cloud images for Debian, Ubuntu, etc. have the ability to automatically resize the root file system on startup. If you resize the disk while the system is running, the next time the system is rebooted the partition and file system will be resized.



    You can also resize the root file system while the system is running without rebooting.



    Replace INSTANCE_NAME and ZONE in the following commands. The second command assumes that the file system is EXT4. Check for your system setup.



    Resize the disk:



    gcloud compute disks resize INSTANCE_NAME --zone ZONE --size 30GB --quiet


    Resize the partition and file system:



    gcloud compute ssh INSTANCE_NAME --zone ZONE --command "sudo expand-root.sh /dev/sda 1 ext4"


    Debian 9 – Resize Root File System






    share|improve this answer

























      up vote
      2
      down vote



      accepted










      Google Cloud images for Debian, Ubuntu, etc. have the ability to automatically resize the root file system on startup. If you resize the disk while the system is running, the next time the system is rebooted the partition and file system will be resized.



      You can also resize the root file system while the system is running without rebooting.



      Replace INSTANCE_NAME and ZONE in the following commands. The second command assumes that the file system is EXT4. Check for your system setup.



      Resize the disk:



      gcloud compute disks resize INSTANCE_NAME --zone ZONE --size 30GB --quiet


      Resize the partition and file system:



      gcloud compute ssh INSTANCE_NAME --zone ZONE --command "sudo expand-root.sh /dev/sda 1 ext4"


      Debian 9 – Resize Root File System






      share|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        Google Cloud images for Debian, Ubuntu, etc. have the ability to automatically resize the root file system on startup. If you resize the disk while the system is running, the next time the system is rebooted the partition and file system will be resized.



        You can also resize the root file system while the system is running without rebooting.



        Replace INSTANCE_NAME and ZONE in the following commands. The second command assumes that the file system is EXT4. Check for your system setup.



        Resize the disk:



        gcloud compute disks resize INSTANCE_NAME --zone ZONE --size 30GB --quiet


        Resize the partition and file system:



        gcloud compute ssh INSTANCE_NAME --zone ZONE --command "sudo expand-root.sh /dev/sda 1 ext4"


        Debian 9 – Resize Root File System






        share|improve this answer












        Google Cloud images for Debian, Ubuntu, etc. have the ability to automatically resize the root file system on startup. If you resize the disk while the system is running, the next time the system is rebooted the partition and file system will be resized.



        You can also resize the root file system while the system is running without rebooting.



        Replace INSTANCE_NAME and ZONE in the following commands. The second command assumes that the file system is EXT4. Check for your system setup.



        Resize the disk:



        gcloud compute disks resize INSTANCE_NAME --zone ZONE --size 30GB --quiet


        Resize the partition and file system:



        gcloud compute ssh INSTANCE_NAME --zone ZONE --command "sudo expand-root.sh /dev/sda 1 ext4"


        Debian 9 – Resize Root File System







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 at 18:08









        John Hanley

        11.8k2527




        11.8k2527






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53424983%2fgrowpart-failed-on-debian%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

            Calculate evaluation metrics using cross_val_predict sklearn

            Insert data from modal to MySQL (multiple modal on website)