NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/54822: it is hard to get rid of disklabels



>Number:         54822
>Category:       bin
>Synopsis:       it is hard to get rid of disklabels
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 01 13:15:02 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.32
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD seven-days-to-the-wolves.aprisoft.de 9.99.32 NetBSD 9.99.32 (GENERIC) #330: Wed Jan 1 11:57:05 CET 2020 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

When a disk has a valid disklabel, and the kernel has read it once
already, it is pretty hard to get rid of it again.

Example output:

# disklabel -D vnd0
# disklabel -r vnd0
disklabel: could not read existing label
# disklabel vnd0
# /dev/rvnd0:
type: unknown
disk: vnd
label: fictious
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 500
total sectors: 1024000
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   1024000         0        cgd                     # (Cyl.      0 -    499)
 d:   1024000         0     unused      0     0        # (Cyl.      0 -    499)


I'd prefer if the last output would be identical to what you get when
the disk was totaly zeroed at boot, or (in this case thanks to vnd):

# vnconfig -u vnd0
# vnconfig -c vnd0 disk_small.img 
# disklabel vnd0
# /dev/rvnd0:
type: vnd
disk: vnd
label: fictitious
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 500
total sectors: 1024000
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   1024000         0     4.2BSD      0     0     0  # (Cyl.      0 -    499)
 d:   1024000         0     unused      0     0        # (Cyl.      0 -    499)
disklabel: boot block size 0
disklabel: super block size 0


>How-To-Repeat:
s/a

>Fix:
n/a



Home | Main Index | Thread Index | Old Index