So I’m working on a server from home.

I do a cat /sys/class/net/eth0/operstate and it says unknown despite the interface being obviously up, since I’m SSH’ing into the box.

I try to explicitely set the interface up to force the status to say up with ip link set eth0 up. No joy, still unknown.

Hmm… maybe I should bring it down and back up.

So I do ip link set eth0 down and… I drive 15 miles to work to do the corresponding ip link set eth0 up

50 years using Unix and I’m still doing this… 😥

  • moonpiedumplings@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    13 days ago

    Use removedpit by Red Hat. It gives you a GUI to make networking changes*, and will check if the connection still works before making the change. If the connection doesn’t work (like the ip addresses changed), it will undo the change and then warn you. You can then either force the change through or leave it be.

    *via NetworkManager only.

  • twinnie@feddit.uk
    link
    fedilink
    arrow-up
    2
    ·
    14 days ago

    I knew a guy who did this and had to fly to Germany to fix it because he didn’t want to admit what he’d done.

  • Float@startrek.website
    link
    fedilink
    English
    arrow-up
    1
    ·
    14 days ago

    Every network engineer must lock themselves out of a node at some point, it is a rite of passage.

  • InnerScientist@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    14 days ago

    I have a failsafe service for one of my servers, it pings the router and if it hasn’t reached it once for an entire hour then it will reboot the server.

    This won’t save me from all mistakes but it will prevent firewall, link state, routing and a few other issues when I’m not present.

  • mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    13 days ago

    Lol I’ve locked myself out of so many random cloud and remote instances like this that now I always make a sleep chain or a kill timer with tmux/screen.

    Usually like:

    ./risky_dumb_script.sh ; sleep 30 ; ./undo.sh

    Or

    ./risky_dumb.script.sh

    Which starts with a 30 second sleep, and:

    (tmux) sleep 300 ; kill PID

  • apt_install_coffee@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    13 days ago

    A few months ago I accidentally dd’d ~3GiB to the beginning of one of the drives in a 4 drive array… That was fun to rebuild.

    • Like 3 weeks ago on my (testing) server I accidentally DD’d a Linux ISO to the first drive in my storage array (I had some kind of jank manual “LVM” bullshit I set up with odd mountpoints to act as a NAS, do not recommend), no Timeshift, no Btrfs snapshot. It gave me the kick in the pants I needed to stop trying to use a macbook air with 6 external hard drives as a server though. Also gave me the kick in the pants I needed to stop using volatile naming conventions in my fstab.

  • markstos@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    13 days ago

    I was scared to move the cloud for this reason. I was used to running to the server room and the KVM if things went south. If that was frozen, usually unplugging the server physically from the switch would get it calm down.

    Now Amazon supports a direct console interface like KVM and you can virtually unplug virtual servers from their virtual servers too.