vinum drive referenced / disklabel inconsistency

From: Clark C. Evans (cce_at_clarkevans.com)
Date: 06/29/03

  • Next message: Samuel Tardieu: "IPFilter & IPv6"
    Date: Sun, 29 Jun 2003 20:12:06 +0000
    To: freebsd-stable@freebsd.org
    
    

    I am trying to setup vinum on a box using 4.8 RELENG_4 (as of about a
    week ago snapshot). This box was running 4.6 /w vinum on same hard
    drives for the last 4 months wonderfully... but since it is my
    current 'scratch/backup' box, I just reinstalled with -STABLE.

    # uname -a
      FreeBSD polya.axista.com 4.8-STABLE FreeBSD 4.8-STABLE #22: Tue Jun 24
      17:01:07 EDT 2003 cce@cantor.local:/usr/obj/usr/src/sys/GENERIC i386

    Anyway, my problems seem to be coming from a disklabel issue. Following
    the instructions in the handbook (for disk addition), I go through the
    following steps:

       # dd if=/dev/zero of=/dev/ad2 bs=1k count=1
       # fdisk -BI ad2
       # disklabel -B -w -r ad2s1 auto

    And at this point, I use the following to extract the current
    label, and then I edit it with vi, and then update it:
      
       # disklabel ad2s1 > label
       # vim label
       # disklabel -R -r ad2s1 label

    Following is the tail end of the label (I don't edit anything else)
    where I add 'swap' and 'vinum' partitions:

      a: 4193280 0 swap
      c: 156301425 0 unused 0 0
      e: 152107200 4193280 vinum

    The results, when "restoring" the label, however, are inconsistent, with

      # disklabel ad2s1
      # disklabel ad2
      # disklabel -r ad2s1
      # disklabel -r ad2
      # disklabel /dev/ad2s1
      # disklabel -r /dev/ad2s1

    the results are expected (and identical):

      <snip/>

      8 partitions:
      # size offset fstype [fsize bsize bps/cpg]
        a: 4193280 0 swap # (Cyl. 0 - 4159)
        c: 156301425 0 unused 0 0 # (Cyl. 0 - 155060*)
        e: 152107200 4193280 vinum # (Cyl. 4160 - 155059)

    However, for the other two permutations... the results are different:

      # disklabel /dev/ad2

      <snip/>

      8 partitions:
      # size offset fstype [fsize bsize bps/cpg]
     c: 156301488 0 unused 0 0 # (Cyl. 0 - 155060)
      
      # disklabel -r /dev/ad2
      disklabel: bad pack magic number (label is damaged, or pack is unlabeled)

    At this point, I use the following vinum configuration file to
    setup vinum "vinum create -f vinum.conf"

        drive d2 device /dev/ad2s1e
        volume tmp setupstate
         plex name tmp.2 org concat
          sd length 2000m drive d2

    And this produces...

      1 drives:
      D d2 State: referenced Device Avail: 0/0 MB
      
      1 volumes:
      V tmp State: down Plexes: 1 Size: 2000 MB
      
      1 plexes:
      P tmp.2 C State: faulty Subdisks: 1 Size: 2000 MB
      
      1 subdisks:
      S tmp.2.s0 State: crashed PO: 0 B Size: 2000 MB

    And of course, this is where I get stuck... With 4.6 I didn't have any
    of these problems (from the bad pack magic number to the missing device
    in the vinum state). Anyway, following is the full output from the
    disklabel.

    # disklabel -r /dev/ad2s1
      # /dev/ad2s1:
      type: unknown
      disk: amnesiac
      label:
      flags:
      bytes/sector: 512
      sectors/track: 63
      tracks/cylinder: 16
      sectors/cylinder: 1008
      cylinders: 155060
      sectors/unit: 156301425
      rpm: 3600
      interleave: 1
      trackskew: 0
      cylinderskew: 0
      headswitch: 0 # milliseconds
      track-to-track seek: 0 # milliseconds
      drivedata: 0
      
      8 partitions:
      # size offset fstype [fsize bsize bps/cpg]
        a: 4193280 0 swap # (Cyl. 0 - 4159)
        c: 156301425 0 unused 0 0 # (Cyl. 0 - 155060*)
        e: 152107200 4193280 vinum # (Cyl. 4160 - 155059)

    Thank you for any suggestions you may have,

    Clark
    _______________________________________________
    freebsd-stable@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-stable
    To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"


  • Next message: Samuel Tardieu: "IPFilter & IPv6"

    Relevant Pages

    • Re: Vinum dumpconfig returns nothing ?!?
      ... A little googling for Disklabel and I was ... So if you mess up your partition tables, ... (replacing rad1 by the raw device name of your disk). ... > vinum in order to avoid overwriting data used for other purposes. ...
      (freebsd-current)
    • Re: vinum disklabel FBSD 5.2.1....
      ... > The disk label says it has 8 partitions, but only the A and C partitions ... > This is my first time playing with vinum, i've read a handful of howtos ... > and all the documentation I find shows the disklabel looking like this: ... To unsubscribe, ...
      (freebsd-questions)
    • RE: HEADS UP [Re: thread+preemption stability improvement]
      ... # disklabel /dev/ad0s1 ... d: 1048576 2097152 vinum ...
      (freebsd-current)
    • vinum disklabel FBSD 5.2.1....
      ... All drives have been fdisk'd and such, ... The first step of setting up vinum is changing the disklabel ... The disk label says it has 8 partitions, but only the A and C partitions ... This is my first time playing with vinum, i've read a handful of howtos ...
      (freebsd-questions)
    • Re: vinum drive referenced / disklabel inconsistency
      ... beacuse If I change my label so that vinum part is idential to ... This box was running 4.6 /w vinum on same hard ... my problems seem to be coming from a disklabel issue. ... | where I add 'swap' and 'vinum' partitions: ...
      (freebsd-stable)