Is a disk without being partitioned a partition by itself?












-2















From We can make a disk a PV by `pvcreate`, if and only if the disk has only one partition?




You can't make the whole disk a PV if there is at least one partition on it (because pvcreate won't let you).




When considering disks and partitions as concepts in operating systems, is it correct that a disk without being partitioned is a partition by itself?



If no, what is the difference between a disk without being partitioned and a disk with only one partition?



Can pvcreate mark a disk with only one partition as a PV?










share|improve this question


















  • 1





    Partitions exist when defined by a partition table. For this reason I wouldn't consider a disk to be a partition

    – Torin
    Feb 24 at 16:52
















-2















From We can make a disk a PV by `pvcreate`, if and only if the disk has only one partition?




You can't make the whole disk a PV if there is at least one partition on it (because pvcreate won't let you).




When considering disks and partitions as concepts in operating systems, is it correct that a disk without being partitioned is a partition by itself?



If no, what is the difference between a disk without being partitioned and a disk with only one partition?



Can pvcreate mark a disk with only one partition as a PV?










share|improve this question


















  • 1





    Partitions exist when defined by a partition table. For this reason I wouldn't consider a disk to be a partition

    – Torin
    Feb 24 at 16:52














-2












-2








-2








From We can make a disk a PV by `pvcreate`, if and only if the disk has only one partition?




You can't make the whole disk a PV if there is at least one partition on it (because pvcreate won't let you).




When considering disks and partitions as concepts in operating systems, is it correct that a disk without being partitioned is a partition by itself?



If no, what is the difference between a disk without being partitioned and a disk with only one partition?



Can pvcreate mark a disk with only one partition as a PV?










share|improve this question














From We can make a disk a PV by `pvcreate`, if and only if the disk has only one partition?




You can't make the whole disk a PV if there is at least one partition on it (because pvcreate won't let you).




When considering disks and partitions as concepts in operating systems, is it correct that a disk without being partitioned is a partition by itself?



If no, what is the difference between a disk without being partitioned and a disk with only one partition?



Can pvcreate mark a disk with only one partition as a PV?







partition lvm






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 24 at 16:41









TimTim

27.8k78265485




27.8k78265485








  • 1





    Partitions exist when defined by a partition table. For this reason I wouldn't consider a disk to be a partition

    – Torin
    Feb 24 at 16:52














  • 1





    Partitions exist when defined by a partition table. For this reason I wouldn't consider a disk to be a partition

    – Torin
    Feb 24 at 16:52








1




1





Partitions exist when defined by a partition table. For this reason I wouldn't consider a disk to be a partition

– Torin
Feb 24 at 16:52





Partitions exist when defined by a partition table. For this reason I wouldn't consider a disk to be a partition

– Torin
Feb 24 at 16:52










3 Answers
3






active

oldest

votes


















2














A disk without being partitioned is a disk with no partitions or partition table; it’s not a partition (a partition separates something into parts, even if it’s only one; a whole disk isn’t separated into parts).



A disk with one partition is a disk with a partition table of some sort (there are several partitioning schemes), with one entry in the table defining a partition.



pvcreate can create a physical volume using an entire disk or a partition. By default it will refuse to create a physical volume using an entire disk if it already contains a partition table.



(Note that pvcreate doesn’t “mark” an existing feature — disk or partition —, it creates a physical volume, which involves writing metadata.)






share|improve this answer
























  • Thanks. "By default it will refuse to create a physical volume using an entire disk if it already contains a partition table." What is non default case?

    – Tim
    Feb 24 at 18:06











  • -f or -ff IIRC.

    – Stephen Kitt
    Feb 24 at 18:56



















2














They are both block storage devices. In principle one could add a partition table to a partition, thus adding partitions to it. However Operating Systems may not recursively traverse partitions, so they may no be found, and thus may not be treated the same.



Note: Extended partitions are a partition with a partition table within.






