Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
jandrese
Apr 3, 2007

by Tiny Fistpump

Combat Pretzel posted:

How well does the Linuxulator work in FreeBSD 8/CURRENT? For getting things like Google Earth to work. And how up-to-date are the ports?

I've had pretty good luck with the Linuxlator. The only major hangup is when something tries to use ALSA typically.

Adbot
ADBOT LOVES YOU

Only Shallow
Nov 12, 2005

show
The ALSA libraries are available in Ports now. Hopefully that means net/skype can finally be updated.

I have FreeBSD 8.1 running on my Seagate DockStar. $20 is a great deal for a little ARM machine that can run pf/SSH/nginx and that uses 6 watts of power.

Nystral
Feb 6, 2002

Every man likes a pretty girl with him at a skeleton dance.

Only Shallow posted:

I have FreeBSD 8.1 running on my Seagate DockStar. $20 is a great deal for a little ARM machine that can run pf/SSH/nginx and that uses 6 watts of power.

Can you give me some details on this please? Where can I learn more because searching for Dockstar and BSD isn't working.

Only Shallow
Nov 12, 2005

show
I was planning to write up a how-to and put it online with my patches, kernel, world, configuration, and packages.

netmazk
Jun 15, 2003

Only Shallow posted:

I was planning to write up a how-to and put it online with my patches, kernel, world, configuration, and packages.

This would be incredible if you could even dump some brief notes on how to do this here. For $20 its too hard to pass up.

roadhead
Dec 25, 2001

I have a RaidZ2 Zpool with 10 devices, Western Digital Green Drives.

Today I decided, in my infinite idiocy to bring the box down and run WDTLER on the drives, as currently the array would stall long enough to cause a kernel panic at times, and I thought this would be a fix.

9 drives have no problems, but WD-WMAVU0467050 says "can't be set" - I think WD removed the ability to change this from newer drives, as the remaining 9 all have much lower serial numbers.

With all but 1 drive changed to a TLER of 7 seconds (read and write) I boot back into FreeBSD 8.

And I can't mount, import, or really do anything with my array except see this:

code:
hydra# zpool import
  pool: storage
    id: 1927227762911526040
 state: UNAVAIL
action: The pool cannot be imported due to damaged devices or data.
config:

        storage     UNAVAIL  insufficient replicas
          raidz2    UNAVAIL  corrupted data
            ad4     ONLINE
            ad6     ONLINE
            ad8     ONLINE
            ad10    ONLINE
            ad12    ONLINE
            ad14    ONLINE
            ad16    ONLINE
            ad18    ONLINE
            ad20    ONLINE
            ad22    ONLINE
hydra# zpool import storage
cannot import 'storage': invalid vdev configuration
hydra# zpool import 1927227762911526040
cannot import 'storage': invalid vdev configuration

I even tried a "zpool destory storage" but it says the pool doesn't exist!

So can changing the tler setting of a drive change it enough for Zpool to wig out?

netmazk
Jun 15, 2003

roadhead posted:

And I can't mount, import, or really do anything with my array except see this:
...
So can changing the tler setting of a drive change it enough for Zpool to wig out?

I can't recall to what degree FreeBSD's ZFS implementation relies on disk signatures instead of drive numbers (we use glabels on our ZFS arrays), but its possible that you shuffled the drives around and it is "confused" as to what is what.

A quick glance around the OpenSolaris lists suggests that shuffling drives without first exporting the pool can have the same consequence. I would try this now:
# zpool export storage
# zpool import storage

Forcing the export may get it out of the half-state its in and force ZFS to re-taste the disks and learn what goes where. If that fails, you may have to boot a recent OpenSolaris image and mess around with zdb(1).

roadhead
Dec 25, 2001

netmazk posted:

I can't recall to what degree FreeBSD's ZFS implementation relies on disk signatures instead of drive numbers (we use glabels on our ZFS arrays), but its possible that you shuffled the drives around and it is "confused" as to what is what.

A quick glance around the OpenSolaris lists suggests that shuffling drives without first exporting the pool can have the same consequence. I would try this now:
# zpool export storage
# zpool import storage

Forcing the export may get it out of the half-state its in and force ZFS to re-taste the disks and learn what goes where. If that fails, you may have to boot a recent OpenSolaris image and mess around with zdb(1).

