Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Stefano Marinelli
@stefano@mastodon.bsd.cafe  ·  activity timestamp 2 months ago

Tonight I made a simple, yet destructive (or at least partly) mistake: when I told FreeBSD which disk to destroy, I accidentally gave it the system disk of my little home server. This happened because it had the same size as the external SSD I had just plugged in, and I got confused.

I lost some reproducible configurations (the server’s name was in fact tempfbsd01), but I took the chance to run an experiment. My home server runs FreeBSD in read-only mode (that's the part I destroyed). From there, I manually enable the external drives (encrypted with GELI) and, in turn, the ZFS pools. Then I start the various jails and the (single, Proxmox Backup Server) VM.

Since I also have another test box running SmartOS, I decided to experiment: I connected the disks to it, created a FreeBSD bhyve VM on SmartOS, and passed the entire disks through to the VM. I reconfigured the FreeBSD VM with the bare minimum and booted it all up. The jails with BastilleBSD started without any issues - obviously the Proxmox Backup Server VM itself is still missing, but I’ll deal with that later.

I’m tempted to leave everything like this for a while.

And yes, for anyone wondering: I had fun 🙂

#FreeBSD#RunBSD #illumos#SmartOS#DisasterRecovery#IT#SysAdmin#Homelab

  • Copy link
  • Flag this post
  • Block
albert
@albert@mastodon.bsd.cafe replied  ·  activity timestamp 2 months ago
@stefano on my linux laptops it still feels realy strange to write installer images to /dev/sda...
I gues there is a reason why i have heard 'dd' described as 'disk destroyer'...
  • Copy link
  • Flag this comment
  • Block
Stefano Marinelli
@stefano@mastodon.bsd.cafe replied  ·  activity timestamp 2 months ago
@albert ahah i agree!
  • Copy link
  • Flag this comment
  • Block
qwertz
@qwertz@defcon.social replied  ·  activity timestamp 2 months ago
@stefano
Sorry, no caption provided by author
Sorry, no caption provided by author
Sorry, no caption provided by author
  • Copy link
  • Flag this comment
  • Block
Stefano Marinelli
@stefano@mastodon.bsd.cafe replied  ·  activity timestamp 2 months ago
@qwertz 🤣 this is great!
  • Copy link
  • Flag this comment
  • Block
TomAoki
@TomAoki@mastodon.bsd.cafe replied  ·  activity timestamp 2 months ago
@stefano
What I'm doing to avoid this kind of faults is to use labels instead of raw geom and/or drive/partition UUID whenever possible.

Raw geom can change if somehow interfaces connected to the drives are shuffled, and UUID are hard to remember.😅

Labels naming myself (i.e., parttype_interface+num like ESP_N012 for ESP in 12th NVMe drive, Swap_S003 for swap in 3rd SATA drive). Of course, these kind of naming should be defined to make it harder to forget and easier to maintain.

And ZFS on FreeBSD (both legacy ZoF and OpenZFS) accepts partition labels on creating pools. Not sure for other OS'es.

  • Copy link
  • Flag this comment
  • Block
🧊 freezr 🥶
@freezr@friendica.myportal.social replied  ·  activity timestamp 2 months ago
@stefano

Do you wanna fix my laptop too?

I imbecillistically ran rm -R * into / because it was late and I was tired... 😭

  • Copy link
  • Flag this comment
  • Block
chimay
@chimay@mastodon.bsd.cafe replied  ·  activity timestamp 2 months ago
@stefano ouch

what is the usual suspect ?

dd may be ? it's infamous for its disk destroy nickname after all

or a partitioning tool ?

anyway, it's nice to see how one can take advantage of an unfortunate situation

  • Copy link
  • Flag this comment
  • Block
Stefano Marinelli
@stefano@mastodon.bsd.cafe replied  ·  activity timestamp 2 months ago
@chimay the usual suspect=me 😆
I was testing a mfsbsd installation into an external disk. I didn't look at the device names/brands but just the size (I was in a hurry) - forgetting that the internal ssd and the external ones are the same size. I think they're also the same brand, too. So a nice dd before starting, then mfsbsd. It installed - but replacing the internal OS 😆
  • Copy link
  • Flag this comment
  • Block
chimay
@chimay@mastodon.bsd.cafe replied  ·  activity timestamp 2 months ago

@stefano arg, these commands should have a hurry flag, to check if the device is not the root of the running OS. :)

  • Copy link
  • Flag this comment
  • Block
Justin
@justin@toot.io replied  ·  activity timestamp 2 months ago
@stefano I'm glad it was an enjoyable experience. The dread I get when I wipe the wrong thing is painful. I love tools that use more info for drives when doing potentially sensitive things like "Sandisk Ultra 32GB /dev/sdc1" instead of just the /dev/blah.
  • Copy link
  • Flag this comment
  • Block
mkj
@mkj@social.mkj.earth replied  ·  activity timestamp 2 months ago
@stefano I still have semi-nightmares about when I switched to Linux, was having difficulties during the installation (this was back when Red Hat 6.2 was current; no, *not* RHEL 6.2, Red Hat!) and on the umpteenth attempt, I managed to format the wrong disk (as I recall I had two HDDs at the time, one of which was pretty much brand new and held all my files that I wanted to keep).

I did manage to recover much from backups, but I think there's a gap of a few months I never did get back…

  • Copy link
  • Flag this comment
  • Block
visone
@visone@fe.disroot.org replied  ·  activity timestamp 2 months ago
@stefano That one deserve a tattoo on your forehead!!!!
  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.21 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login