share|improve this answer
























  • partition table is more like a simple kernel built-in device-mapper solution. Pretty old, but still in common use.

    – 炸鱼薯条德里克
    Feb 25 at 1:06











  • @炸鱼薯条德里克 "partition table is more like a simple kernel built-in device-mapper solution." Is a partition table a mapping from what to what? Is LVM's device-mapper solution a mapping from what to what?

    – Tim
    Feb 26 at 4:28











  • from one physical disk to several partition block devices. from physical disks to LVs.@Tim

    – 炸鱼薯条德里克
    Feb 26 at 4:48





















1















You can't make the whole disk a PV if there is at least one partition
on it (because pvcreate won't let you).




All this is saying is that pvcreate refuses to wipe out your partition table if one exists. The point of this is to prevent data loss if a user accidentally runs pvcreate /dev/sda.



If /dev/sda isn't partitioned you can run pvcreate /dev/sda to make the whole disk (even the area of the disk where a partition table would exist) a PV.



If /dev/sda is partitioned (e.g. MBR or GPT) pvcreate doesn't want to take a chance ("it won't let you"). This is a safety mechanism, not a technical limitation.






share|improve this answer























    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f502721%2fis-a-disk-without-being-partitioned-a-partition-by-itself%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    A disk without being partitioned is a disk with no partitions or partition table; it’s not a partition (a partition separates something into parts, even if it’s only one; a whole disk isn’t separated into parts).



    A disk with one partition is a disk with a partition table of some sort (there are several partitioning schemes), with one entry in the table defining a partition.



    pvcreate can create a physical volume using an entire disk or a partition. By default it will refuse to create a physical volume using an entire disk if it already contains a partition table.



    (Note that pvcreate doesn’t “mark” an existing feature — disk or partition —, it creates a physical volume, which involves writing metadata.)






    share|improve this answer
























    • Thanks. "By default it will refuse to create a physical volume using an entire disk if it already contains a partition table." What is non default case?

      – Tim
      Feb 24 at 18:06











    • -f or -ff IIRC.

      – Stephen Kitt
      Feb 24 at 18:56
















    2














    A disk without being partitioned is a disk with no partitions or partition table; it’s not a partition (a partition separates something into parts, even if it’s only one; a whole disk isn’t separated into parts).



    A disk with one partition is a disk with a partition table of some sort (there are several partitioning schemes), with one entry in the table defining a partition.



    pvcreate can create a physical volume using an entire disk or a partition. By default it will refuse to create a physical volume using an entire disk if it already contains a partition table.



    (Note that pvcreate doesn’t “mark” an existing feature — disk or partition —, it creates a physical volume, which involves writing metadata.)






    share|improve this answer
























    • Thanks. "By default it will refuse to create a physical volume using an entire disk if it already contains a partition table." What is non default case?

      – Tim
      Feb 24 at 18:06











    • -f or -ff IIRC.

      – Stephen Kitt
      Feb 24 at 18:56














    2












    2








    2







    A disk without being partitioned is a disk with no partitions or partition table; it’s not a partition (a partition separates something into parts, even if it’s only one; a whole disk isn’t separated into parts).



    A disk with one partition is a disk with a partition table of some sort (there are several partitioning schemes), with one entry in the table defining a partition.



    pvcreate can create a physical volume using an entire disk or a partition. By default it will refuse to create a physical volume using an entire disk if it already contains a partition table.



    (Note that pvcreate doesn’t “mark” an existing feature — disk or partition —, it creates a physical volume, which involves writing metadata.)






    share|improve this answer













    A disk without being partitioned is a disk with no partitions or partition table; it’s not a partition (a partition separates something into parts, even if it’s only one; a whole disk isn’t separated into parts).



    A disk with one partition is a disk with a partition table of some sort (there are several partitioning schemes), with one entry in the table defining a partition.



    pvcreate can create a physical volume using an entire disk or a partition. By default it will refuse to create a physical volume using an entire disk if it already contains a partition table.



    (Note that pvcreate doesn’t “mark” an existing feature — disk or partition —, it creates a physical volume, which involves writing metadata.)







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 24 at 17:04









    Stephen KittStephen Kitt

    176k24401479




    176k24401479













    • Thanks. "By default it will refuse to create a physical volume using an entire disk if it already contains a partition table." What is non default case?

      – Tim
      Feb 24 at 18:06











    • -f or -ff IIRC.

      – Stephen Kitt
      Feb 24 at 18:56



















    • Thanks. "By default it will refuse to create a physical volume using an entire disk if it already contains a partition table." What is non default case?

      – Tim
      Feb 24 at 18:06











    • -f or -ff IIRC.

      – Stephen Kitt
      Feb 24 at 18:56

















    Thanks. "By default it will refuse to create a physical volume using an entire disk if it already contains a partition table." What is non default case?

    – Tim
    Feb 24 at 18:06





    Thanks. "By default it will refuse to create a physical volume using an entire disk if it already contains a partition table." What is non default case?

    – Tim
    Feb 24 at 18:06













    -f or -ff IIRC.

    – Stephen Kitt
    Feb 24 at 18:56





    -f or -ff IIRC.

    – Stephen Kitt
    Feb 24 at 18:56













    2














    They are both block storage devices. In principle one could add a partition table to a partition, thus adding partitions to it. However Operating Systems may not recursively traverse partitions, so they may no be found, and thus may not be treated the same.



    Note: Extended partitions are a partition with a partition table within.






    share|improve this answer
























    • partition table is more like a simple kernel built-in device-mapper solution. Pretty old, but still in common use.

      – 炸鱼薯条德里克
      Feb 25 at 1:06











    • @炸鱼薯条德里克 "partition table is more like a simple kernel built-in device-mapper solution." Is a partition table a mapping from what to what? Is LVM's device-mapper solution a mapping from what to what?

      – Tim
      Feb 26 at 4:28











    • from one physical disk to several partition block devices. from physical disks to LVs.@Tim

      – 炸鱼薯条德里克
      Feb 26 at 4:48


















    2














    They are both block storage devices. In principle one could add a partition table to a partition, thus adding partitions to it. However Operating Systems may not recursively traverse partitions, so they may no be found, and thus may not be treated the same.



    Note: Extended partitions are a partition with a partition table within.






    share|improve this answer
























    • partition table is more like a simple kernel built-in device-mapper solution. Pretty old, but still in common use.

      – 炸鱼薯条德里克
      Feb 25 at 1:06











    • @炸鱼薯条德里克 "partition table is more like a simple kernel built-in device-mapper solution." Is a partition table a mapping from what to what? Is LVM's device-mapper solution a mapping from what to what?

      – Tim
      Feb 26 at 4:28











    • from one physical disk to several partition block devices. from physical disks to LVs.@Tim

      – 炸鱼薯条德里克
      Feb 26 at 4:48
















    2












    2








    2







    They are both block storage devices. In principle one could add a partition table to a partition, thus adding partitions to it. However Operating Systems may not recursively traverse partitions, so they may no be found, and thus may not be treated the same.



    Note: Extended partitions are a partition with a partition table within.






    share|improve this answer













    They are both block storage devices. In principle one could add a partition table to a partition, thus adding partitions to it. However Operating Systems may not recursively traverse partitions, so they may no be found, and thus may not be treated the same.



    Note: Extended partitions are a partition with a partition table within.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 24 at 17:04









    ctrl-alt-delorctrl-alt-delor

    12k42360




    12k42360













    • partition table is more like a simple kernel built-in device-mapper solution. Pretty old, but still in common use.

      – 炸鱼薯条德里克
      Feb 25 at 1:06











    • @炸鱼薯条德里克 "partition table is more like a simple kernel built-in device-mapper solution." Is a partition table a mapping from what to what? Is LVM's device-mapper solution a mapping from what to what?

      – Tim
      Feb 26 at 4:28











    • from one physical disk to several partition block devices. from physical disks to LVs.@Tim

      – 炸鱼薯条德里克
      Feb 26 at 4:48





















    • partition table is more like a simple kernel built-in device-mapper solution. Pretty old, but still in common use.

      – 炸鱼薯条德里克
      Feb 25 at 1:06











    • @炸鱼薯条德里克 "partition table is more like a simple kernel built-in device-mapper solution." Is a partition table a mapping from what to what? Is LVM's device-mapper solution a mapping from what to what?

      – Tim
      Feb 26 at 4:28











    • from one physical disk to several partition block devices. from physical disks to LVs.@Tim

      – 炸鱼薯条德里克
      Feb 26 at 4:48



















    partition table is more like a simple kernel built-in device-mapper solution. Pretty old, but still in common use.

    – 炸鱼薯条德里克
    Feb 25 at 1:06





    partition table is more like a simple kernel built-in device-mapper solution. Pretty old, but still in common use.

    – 炸鱼薯条德里克
    Feb 25 at 1:06













    @炸鱼薯条德里克 "partition table is more like a simple kernel built-in device-mapper solution." Is a partition table a mapping from what to what? Is LVM's device-mapper solution a mapping from what to what?

    – Tim
    Feb 26 at 4:28





    @炸鱼薯条德里克 "partition table is more like a simple kernel built-in device-mapper solution." Is a partition table a mapping from what to what? Is LVM's device-mapper solution a mapping from what to what?

    – Tim
    Feb 26 at 4:28













    from one physical disk to several partition block devices. from physical disks to LVs.@Tim

    – 炸鱼薯条德里克
    Feb 26 at 4:48







    from one physical disk to several partition block devices. from physical disks to LVs.@Tim

    – 炸鱼薯条德里克
    Feb 26 at 4:48













    1















    You can't make the whole disk a PV if there is at least one partition
    on it (because pvcreate won't let you).




    All this is saying is that pvcreate refuses to wipe out your partition table if one exists. The point of this is to prevent data loss if a user accidentally runs pvcreate /dev/sda.



    If /dev/sda isn't partitioned you can run pvcreate /dev/sda to make the whole disk (even the area of the disk where a partition table would exist) a PV.



    If /dev/sda is partitioned (e.g. MBR or GPT) pvcreate doesn't want to take a chance ("it won't let you"). This is a safety mechanism, not a technical limitation.






    share|improve this answer




























      1















      You can't make the whole disk a PV if there is at least one partition
      on it (because pvcreate won't let you).




      All this is saying is that pvcreate refuses to wipe out your partition table if one exists. The point of this is to prevent data loss if a user accidentally runs pvcreate /dev/sda.



      If /dev/sda isn't partitioned you can run pvcreate /dev/sda to make the whole disk (even the area of the disk where a partition table would exist) a PV.



      If /dev/sda is partitioned (e.g. MBR or GPT) pvcreate doesn't want to take a chance ("it won't let you"). This is a safety mechanism, not a technical limitation.






      share|improve this answer


























        1












        1








        1








        You can't make the whole disk a PV if there is at least one partition
        on it (because pvcreate won't let you).




        All this is saying is that pvcreate refuses to wipe out your partition table if one exists. The point of this is to prevent data loss if a user accidentally runs pvcreate /dev/sda.



        If /dev/sda isn't partitioned you can run pvcreate /dev/sda to make the whole disk (even the area of the disk where a partition table would exist) a PV.



        If /dev/sda is partitioned (e.g. MBR or GPT) pvcreate doesn't want to take a chance ("it won't let you"). This is a safety mechanism, not a technical limitation.






        share|improve this answer














        You can't make the whole disk a PV if there is at least one partition
        on it (because pvcreate won't let you).




        All this is saying is that pvcreate refuses to wipe out your partition table if one exists. The point of this is to prevent data loss if a user accidentally runs pvcreate /dev/sda.



        If /dev/sda isn't partitioned you can run pvcreate /dev/sda to make the whole disk (even the area of the disk where a partition table would exist) a PV.



        If /dev/sda is partitioned (e.g. MBR or GPT) pvcreate doesn't want to take a chance ("it won't let you"). This is a safety mechanism, not a technical limitation.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 24 at 17:58









        catanmancatanman

        9612




        9612






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f502721%2fis-a-disk-without-being-partitioned-a-partition-by-itself%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

            How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

            is 'sed' thread safe

            How to make a Squid Proxy server?