Why can I not edit the disklabel on my ccd?

The symptom of this is:

    # disklabel ccd0
    (it prints something sensible here, so let us try to edit it)
    # disklabel -e ccd0
    (edit, save, quit)
    disklabel: ioctl DIOCWDINFO: No disk label on disk;
    use "disklabel -r" to install initial label

This is because the disklabel returned by ccd is actually a ``fake'' one that is not really on the disk. You can solve this problem by writing it back explicitly, as in:

    # disklabel ccd0 > /tmp/disklabel.tmp
    # disklabel -Rr ccd0 /tmp/disklabel.tmp
    # disklabel -e ccd0
    (this will work now)

Suggest a Site