I didn't move the drives around, in fact I didn't move the drives at all. Everything is in the same place on the same ports, I just ran wdtler on them, thats the only difference.

I can't export

code:
hydra# zpool import
  pool: storage
    id: 1927227762911526040
 state: UNAVAIL
action: The pool cannot be imported due to damaged devices or data.
config:

        storage     UNAVAIL  insufficient replicas
          raidz2    UNAVAIL  corrupted data
            ad4     ONLINE
            ad6     ONLINE
            ad8     ONLINE
            ad10    ONLINE
            ad12    ONLINE
            ad14    ONLINE
            ad16    ONLINE
            ad18    ONLINE
            ad20    ONLINE
            ad22    ONLINE
hydra# zpool export storage
cannot open 'storage': no such pool

And my ISP took a poo poo on me this afternoon and I had to tether my phone to post this :) Once the cable modem is back on-line I'll get the latest OpenSolaris liveCD and try zdb :)

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
Well you can't export it because it's not imported. Although I can't see why it thinks your vdev is incomplete. That being said, if you don't give a poo poo about any data on the pool, just create a new vdev.

roadhead
Dec 25, 2001

FISHMANPET posted:

Well you can't export it because it's not imported. Although I can't see why it thinks your vdev is incomplete. That being said, if you don't give a poo poo about any data on the pool, just create a new vdev.

And if I care "great shits" about all the data on the pool?

Argh, its all backed up, but none of it is on-line or capable of being pulled faster than 100 megabit (at best), so I would love to save this one if possible, since its over 5 TB of stuff :)

Also "zpool status" says something about not being able to initialize ZFS lib when I run as a non-root user, I remember being able to run zpool before as a non-privileged user, is it because its not mounting or un-related?

ZDB on FreeBSD says

code:
hydra# zdb
cannot open '/boot/zfs/zpool.cache': No such file or directory
and sure enough that file doesn't exist, should it?

roadhead fucked around with this message at 01:40 on Jul 7, 2010

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

roadhead posted:

I have a RaidZ2 Zpool with 10 devices, Western Digital Green Drives.

Wouldn't that be a bad idea?

roadhead
Dec 25, 2001

Bob Morales posted:

Wouldn't that be a bad idea?

I changed the head-parking timing a long time ago, and I believe the array even rebooted and was no worse for the wear.

How changing the TLER is different I am presently un-aware.

