We all went through some educational episodes like yours.
Wisdom has to be earned the hard way. If we’re lucky, we’re just given a good scare.
Comment on How I accidentally wiped my server by having a typo in my Nextcloud docker config
plague_sapiens@lemmy.world 1 year ago
Some years ago, being a linux noob, I have created a VM to setup aBitcoin Lightning node. The blockchain is huge and my idea was to passthrough a 2 TB (/dev/sdc). Had to restart my homeserver because of some hoste settings I’ve changed. Didn’t see that sdc changed to sda and sdb (8TB fully encrpyted drive with my smb shares on it(seperate VM) to sdc. So far no problem. Because I didnt’t knew that the device names changed, I started the initilization process which formats the passthrouged HDD. Oh boy, when I heared the 8TB HDD spin up and doing it’s thing, the 2 TB HDD was still in spin-down, I panicked and shut down the server. End of story, 8 TB data was unrecoverable. Never use /dev/sdX device paths, use UUIDs, they exist for a reason. I now know why xD
We all went through some educational episodes like yours.
Wisdom has to be earned the hard way. If we’re lucky, we’re just given a good scare.
Wise words!
Bakkoda@sh.itjust.works 1 year ago
This is absolutely fantastic advice.
yiliu@informis.land 1 year ago
You can label your devices. When formatting, do
mkfs.ext4 -l my-descriptive-name /dev/whatever
. Now, refer to it exclusively by/dev/disk/by-label/my-descriptive-name
. Much harder to mix uphome
andswap
thansdc2
andsdc3
(or, for that matter, two UUIDs).plague_sapiens@lemmy.world 1 year ago
That and permissions are likely the main problem, dependencies are the next xD