1st time FreeNAS user needs help with "Failed to wipe da0: dd: /dev/da0: Invalid argument"

Discussion in 'FreeBSD and FreeNAS' started by BLinux, Oct 26, 2017.

  1. BLinux

    BLinux cat lover server enthusiast

    Joined:
    Jul 7, 2016
    Messages:
    2,307
    Likes Received:
    777
    trying out FreeNAS the first time with FreeNAS 11u4 today. not unfamiliar with ZFS in general, was a former Solaris admin and in recent years used a lot of ZoL. I have a test machine with LSI SAS2008 controller, 8x 3TB HGST SAS drives. The machine works great with CentOS7 + ZFS, no problems creating raidz2 pool.

    installed FreeNAS on a 16GB USB drive. system boots up and just went through the setup wizard, but it bombs out during volume setup. using the webui, tried to setup the raidz2 across 8x 3TB drives again, and I get this:

    "Failed to wipe da0: dd: /dev/da0: Invalid argument"

    my own online searches shows several folks having similar issues. seems FreeNAS is finicky about previous partition data.. so I tried to do a "wipe" in the webui, and still get errors; permissions denied of sorts? can't remember...

    so, i fired up a shell (much more comfortable in CLI than webui), and just ran dd with /dev/zero over the 1st few MB of each drive. all previous partitions are gone as seen by ls -l /dev/da*. go back to the webui, same errors still, on both creating raidz2 pool and same error on wipe.

    any suggestions?
     
    #1
  2. Jeggs101

    Jeggs101 Well-Known Member

    Joined:
    Dec 29, 2010
    Messages:
    1,466
    Likes Received:
    215
    Try wiping in another os? I know it's dumb but that worked for me once.

    Doesn't FreeNAS even write protect the installation media. If you want joy take a FAN format os boot drive and plug it into a Windows laptop
     
    #2
  3. whitey

    whitey Moderator

    Joined:
    Jun 30, 2014
    Messages:
    2,757
    Likes Received:
    853
    #3
  4. BLinux

    BLinux cat lover server enthusiast

    Joined:
    Jul 7, 2016
    Messages:
    2,307
    Likes Received:
    777
    I don't understand, the hard drives are already with 512b sectors.

    What is the invalid argument error?
     
    #4
  5. BLinux

    BLinux cat lover server enthusiast

    Joined:
    Jul 7, 2016
    Messages:
    2,307
    Likes Received:
    777
    well, i'm not exactly sure the reason for your suggestion, but i have no better idea and so i've launched sg_format on all 8 drives and letting it do it's job... looks like its going to take a while.

    i have to say, for my 1st FreeNAS experience, this isn't leaving me with a warm and fuzzy... i had CentOS 7 w/ ZFS and Xpenology up and running on this machine in a matter of minutes. if this sg_format is what is required to get this going, that means I've got to waste several hours of sg_format in order to get up and going?
     
    #5
  6. ruffy91

    ruffy91 Member

    Joined:
    Oct 6, 2012
    Messages:
    71
    Likes Received:
    11
    Most probably there is some raid config on the end of the drives which BSD recognizes using its geom_raid module.
    The easiest way to get rid of it is clearing it the same way it was created.
    Alternatively nuke the whole drive.
     
    #6
  7. whitey

    whitey Moderator

    Joined:
    Jun 30, 2014
    Messages:
    2,757
    Likes Received:
    853
    Cannot tell you why exactly sg_format works but I'd bet dollars to donuts it worked right? 'Something' on that drive was foreign.
     
    #7
  8. BLinux

    BLinux cat lover server enthusiast

    Joined:
    Jul 7, 2016
    Messages:
    2,307
    Likes Received:
    777
    There was. I was previously testing out Xpenology on this machine so I believe that used Linux mdraid. The strange thing is, even on a shell, I could not run 'dd' to seek ahead to the end of the disk?? It's like FreeBSD/FreeNAS just freaked out because there was a previous configuration on these disks. Just doesn't seem practical... why would basic low level read/write be affected like that? In fact, looking through dmesg, there are a bunch of SCSI command errors, which went away after sg_format? Just strange...

    you were right. after 6 hours of sg_format, I stopped getting those strange errors from gpart command. that is just so strange, to get "invalid argument" from gpart before finishing sg_format? just seems like unrefined code that didn't handle an exception correctly; this seems really disappointing after having not messed with FreeBSD in years (and never FreeNAS)... i also don't understand why there would be SCSI command errors until the sg_format was done? Previously testing CentOS7+ZFS showed no such errors at all....
     
    #8
  9. whitey

    whitey Moderator

    Joined:
    Jun 30, 2014
    Messages:
    2,757
    Likes Received:
    853
    Well it's fixed so just realize the power of sg_format :-D

    Sorry you had a headache, the am fairly certain the benefits of FreeNAS far outweigh that PITA exercise if you give it time and don't throw in the towel.

    EDIT: Ohh sh|t you were using mdadm, yeah I've seen that hog leave all sorts of fun cruft on drives to clean up...no surprise there.

    Double edit: what type of drives did you sg_format, my 400-800 HUSMM ssd's take 15-30 mins each 'maybe' so I assume these were either spinners/HUGE/poor I/O perf/characteristics off those drives...that's all I got :-D
     
    #9
  10. BLinux

    BLinux cat lover server enthusiast

    Joined:
    Jul 7, 2016
    Messages:
    2,307
    Likes Received:
    777
    LOL.. thanks for the sympathy, but unless you're a FreeNAS dev, no apologies needed. I'm use to setting up ZFS on Linux with so much ease, with former mdraid disks or not, i'm just really surprised this was such a pain and the error messages were so unhelpful. ("invalid argument" really should have been a message about disk format or something more useful) I'm also a software developer, so I know getting exception handling right isn't always easy, but that just seemed very basic miss.
    Well, that's good to know that mdadm format messes with FreeNAS. Had I known that, I'd probably taken a few extra steps to clear the mdadm info in Linux first; not sure if that would have helped or not... considering the scsi command errors...

    these were 3TB HGST HUS723030ALS640 spinning disks.

    I'm evaluating Xpenology, FreeNAS, ESXi, Proxmox VE, and probably a few NAS OSes (use case is NAS, virtual machine/container hosting, or both) ... I'm use to setting up ZoL/LVM/mdraid/Samba/nfs/KVM/etc. via CLI in CentOS7, but wanted to see what advantages these other offerings have for some clients that need to lean on "user friendly ui" more than me. FreeNAS ui doesn't seem to be particularly impressing, but Xpenology/Synology DSM definitely has strength in their UI; i can see a lot of my clients using that one. I just wished DSM didn't use mdraid underneath the hood; their use of btrfs is very limited; probably because btrfs parity is (was?) broken.
     
    #10
  11. ruffy91

    ruffy91 Member

    Joined:
    Oct 6, 2012
    Messages:
    71
    Likes Received:
    11
    You can't be serious giving stolen software (xpenology) to your customers?
    Synology doesn't sell licenses, you have to buy their hardware.
     
    #11
  12. i386

    i386 Well-Known Member

    Joined:
    Mar 18, 2016
    Messages:
    1,659
    Likes Received:
    400
    #12
  13. ruffy91

    ruffy91 Member

    Joined:
    Oct 6, 2012
    Messages:
    71
    Likes Received:
    11
    Yes. The bootloader (xpenology) is.
    But you are booting the DSM software image of a ds3615xs or similar (the .pat file) which is not!
     
    #13
  14. T_Minus

    T_Minus Moderator

    Joined:
    Feb 15, 2015
    Messages:
    6,767
    Likes Received:
    1,453
    I thought this post may be to your interest too.

    From FreeNAS to Xpenology

    Specifically this snippet/post within the above thread:

    "
    As an observation, FreeNAS is a large scale community supported NAS O/S whereas XPE is a 'hack' of the open source elements of DSM that allows the Synology DSM O/S to run on other hardware.

    The XPE/DSM combination is a 'hobby project' by some clever Dev guys and could change at any time if Synology remove the open source components or 'secure' the system (DSM 6.2 seems to move in that direction).

    If you are running a critical production business data NAS then be aware of the risks with XPE/DSM, and make sure the company managers know what you are proposing.

    As an aside DSM 6x does offer several cloud backup options (Amazon etc) and if your data is as important as you say, then you should have an offsite backup regardless of your NAS O/S
    "
     
    #14
  15. BLinux

    BLinux cat lover server enthusiast

    Joined:
    Jul 7, 2016
    Messages:
    2,307
    Likes Received:
    777
    Thanks guys for pointing out the XPE is a 'hack' and sharing your opinions. I'm well aware of it and I wouldn't recommend it to anyone without full disclosure of any involved risks. My comment was that I think DSM has much nicer interface than FreeNAS 11, in my opinion. What I'm doing right now is just an evaluation of various options just to educate myself a bit more about the user interfaces of these options, as i'm mostly a CLI guy I don't play around with GUIs that much.

    While we're sharing opinions here... I find it interesting to see the various opinions from people who are comfortable with risk vs those who are not. not just talking about this thread, but other threads i've seen around here about hacking PDBs, Fans, HBAs, etc. It reminds me of the early days of Linux, which started out as a school project/hobby OS, aka 'hack'. At the time, I was working at a large corporation that exclusively used Solaris, IRIX, and Win NT for server OSes. The mention of using Linux made so many people uncomfortable, especially among the "manager types". Some of the techies that were familiar with it were all over it. I remember an instance where the guys trying to push for Linux found a pretty bad bug in the SCSI storage layer; the risk averse anti-Linux crowd were silently cheering through the office, and then 2 hours later Alan Cox replied to an email with a kernel patch and the Linux guys were compiling their kernels and the problem was fixed that day. The anti-Linux folks sort of shut up, because at the time they were dealing with a problem with some UltraSPARCs and Sun was giving them the run around without a fix for months up to that point, and then eventually officially blamed it on "cosmic rays." (no joke, it was official) I think the moral of the story is that "risk" is all about knowledge - whether you're working through official channels/vendor support or a community of capable hobbyists/hackers doesn't really matter, what matters is being in a position that provides the most knowledge to counter the risks.

    Another story about risk... a close friend last year found a very low mileage salvaged title Porsche 911 Targa 4S at a used car website, which turned out to be sort of scam. The pictures of the car looked like it was in bad shape, the entire interior was missing, etc. He eventually tracked the car down to where it was really being sold at auction. He then did further investigating and found the whole backstory to the car, which involved some very wealthy person who parked the car with the top open and the car got wet. The water damage wasn't all that bad in reality, but the owner couldn't stand the idea of his new car (he had just bought it new a few months ago) having water damage, and apparently did a lot of business with the dealership folks, so they supposedly did him a favor and took the entire car apart and told the insurance that it was going to be $90K to properly fix the car, so the insurance company paid the owner so he could buy another brand new one. All the interior bits were still at the dealership. My friend asked them what it would take for them to put the car back together with those parts and was quoted about $3K. Armed with that knowledge he went to auction and out bid everyone else and got the car put back together and shipped to his house. In the end, he got a Targa 4S with a few thousand miles, granted with salvaged title, for less than half the price of a brand new one. He's enjoying every moment of driving that car up until this day, everything works, and the minor water damage is no longer visible after a good interior detail job.

    So, bringing this back to this thread, in my opinion, I think "risk" isn't the same for everyone, and is relative to how much knowledge one has, or is willing to acquire. I have a lot of clients who don't have the knowledge, nor the time, and mostly don't have the will to acquire the knowledge, so their way to manage their risk is to pay someone (vendor, consultants, etc.). But there are clients who are much more technical, or willing to acquire the knowledge they need, and they are completely comfortable using something like the community version of FreeNAS, CentOS (rather than RHEL), or even something like XPE, etc. for their production workloads. I've met clients that would take apart a major brand (think Cisco, Juniper, etc.) network device and take a soldering iron to it to repair a problem rather than pay for support!! Most of my clients are risk averse, and I get that they just want to focus on their core business, but working with them is "just another day in IT consulting." I personally really enjoy working with those that are not risk averse as they are much more interesting, creative, and innovative; and I find myself learning new things from such people which is much more exciting to me.
     
    #15
  16. T_Minus

    T_Minus Moderator

    Joined:
    Feb 15, 2015
    Messages:
    6,767
    Likes Received:
    1,453
    I agree we're all accepting risk differently.

    However, comparing XPE to what you did and your examples aren't really the same... are they?


    They don't want to "just focus on their core business" they don't want downtime that will cost them multiples of what they pay you/hardware/etc. I've dealt with a number of businesses that went from startups to millions in revenue and when you're starting out, especially bootstrapping you can't afford certain things so you're forced to take more risks or potentially not _do_ something your business needs. Where after they grow and have good revenue you're better off spending the $ up front to prevent loss of revenue... things at some point in business growth flip-flop. I'm not saying businesses with good income take no risk I'm saying they don't take the same silly ones they did when they were small ;) My perspective. I personally like dealing with clients who have the money for the appropriate solution vs. the ones who want you to rig something then argue about paying you to fix it or change it again in the future ;) especially after you warned them of potential hazards!! LOL.

    my 02 and appreciate you sharing yours too :) :)
     
    #16
Similar Threads: FreeNAS user
Forum Title Date
FreeBSD and FreeNAS FreeNAS replication as a normal/unprivileged user Jun 14, 2016
FreeBSD and FreeNAS FreeNAS Cloud sync with delayed delete? Oct 9, 2019
FreeBSD and FreeNAS Windows, FreeNAS, eSATA, Port Multipliers, Non-IT RAID & VMs Sep 20, 2019
FreeBSD and FreeNAS Need FreeNAS sharing help Jul 4, 2019
FreeBSD and FreeNAS FreeNAS Error - Cam Status: SCSI Status Error Jun 14, 2019

Share This Page