Everything was hunky-dory until I tried to make it "better" :(

netmazk
Jun 15, 2003

roadhead posted:


ZDB on FreeBSD says
code:
hydra# zdb
cannot open '/boot/zfs/zpool.cache': No such file or directory
and sure enough that file doesn't exist, should it?

Try running zdb -l /dev/ad4. Repeat for each device. Each drive should successfully display 4 labels which all contain essentially the same information describing the zpool.

roadhead
Dec 25, 2001

netmazk posted:

Try running zdb -l /dev/ad4. Repeat for each device. Each drive should successfully display 4 labels which all contain essentially the same information describing the zpool.

Should I be piping these into files for later perusal, or is the act of querying for the info what I'm after?

ad20 was unique with its Label 2 and Label 3 "failing to unpack" I didn't notice that for any of the other devices, is that bad ?

code:
hydra# zdb -l /dev/ad20
--------------------------------------------
LABEL 0
--------------------------------------------
    version=13
    name='storage'
    state=0
    txg=678556
    pool_guid=1927227762911526040
    hostid=1407561558
    hostname='hydra.home.biggestpos.com'
    top_guid=969465251034111238
    guid=12601938019356116885
    vdev_tree
        type='raidz'
        id=0
        guid=969465251034111238
        nparity=2
        metaslab_array=23
        metaslab_shift=37
        ashift=9
        asize=15002970357760
        is_log=0
        children[0]
                type='disk'
                id=0
                guid=8480783778198015884
                path='/dev/ad4'
                whole_disk=0
                DTL=47
        children[1]
                type='disk'
                id=1
                guid=2948080225588684788
                path='/dev/ad6'
                whole_disk=0
                DTL=46
        children[2]
                type='disk'
                id=2
                guid=9319140863036432533
                path='/dev/ad8'
                whole_disk=0
                DTL=45
        children[3]
                type='disk'
                id=3
                guid=8073044400271224919
                path='/dev/ad10'
                whole_disk=0
                DTL=43
        children[4]
                type='disk'
                id=4
                guid=8460640024122198858
                path='/dev/ad12'
                whole_disk=0
                DTL=49
        children[5]
                type='disk'
                id=5
                guid=1792081462916445300
                path='/dev/ad14'
                whole_disk=0
                DTL=42
        children[6]
                type='disk'
                id=6
                guid=4055537292500072897
                path='/dev/ad16'
                whole_disk=0
                DTL=41
        children[7]
                type='disk'
                id=7
                guid=5980344425067716449
                path='/dev/ad18'
                whole_disk=0
                DTL=40
        children[8]
                type='disk'
                id=8
                guid=12601938019356116885
                path='/dev/ad20'
                whole_disk=0
                DTL=107
        children[9]
                type='disk'
                id=9
                guid=17721033744186541552
                path='/dev/ad22'
                whole_disk=0
                DTL=38
--------------------------------------------
LABEL 1
--------------------------------------------
    version=13
    name='storage'
    state=0
    txg=678556
    pool_guid=1927227762911526040
    hostid=1407561558
    hostname='hydra.home.biggestpos.com'
    top_guid=969465251034111238
    guid=12601938019356116885
    vdev_tree
        type='raidz'
        id=0
        guid=969465251034111238
        nparity=2
        metaslab_array=23
        metaslab_shift=37
        ashift=9
        asize=15002970357760
        is_log=0
        children[0]
                type='disk'
                id=0
                guid=8480783778198015884
                path='/dev/ad4'
                whole_disk=0
                DTL=47
        children[1]
                type='disk'
                id=1
                guid=2948080225588684788
                path='/dev/ad6'
                whole_disk=0
                DTL=46
        children[2]
                type='disk'
                id=2
                guid=9319140863036432533
                path='/dev/ad8'
                whole_disk=0
                DTL=45
        children[3]
                type='disk'
                id=3
                guid=8073044400271224919
                path='/dev/ad10'
                whole_disk=0
                DTL=43
        children[4]
                type='disk'
                id=4
                guid=8460640024122198858
                path='/dev/ad12'
                whole_disk=0
                DTL=49
        children[5]
                type='disk'
                id=5
                guid=1792081462916445300
                path='/dev/ad14'
                whole_disk=0
                DTL=42
        children[6]
                type='disk'
                id=6
                guid=4055537292500072897
                path='/dev/ad16'
                whole_disk=0
                DTL=41
        children[7]
                type='disk'
                id=7
                guid=5980344425067716449
                path='/dev/ad18'
                whole_disk=0
                DTL=40
        children[8]
                type='disk'
                id=8
                guid=12601938019356116885
                path='/dev/ad20'
                whole_disk=0
                DTL=107
        children[9]
                type='disk'
                id=9
                guid=17721033744186541552
                path='/dev/ad22'
                whole_disk=0
                DTL=38
--------------------------------------------
LABEL 2
--------------------------------------------
failed to unpack label 2
--------------------------------------------
LABEL 3
--------------------------------------------
failed to unpack label 3

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

roadhead posted:

And if I care "great shits" about all the data on the pool?

I only brought it up because you said you tried to destroy the pool, so I assumed there wasn't any data on there.

I don't know much about BSD ZFS, but you could try booting an OpenSolaris live CD and doing the import there to see what happens?

roadhead
Dec 25, 2001

FISHMANPET posted:

I only brought it up because you said you tried to destroy the pool, so I assumed there wasn't any data on there.

I don't know much about BSD ZFS, but you could try booting an OpenSolaris live CD and doing the import there to see what happens?

Last time I had troubles with a pool, "destroying" then "zpool import -D" was what fixed it, I don't think its ever really "destroyed" until the disks are assigned to new pools and silvered or something right?


Also I just noticed that the serial number of ad20 is the drive that would not accept new TLER settings (467,xxx and the rest of the drives are 1xx,xxx) - since its a Raidz2 I should be able to lose this drive COMPLETELY (and another!) and still re-silver onto one of my spares right?

roadhead fucked around with this message at 04:32 on Jul 7, 2010

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

roadhead posted:

Last time I had troubles with a pool, "destroying" then "zpool import -D" was what fixed it, I don't think its ever really "destroyed" until the disks are assigned to new pools and silvered or something right?

Jesus I just realized I'm in the BSD thread and not the Home NAS thread :psyduck:

Yeah, a destroy shouldn't actually destroy any data, but you've entered into voodoo territory where nothing makes sense.

netmazk
Jun 15, 2003

roadhead posted:

Also I just noticed that the serial number of ad20 is the drive that would not accept new TLER settings (467,xxx and the rest of the drives are 1xx,xxx) - since its a Raidz2 I should be able to lose this drive COMPLETELY (and another!) and still re-silver onto one of my spares right?

Sounds pretty logical, and the zdb output makes it seem like it's the culprit. Have you tried to 'zpool detach' the drive? I don't think it'll let you if the pool isn't imported, but who knows. If it doesn't, I would shutdown, remove the suspected drive, and start it back up and see if it helps. It can't really hurt at this point. FYI, the second two labels (the ones that are missing) are stored at the end of the disk, rather than the beginning.

roadhead
Dec 25, 2001

netmazk posted:

Sounds pretty logical, and the zdb output makes it seem like it's the culprit. Have you tried to 'zpool detach' the drive? I don't think it'll let you if the pool isn't imported, but who knows. If it doesn't, I would shutdown, remove the suspected drive, and start it back up and see if it helps. It can't really hurt at this point. FYI, the second two labels (the ones that are missing) are stored at the end of the disk, rather than the beginning.

code:
hydra# zpool detach storage /dev/ad20
cannot open 'storage': no such pool
Yea detach isn't going to work I guess, but I'll power down, remove ad20 and put in a spare. It definitely can't hurt at this point :)

code:

hydra# zpool import
  pool: storage
    id: 1927227762911526040
 state: DEGRADED
status: One or more devices are missing from the system.
action: The pool can be imported despite missing or damaged devices.  The
        fault tolerance of the pool may be compromised if imported.
   see: [url]http://www.sun.com/msg/ZFS-8000-2Q[/url]
config:

        storage     DEGRADED
          raidz2    DEGRADED
            ad4     ONLINE
            ad6     ONLINE
            ad8     ONLINE
            ad10    ONLINE
            ad12    ONLINE
            ad14    ONLINE
            ad16    ONLINE
            ad18    ONLINE
            ad20    UNAVAIL  cannot open
            ad22    ONLINE
hydra# zpool import storage
Its still currently "importing" with a DRIVE MISSING - but assuming it imports successfully I should be able to-resilver and be working again, right?

Import finished, and I got this

code:

hydra# zpool status
  pool: storage
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: [url]http://www.sun.com/msg/ZFS-8000-2Q[/url]
 scrub: none requested
config:

        NAME                      STATE     READ WRITE CKSUM
        storage                   DEGRADED     0     0     0
          raidz2                  DEGRADED     0     0     0
            ad4                   ONLINE       0     0     0
            ad6                   ONLINE       0     0     0
            ad8                   ONLINE       0     0     0
            ad10                  ONLINE       0     0     0
            ad12                  ONLINE       0     0     0
            ad14                  ONLINE       0     0     0
            ad16                  ONLINE       0     0     0
            ad18                  ONLINE       0     0     0
            12601938019356116885  UNAVAIL      0 5.00K     0  was /dev/ad20
            ad22                  ONLINE       0     0     0

errors: No known data errors
So at this point I'm thinking shutdown, put a disk back in ad20, and it should figure out the rest right?

roadhead fucked around with this message at 05:23 on Jul 7, 2010

netmazk
Jun 15, 2003

roadhead posted:

So at this point I'm thinking shutdown, put a disk back in ad20, and it should figure out the rest right?

I would take a minute and do a quick wipe of your old "ad20" in another machine. Then plug it back in and treat it just like you are replacing a dead drive with a brand new one.

roadhead
Dec 25, 2001

netmazk posted:

I would take a minute and do a quick wipe of your old "ad20" in another machine. Then plug it back in and treat it just like you are replacing a dead drive with a brand new one.

Yea I tried putting the most recent incarnation of ad20 in there, and it went back to its old "degraded" status :/

Rebooting again without anything in that bay.

So any drive I put in there needs to have the "ZFS Smell" cleaned off first?


With a drive totally missing, I think it even imported on boot this time, I was able to do a "zfs mount storage/stuff" and even get an LS of that filesystem, so everything should be fine as soon as I can get this thing re-silvered onto one of these spares, which I will do tomorrow.

roadhead fucked around with this message at 05:33 on Jul 7, 2010

Only Shallow
Nov 12, 2005

show

netmazk posted:

For $20 its too hard to pass up.

Especially since I borrowed some audio hardware and tried out snd_uaudio:

https://www.youtube.com/watch?v=O7mt5SM6cLM

It would be easy to set one of these up with a web-based MPD frontend.

complex
Sep 16, 2003

Only Shallow posted:

I have FreeBSD 8.1 running on my Seagate DockStar. $20 is a great deal for a little ARM machine that can run pf/SSH/nginx and that uses 6 watts of power.

You totally need to post a how-to. This would be amazing. And it has Gigabit Ethernet! I'm going to buy one today.

Did you run into any problems with the lack of a real-time clock on the Dockstar?

Masked Pumpkin
May 10, 2008
I have an OpenBSD server with OpenVPN set up to accept connections - this part works well. What I would like to do is forward telnet requests from connected VPN clients to a separate internal machine, ideally with the BSD server acting as a proxy so that the receiving server can route packets back properly. I assumed that by using PF and setting ip forwarding on, all would be well, but for some reason nothing is passing through.

Is PF the best option? Is there a simpler way?

SamDabbers
May 26, 2003



Masked Pumpkin posted:

I have an OpenBSD server with OpenVPN set up to accept connections - this part works well. What I would like to do is forward telnet requests from connected VPN clients to a separate internal machine, ideally with the BSD server acting as a proxy so that the receiving server can route packets back properly. I assumed that by using PF and setting ip forwarding on, all would be well, but for some reason nothing is passing through.

Is PF the best option? Is there a simpler way?

If PF alone isn't working for you, try relayd(8).

Only Shallow posted:

I have FreeBSD 8.1 running on my Seagate DockStar. $20 is a great deal for a little ARM machine that can run pf/SSH/nginx and that uses 6 watts of power.

Nth-ing a request for a writeup. This sounds awesome!

SamDabbers fucked around with this message at 16:10 on Jul 7, 2010

Only Shallow
Nov 12, 2005

show

complex posted:

Did you run into any problems with the lack of a real-time clock on the Dockstar?

It hasn't given me any trouble that I've noticed. You can just start ntpd at boot if you have an Internet connection (As long as you don't forget the -g switch!)

code:
 -g      Normally, ntpd exits with a message to the system log if the off-
             set exceeds the panic threshold, which is 1000 s by default.
             This option allows the time to be set to any value without
             restriction; however, this can happen only once.

SamDabbers
May 26, 2003



Only Shallow posted:

It hasn't given me any trouble that I've noticed. You can just start ntpd at boot if you have an Internet connection (As long as you don't forget the -g switch!)

code:
 -g      Normally, ntpd exits with a message to the system log if the off-
             set exceeds the panic threshold, which is 1000 s by default.
             This option allows the time to be set to any value without
             restriction; however, this can happen only once.

Nifty. It's like they integrated ntpdate into ntpd.

Cpt.Wacky
Apr 17, 2005

Masked Pumpkin posted:

I have an OpenBSD server with OpenVPN set up to accept connections - this part works well. What I would like to do is forward telnet requests from connected VPN clients to a separate internal machine, ideally with the BSD server acting as a proxy so that the receiving server can route packets back properly. I assumed that by using PF and setting ip forwarding on, all would be well, but for some reason nothing is passing through.

Is PF the best option? Is there a simpler way?

You probably need some filter rules to allow and redirect that vpn traffic through PF. tcpdump is very useful for troubleshooting firewall problems. Use "tcpdump -nei pflog0" to see blocked traffic, including which rule (from the optimized rules, pfctl -sr to see them) and which interface it was blocked on. From memory, you probably need to pass traffic through tun0, and add a pass/rdr-to to redirect telnet to your internal server.

complex
Sep 16, 2003

SamDabbers posted:

Nifty. It's like they integrated ntpdate into ntpd.

ntpdate has been deprecated for 3+ years. Do not use ntpdate.

netmazk
Jun 15, 2003

Masked Pumpkin posted:

I have an OpenBSD server with OpenVPN set up to accept connections - this part works well. What I would like to do is forward telnet requests from connected VPN clients to a separate internal machine, ideally with the BSD server acting as a proxy so that the receiving server can route packets back properly. I assumed that by using PF and setting ip forwarding on, all would be well, but for some reason nothing is passing through.

Is PF the best option? Is there a simpler way?

PF will do it, if not routing alone. Give us some information as to what the network looks like:
- What internal networks are configured on the OpenBSD server?
- What addresses are being handed out to the VPN clients?
- Are the VPN clients receiving a route to the internal network over the tunnel?

Also, if you do have any blocks in your pf.conf, you will surely want to watch pflog0 with tcpdump as Cpt.Wacky noted.

roadhead
Dec 25, 2001

roadhead posted:

Yea I tried putting the most recent incarnation of ad20 in there, and it went back to its old "degraded" status :/

Rebooting again without anything in that bay.

So any drive I put in there needs to have the "ZFS Smell" cleaned off first?


With a drive totally missing, I think it even imported on boot this time, I was able to do a "zfs mount storage/stuff" and even get an LS of that filesystem, so everything should be fine as soon as I can get this thing re-silvered onto one of these spares, which I will do tomorrow.

Ok When I have a freshly NTFS formatted drive connected up as /dev/ad20 I get UNAVAIL -
code:
hydra# zpool status
  pool: storage
 state: UNAVAIL
 scrub: none requested
config:

        NAME                      STATE     READ WRITE CKSUM
        storage                   UNAVAIL      0     0     0  insufficient replicas
          raidz2                  UNAVAIL      0     0     0  corrupted data
            ad4                   ONLINE       0     0     0
            ad6                   ONLINE       0     0     0
            ad8                   ONLINE       0     0     0
            ad10                  ONLINE       0     0     0
            ad12                  ONLINE       0     0     0
            ad14                  ONLINE       0     0     0
            ad16                  ONLINE       0     0     0
            ad18                  ONLINE       0     0     0
            12601938019356116885  ONLINE       0     0     0  was /dev/ad20
            ad22                  ONLINE       0     0     0

And since the pool isn't actually online, none of my replace/remove commands have any effect.

if I just SLIDE IT OUT with the machine powered on and everything, I at least get DEGRADED status -

code:
hydra# zpool status
  pool: storage
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: [url]http://www.sun.com/msg/ZFS-8000-2Q[/url]
 scrub: none requested
config:

        NAME                      STATE     READ WRITE CKSUM
        storage                   DEGRADED     0     0     0
          raidz2                  DEGRADED     0     0     0
            ad4                   ONLINE       0     0     0
            ad6                   ONLINE       0     0     0
            ad8                   ONLINE       0     0     0
            ad10                  ONLINE       0     0     0
            ad12                  ONLINE       0     0     0
            ad14                  ONLINE       0     0     0
            ad16                  ONLINE       0     0     0
            ad18                  ONLINE       0     0     0
            12601938019356116885  UNAVAIL      0    43     0  was /dev/ad20
            ad22                  ONLINE       0     0     0

errors: No known data errors
hydra# zpool replace -f storage /dev/ad20
cannot open '/dev/ad20': No such file or directory
hydra# zpool replace -f storage 12601938019356116885
cannot open '12601938019356116885': no such GEOM provider
must be a full path or shorthand device name
hydra# zpool replace -f storage ad20
cannot open 'ad20': no such GEOM provider
must be a full path or shorthand device name
but I can't figure out how to get it ready to accept this "new" drive. It IS a different drive than the previous one, with a much lower serial and TLER-able but it was previously part of the array, just not at this spot.

However I did load the drive up in my gaming rig prior, and after running tler-on, I booted into Win 7 did a GPT/Quick NTFS format.

Did I need a full format? Is there something else I can do to start the re-silver manually?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Sometimes I wish I would haven't crushed all of our old 18GB drives from our old servers. I really need to get something setup so I can play with ZFS

:suicide:

roadhead
Dec 25, 2001

Anyone want to tell me what happens if I export the pool in this degraded state, reboot; plug ad20 back in so it can be detected, and then try to import the pool?

Should I be exporting on every shutdown?

netmazk
Jun 15, 2003

roadhead posted:

Anyone want to tell me what happens if I export the pool in this degraded state, reboot; plug ad20 back in so it can be detected, and then try to import the pool?

Should I be exporting on every shutdown?

I'm not sure what that will do. I don't think its going to help. I would use DD to write /dev/zero to the first 100MB of the disk just in case the format didn't reach far enough to catch the second label (I have no idea how big they are...).

While the pool is in the degraded state (without ad20 in the box) try to 'zpool offline' the device by using the unique ID. ZFS will remember that through a reboot, so you should be able to boot the box up with the 'new' ad20 and issue a 'zpool replace 12601938019356116885 /dev/ad20'.

roadhead
Dec 25, 2001

netmazk posted:

I'm not sure what that will do. I don't think its going to help. I would use DD to write /dev/zero to the first 100MB of the disk just in case the format didn't reach far enough to catch the second label (I have no idea how big they are...).

While the pool is in the degraded state (without ad20 in the box) try to 'zpool offline' the device by using the unique ID. ZFS will remember that through a reboot, so you should be able to boot the box up with the 'new' ad20 and issue a 'zpool replace 12601938019356116885 /dev/ad20'.

ok trying to rid this drive of all its labels, it had a complete set as far as I could tell. The first few dd attempts only got the early ones.

code:
dd if=/dev/zero of=/dev/ad20 bs=1M count=1600000
surely nothing on the disk can survive that?

Ok I pulled AD20 and well...

code:

hydra# zpool status
  pool: storage
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: [url]http://www.sun.com/msg/ZFS-8000-2Q[/url]
 scrub: none requested
config:

        NAME                      STATE     READ WRITE CKSUM
        storage                   DEGRADED     0     0     0
          raidz2                  DEGRADED     0     0     0
            ad4                   ONLINE       0     0     0
            ad6                   ONLINE       0     0     0
            ad8                   ONLINE       0     0     0
            ad10                  ONLINE       0     0     0
            ad12                  ONLINE       0     0     0
            ad14                  ONLINE       0     0     0
            ad16                  ONLINE       0     0     0
            ad18                  ONLINE       0     0     0
            12601938019356116885  UNAVAIL      0    56     0  was /dev/ad20
            ad22                  ONLINE       0     0     0

errors: No known data errors
hydra# zpool offline storage 12601938019356116885
cannot offline 12601938019356116885: no valid replicas
hydra# zpool remove storage 12601938019356116885
cannot remove 12601938019356116885: only inactive hot spares or cache devices can be removed
hydra# zpool detach storage 12601938019356116885
cannot detach 12601938019356116885: only applicable to mirror and replacing vdevs
hydra# zpool replace storage 12601938019356116885
cannot open '12601938019356116885': no such GEOM provider
must be a full path or shorthand device name
:/

roadhead fucked around with this message at 03:30 on Jul 8, 2010

netmazk
Jun 15, 2003

roadhead posted:

code:
dd if=/dev/zero of=/dev/ad20 bs=1M count=1600000
surely nothing on the disk can survive that?

What happens if you boot up with the drive in place now? Does the zpool come up or go back to being unavail? If it comes up, just do the replace.

If that doesn't work you may have to borrow/buy a drive to replace ad20. This way the unique id won't match, the pool will be degraded, and you can 'zpool replace 12601938019356116885 /dev/ad20'. Theoretically after that you could swap back to the original ad20 and re-run the replace.

roadhead
Dec 25, 2001

netmazk posted:

What happens if you boot up with the drive in place now? Does the zpool come up or go back to being unavail? If it comes up, just do the replace.

If that doesn't work you may have to borrow/buy a drive to replace ad20. This way the unique id won't match, the pool will be degraded, and you can 'zpool replace 12601938019356116885 /dev/ad20'. Theoretically after that you could swap back to the original ad20 and re-run the replace.

With a drive plugged into that port I still get UNAVAIL.

However the drive still can't shake these two labels.

code:

--------------------------------------------
LABEL 0
--------------------------------------------
failed to unpack label 0
--------------------------------------------
LABEL 1
--------------------------------------------
failed to unpack label 1
--------------------------------------------
LABEL 2
--------------------------------------------
    version=13
    name='storage'
    state=0
    txg=190790
    pool_guid=1927227762911526040
    hostid=1407561558
    hostname='hydra.home.biggestpos.com'
    top_guid=969465251034111238
    guid=3779500033167316302
    vdev_tree
        type='raidz'
        id=0
        guid=969465251034111238
        nparity=2
        metaslab_array=23
        metaslab_shift=37
        ashift=9
        asize=15002928414720
        is_log=0
        children[0]
                type='disk'
                id=0
                guid=8480783778198015884
                path='/dev/ad4'
                whole_disk=0
                DTL=47
        children[1]
                type='disk'
                id=1
                guid=2948080225588684788
                path='/dev/ad6'
                whole_disk=0
                DTL=46
        children[2]
                type='disk'
                id=2
                guid=9319140863036432533
                path='/dev/ad8'
                whole_disk=0
                DTL=45
        children[3]
                type='disk'
                id=3
                guid=8073044400271224919
                path='/dev/ad10'
                whole_disk=0
                DTL=43
        children[4]
                type='disk'
                id=4
                guid=8460640024122198858
                path='/dev/ad12'
                whole_disk=0
                DTL=49
        children[5]
                type='disk'
                id=5
                guid=1792081462916445300
                path='/dev/ad14'
                whole_disk=0
                DTL=42
        children[6]
                type='disk'
                id=6
                guid=4055537292500072897
                path='/dev/ad16'
                whole_disk=0
                DTL=41
        children[7]
                type='disk'
                id=7
                guid=5980344425067716449
                path='/dev/ad18'
                whole_disk=0
                DTL=40
        children[8]
                type='disk'
                id=8
                guid=3779500033167316302
                path='/dev/ad20'
                whole_disk=0
                DTL=39
        children[9]
                type='disk'
                id=9
                guid=17721033744186541552
                path='/dev/ad22'
                whole_disk=0
                DTL=38
--------------------------------------------
LABEL 3
--------------------------------------------
    version=13
    name='storage'
    state=0
    txg=190790
    pool_guid=1927227762911526040
    hostid=1407561558
    hostname='hydra.home.biggestpos.com'
    top_guid=969465251034111238
    guid=3779500033167316302
    vdev_tree
        type='raidz'
        id=0
        guid=969465251034111238
        nparity=2
        metaslab_array=23
        metaslab_shift=37
        ashift=9
        asize=15002928414720
        is_log=0
        children[0]
                type='disk'
                id=0
                guid=8480783778198015884
                path='/dev/ad4'
                whole_disk=0
                DTL=47
        children[1]
                type='disk'
                id=1
                guid=2948080225588684788
                path='/dev/ad6'
                whole_disk=0
                DTL=46
        children[2]
                type='disk'
                id=2
                guid=9319140863036432533
                path='/dev/ad8'
                whole_disk=0
                DTL=45
        children[3]
                type='disk'
                id=3
                guid=8073044400271224919
                path='/dev/ad10'
                whole_disk=0
                DTL=43
        children[4]
                type='disk'
                id=4
                guid=8460640024122198858
                path='/dev/ad12'
                whole_disk=0
                DTL=49
        children[5]
                type='disk'
                id=5
                guid=1792081462916445300
                path='/dev/ad14'
                whole_disk=0
                DTL=42
        children[6]
                type='disk'
                id=6
                guid=4055537292500072897
                path='/dev/ad16'
                whole_disk=0
                DTL=41
        children[7]
                type='disk'
                id=7
                guid=5980344425067716449
                path='/dev/ad18'
                whole_disk=0
                DTL=40
        children[8]
                type='disk'
                id=8
                guid=3779500033167316302
                path='/dev/ad20'
                whole_disk=0
                DTL=39
        children[9]
                type='disk'
                id=9
                guid=17721033744186541552
                path='/dev/ad22'
                whole_disk=0
                DTL=38
So that dd didn't quit get ad20 cleared up?

netmazk
Jun 15, 2003

roadhead posted:

However the drive still can't shake these two labels.

Hop onto AIM. Is the contact in your profile correct?

Only Shallow
Nov 12, 2005

show

Nystral posted:

Can you give me some details on this please? Where can I learn more because searching for Dockstar and BSD isn't working.

netmazk posted:

This would be incredible if you could even dump some brief notes on how to do this here. For $20 its too hard to pass up.

complex posted:

You totally need to post a how-to. This would be amazing. And it has Gigabit Ethernet! I'm going to buy one today.

Did you run into any problems with the lack of a real-time clock on the Dockstar?

SamDabbers posted:

Nth-ing a request for a writeup. This sounds awesome!

http://cooltrainer.org/projects/freebsd-kirkwood/

Let me know if I missed anything :)

Adbot
ADBOT LOVES YOU

Masked Pumpkin
May 10, 2008

SamDabbers posted:

If PF alone isn't working for you, try relayd(8).

Relayd worked like a charm - thanks! Can definitely see myself using it again in the future.

  • Locked thread