Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Unable to create volume

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    9

    Question Unable to create volume

    I had this problem since version 8 (tried today with 8.01 RC1) but thought always this was my mainboard (a VIA VB8001). Today, new hardware (ASRock E350M1) I had the same issue:

    I am unable to create a working zfs volume.
    First, I have to execute 'sysctl kern.geom.debugflags=0x10' on a root shell, otherwise I get 'Unable to GTP format disk ada0'.

    After executing that, I can create a ZFS (mirror with 2 disks, WD20EARS), the "use 4k" ckeckbox is checked, of course.

    All seems fine, I can access the volume, write an read data to/from it.
    But after a reboot, I am not able to access the volume.
    dmesg says:
    Code:
    ada0 at ata2 bus 0 scbus0 target 0 lun 0
    ada0: <WDC WD20EARS-00MVWB0 51.0AB51> ATA-8 SATA 2.x device
    ada0: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
    ada0: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
    da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
    da0: <Mass Storage Device \\001\\000\\000?> Removable Direct Access SCSI-0 device 
    da0: 40.000MB/s transfers
    da0: 3826MB (7837695 512 byte sectors: 255H 63S/T 487C)
    ada1 at ata3 bus 0 scbus1 target 0 lun 0
    ada1: <WDC WD20EARS-00MVWB0 51.0AB51> ATA-8 SATA 2.x device
    ada1: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
    ada1: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
    GEOM: da0s1: geometry does not match label (16h,63s != 255h,63s).
    GEOM: ada0: the secondary GPT table is corrupt or invalid.
    GEOM: ada0: using the primary only -- recovery suggested.
    GEOM: ada1: the secondary GPT table is corrupt or invalid.
    GEOM: ada1: using the primary only -- recovery suggested.
    GEOM_MIRROR: Device mirror/mirror0 launched (2/2).
    GEOM: mirror/mirror0: corrupt or invalid GPT detected.
    GEOM: mirror/mirror0: GPT rejected -- may not be recoverable.
    I had it all up an running on FreeNAS 0.7 without problems, but version 8 with zfs is unusable because of this. I suspect the disks (advanced format) may be the problem...

    If I put one of these disks into my linux box, I can import the filesystem without any problem (aside the missing second disk) using fuse-zfs and access the data.

    If I use UFS, I first (without the geom.debugflags) get the error:
    Code:
    Error: [MiddlewareError: Volume creation failed: "geom: Can't store metadata on dev/ada0: Operation not permitted., "]
    After doing the debugflags trick, it works and it does so even after a reboot.
    Last edited by EvilGenius; 09-01-2011 at 05:52 AM. Reason: additional info about UFS

  2. #2
    Senior Member
    Join Date
    May 2011
    Location
    Curitiba, Brazil, Brazil
    Posts
    1,484
    That happens because your disks are not blank, they already have metadata (looks like geom mirror)...

    Try using the Auto Importer to import the mirror, then export it (checking the box to blank disks)
    ...or wipe the disk data before

  3. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    9
    I already blanked some of the first and last sectors of the disks. Seems not enough, so I'll try and zero out the whole disks.

    Importing does not work, theres an error (don't remember exactly, but something about not verified circumstances).

  4. #4

    similar problem, same solution

    Hi,

    I had a similar problem: using used disks in Freenas, was impossible create a ZFS mirrored raid or a UFS mirrored raid.

    Trying these operation, was visualized the errors:

    "MiddlewareError Volume creation failed geom Can't store metadata Operation not permitted"
    or
    "Unable to GPT format the disk "

    So I tryed to install both the disks on a Linux machine to reset they with the commands:

    dd if=/dev/zero of=/dev/devicename bs=1k seek=$tailBlocks
    dd if=/dev/zero of=/dev/devicename bs=1k count=20

    with no success.

    Reading this post , I tried to set the "kern.geom.debugflags" flag and the problem is gone !!!

    I was resigned to fill the entire disc with NULLs.

    Could you explain me the purpose of this flag ?

    Thank you!

  5. #5
    Junior Member
    Join Date
    Jul 2011
    Posts
    9
    Gabriel,

    please take care if you created a ZFS volume his way. In my case, creation and access succeeded, but the volume was inaccessible after a reboot. The only solution to gain acess to my data again was to mount one of my RAID1-disks on a linux machine using the fuse-zfs driver.

    I had to create a UFS volume and delete it using the "destroy data" checkbox. After that, the ZFS volume I created was stable.

    I thing that there is plenty of backup information about the volume scattered all over the entire disk. Only the "destroy data" option seems to delete all (or at least enough) of this data. However, zeroing out the entire disk should do it, too, but will take a long time.

    Since I do not know much about BSD, this is pure speculation: I think the geom "subsystem" which cares about softraid prevents changes to the disk structure if it finds information about existing geom volumes to prevent data loss.
    By setting the debugflags parameter you deactivate/override this protection.
    However, as I leraned, this is not always a solution - my ZFS volume containing important data was inaccessible after a reboot because I used this parameter to create the volume instead of going the right way destroying all metadata.
    Last edited by EvilGenius; 09-04-2011 at 09:46 AM. Reason: typos

  6. #6

    True !!!

    As you said,

    after the reboot, FreeNas doesn't mount the ZFS raid disk and print an error that specify a corruption on the secondary GPT Table.

    So I've mounted both the disks, again, in my linux machine and I've erased all with a "dd" on all the disk sectors.

    Retrying, all work fine.

    So I have a question more: in the old posts about FreeNas, error like this was solved using commands like "gpt" or "gdisk" from the root command line.
    In FreeNas 8, these tools are no longer present: why ?

    Thank you !

  7. #7
    Junior Member
    Join Date
    Nov 2011
    Posts
    7
    Okay, I am going through the exact same problem, but zeroing out my drives didn't fix the issue. I did a "dd if=/dev/zero of=/dev/adaX bs=4096k" where X = 0,1,2,3 on all of the drives.

    If I use the "sysctl kern.geom....=0x10" trick, I can create a zpool just fine via the WebGUI. However, it becomes unusable after rebooting.

    Here is some examples of the setup that I have tried after zeroing out both drives and leaving "kern.geom...." at default.

    Using all drives:
    http://imageshack.us/f/802/screenshot20111107at103.png/

    And the resulting error:
    http://imageshack.us/f/835/screenshot20111107at104.png/

    skipping ada2, using 3 drives:
    http://imageshack.us/f/580/screenshot20111107at104.png/

    and the resulting error:
    http://imageshack.us/f/21/screenshot20111107at104.png/


    What do I need to do in order to get this working properly?

    I am using FreeNAS 8.0.2 via a USB install on a 16GB USB stick. The 500GB drives are an assortment that a buddy of mine gave to me because he had gone to 2TB drives.

    Oh, and i just logged in and "less-ed" /var/log/messages. I found these interesting bits:
    Nov 7 10:40:48 beastnas freenas[1658]: Popen()ing: gpart add -b 128 -t freebsd-swap -s 4194304 ada1
    Nov 7 10:40:48 beastnas freenas[1658]: Popen()ing: gpart add -t freebsd-zfs ada1
    Nov 7 10:40:48 beastnas freenas[1658]: Popen()ing: gpart bootcode -b /boot/pmbr-datadisk /dev/ada1
    Nov 7 10:40:48 beastnas freenas[1658]: Executing: dd if=/dev/zero of=/dev/ada2 bs=1m count=1
    Nov 7 10:40:48 beastnas freenas: dd: /dev/ada2: Operation not permitted
    Nov 7 10:40:48 beastnas freenas[1658]: Executing: dd if=/dev/zero of=/dev/ada2 bs=1m oseek=`diskinfo ada2 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Nov 7 10:40:48 beastnas freenas: dd: /dev/ada2: Operation not permitted
    Nov 7 10:40:48 beastnas freenas[1658]: Popen()ing: gpart create -s gpt /dev/ada2
    Nov 7 10:41:36 beastnas freenas[1658]: Executing: swapoff -a
    Nov 7 10:41:36 beastnas freenas[1658]: Executing: geom disk list ada0 | grep 'Stripesize: 4096'
    Nov 7 10:41:36 beastnas freenas[1658]: Executing: geom disk list ada0 | grep 'Sectorsize: 512'
    Nov 7 10:41:36 beastnas freenas[1658]: Executing: dd if=/dev/zero of=/dev/ada0 bs=1m count=1
    Nov 7 10:41:36 beastnas freenas: 1+0 records in
    Nov 7 10:41:36 beastnas freenas: 1+0 records out
    Nov 7 10:41:36 beastnas freenas: 1048576 bytes transferred in 0.005632 secs (186184341 bytes/sec)
    Nov 7 10:41:36 beastnas freenas[1658]: Executing: dd if=/dev/zero of=/dev/ada0 bs=1m oseek=`diskinfo ada0 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Nov 7 10:41:36 beastnas freenas: dd: /dev/ada0: short write on character device
    Nov 7 10:41:36 beastnas freenas: dd: /dev/ada0: end of device
    Nov 7 10:41:36 beastnas freenas: 5+0 records in
    Nov 7 10:41:36 beastnas freenas: 4+1 records out
    Nov 7 10:41:36 beastnas freenas: 4218880 bytes transferred in 0.021563 secs (195653184 bytes/sec)
    Nov 7 10:41:36 beastnas freenas[1658]: Popen()ing: gpart create -s gpt /dev/ada0
    Nov 7 10:41:37 beastnas freenas[1658]: Popen()ing: gpart add -b 128 -t freebsd-swap -s 4194304 ada0
    Nov 7 10:41:37 beastnas freenas[1658]: Popen()ing: gpart add -t freebsd-zfs ada0
    Nov 7 10:41:37 beastnas freenas[1658]: Popen()ing: gpart bootcode -b /boot/pmbr-datadisk /dev/ada0
    Nov 7 10:41:37 beastnas freenas[1658]: Executing: dd if=/dev/zero of=/dev/ada1 bs=1m count=1
    Nov 7 10:41:37 beastnas freenas: 1+0 records in
    Nov 7 10:41:37 beastnas freenas: 1+0 records out
    Nov 7 10:41:37 beastnas freenas: 1048576 bytes transferred in 0.007261 secs (144411312 bytes/sec)
    Nov 7 10:41:37 beastnas freenas[1658]: Executing: dd if=/dev/zero of=/dev/ada1
    bs=1m oseek=`diskinfo ada1 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Nov 7 10:41:37 beastnas freenas: dd: /dev/ada1: short write on character device
    Nov 7 10:41:37 beastnas freenas: dd: /dev/ada1: end of device
    Nov 7 10:41:37 beastnas freenas: 5+0 records in
    Nov 7 10:41:37 beastnas freenas: 4+1 records out
    Nov 7 10:41:37 beastnas freenas: 4218880 bytes transferred in 0.023520 secs (179374204 bytes/sec)
    Nov 7 10:41:37 beastnas freenas[1658]: Popen()ing: gpart create -s gpt /dev/ada1
    Nov 7 10:41:37 beastnas freenas[1658]: Popen()ing: gpart add -b 128 -t freebsd-swap -s 4194304 ada1
    Nov 7 10:41:37 beastnas freenas[1658]: Popen()ing: gpart add -t freebsd-zfs ada1
    Nov 7 10:41:37 beastnas freenas[1658]: Popen()ing: gpart bootcode -b /boot/pmbr-datadisk /dev/ada1
    Nov 7 10:41:38 beastnas freenas[1658]: Executing: dd if=/dev/zero of=/dev/ada3 bs=1m count=1
    Nov 7 10:41:38 beastnas freenas: dd: /dev/ada3: Operation not permitted
    Nov 7 10:41:38 beastnas freenas[1658]: Executing: dd if=/dev/zero of=/dev/ada3 bs=1m oseek=`diskinfo ada3 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Nov 7 10:41:38 beastnas freenas: dd: /dev/ada3: Operation not permitted
    Nov 7 10:41:38 beastnas freenas[1658]: Popen()ing: gpart create -s gpt /dev/ada3
    Edit2: It looks like this ticket may be related https://support.freenas.org/ticket/793 along with 794 possibly.
    Last edited by Adub; 11-07-2011 at 10:03 AM.

  8. #8
    Junior Member
    Join Date
    Nov 2011
    Posts
    7
    Um, have any of the FreeNAS developers seen this yet? It's really quite annoying and is preventing me from using FreeNAS period. The ticket is already 2 months old.

  9. #9
    I got the same error on one of my test freeNAS boxes.
    THe drive I was trying to make into a new volume had originally been used in RAIDZ1 setup.

    SO what I did was hook it up to one of my Windows machines and performed the following commands from MS-DOS.

    select disk 1 (where 1 is the SATA number I had the drive plugged into my MOBO)
    clean
    create partition primary
    select partition 1 (where 1 is the SATA number I had the drive plugged into my MOBO)
    active
    format fs=ntfs quick
    assign
    exit

    Hooked it up to my freeNAS box and I was able to add it as a new UFS volume.

    But I did this from the same box and now my 2 mirrored drives say DEGRADED. I will reboot and see if that fixes it.

  10. #10
    Junior Member
    Join Date
    Nov 2011
    Posts
    7
    We're you able to reboot and check the issue?

    Also, when you formatted the disk in windows, and then attached it to your freenas box, did you have to use the sysctl kern trick?

    Adub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •