gluster / glusterfs

Gluster Filesystem : Build your distributed storage in minutes
https://www.gluster.org
GNU General Public License v2.0
4.72k stars 1.08k forks source link

Feature Request - Write unique identifier to each brick to halt if brick is mounted in incorrect location #4396

Open edrock200 opened 3 months ago

edrock200 commented 3 months ago

This is a rookie mistake on my part, however I had bricks mounting in fstab as /dev/sda1, /dev/sdb1, etc vs UUID. After repairing a host issue, it came back online and re-ordered the /dev/sd* drives, causing some bricks to be flipped/mounted to the wrong paths. Much to my surprise, gluster continued to believe those bricks were correct, and began erasing data on those subvolumes. Would be nice if gluster could write some sort of identifier to each brick to halt if that brick process if the ID doesn't match.

hunter86bg commented 2 months ago

Best practice is to use LVM (which has unique name) or FS UUID when mounting. Then, you should create a directory inside the mountpoint, so if the mount operation has failed (or is readonly) GlusterFS would not be able to use the local storage.

babipanghang commented 3 weeks ago

You can't trust people to always follow best practices i guess. I think an extra verification as suggested by @edrock200 would be useful.

BTW i found LVM (especially thin provisioned) a horrible monstrosity to work with. Why isn't ZFS recommended yet instead of LVM?

hunter86bg commented 3 weeks ago

I guess because it's not tested and most probably doesn't have the proper integration (libraries) with ZFS.