`growpart` failed on Debian












0















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 '18 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.

    – hklel
    Nov 22 '18 at 10:55











  • I added an answer based upon this.

    – John Hanley
    Nov 22 '18 at 18:09
















0















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 '18 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.

    – hklel
    Nov 22 '18 at 10:55











  • I added an answer based upon this.

    – John Hanley
    Nov 22 '18 at 18:09














0












0








0








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 '18 at 19:27









Maxim

1,543211




1,543211










asked Nov 22 '18 at 6:24









hklelhklel

808931




808931








  • 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 '18 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.

    – hklel
    Nov 22 '18 at 10:55











  • I added an answer based upon this.

    – John Hanley
    Nov 22 '18 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 '18 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.

    – hklel
    Nov 22 '18 at 10:55











  • I added an answer based upon this.

    – John Hanley
    Nov 22 '18 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 '18 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 '18 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.

– hklel
Nov 22 '18 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.

– hklel
Nov 22 '18 at 10:55













I added an answer based upon this.

– John Hanley
Nov 22 '18 at 18:09





I added an answer based upon this.

– John Hanley
Nov 22 '18 at 18:09












1 Answer
1






active

oldest

votes


















2














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',
    autoActivateHeartbeat: false,
    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









    2














    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




























      2














      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


























        2












        2








        2







        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 '18 at 18:08









        John HanleyJohn Hanley

        17.1k2633




        17.1k2633
































            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.




            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







            這個網誌中的熱門文章

            Xamarin.form Move up view when keyboard appear

            Post-Redirect-Get with Spring WebFlux and Thymeleaf

            Anylogic : not able to use stopDelay()