I am using openstack cloud. And using LVM on rhel 7 to manage volumes. As per my usecase i should be able to detach and attach these volumes to different instances.While updating fstab i have used defaults,nofail for now but i am not sure what exatcly i should be using. I am aware of these options:rw, nofail, noatime, discard, defaults But i don't how to use them. what should be the ideal configuration for my usecase ?
when and where to use rw,nofail,noatime,discard,defaults
linux;rhel;fstab;volume
As said by @ilkkachu, if you take a look at the mount(8) manpage, all your doubts should go away. Quoting the manpages:-w, --rw, --read-write   Mount the filesystem read/write. This is the default. A synonym is -o rw.Means: Not needed at all, since rw is the default, and it is part of the defaults optionnofail Do not report errors for this device if it does not exist.Means: If the device is not enable after you boot and mount it using fstab, no errors will be reported. You will need to know if a disk can be ignored if not mounted. Pretty useful on usb drivers, but i see no point on using this on a server...noatime   Do not update inode access times on this filesystem (e.g., for faster access on the    news spool to speed up news servers).Means: No read operation is a pure read operation on filesystems. Even if you only cat file for example, a little write operation will update the last time the inode of this file was accessed. It's pretty useful on some situations(like caching servers), but it can be dangerous if used on sync technologies like Dropbox. I'm no one to judge here what is best for you, if noatime set or ignored...discard/nodiscard   Controls whether ext4 should issue discard/TRIM commands to the underlying block device    when blocks  are  freed.This  is  useful  for  SSD  devices  and  sparse/thinly   -provisioned LUNs, but it is off by default until sufficient testing has been done.Means: TRIM feature from ssds. Take your time to read on this guy, and probe if your ssd support this feature(pretty much all modern ssds suport it). hdparm -I /dev/sdx | grep TRIM supported will tell you if trim is supported on your ssd.defaults  Use default options: rw, suid, dev, exec, auto, nouser, and async.tl;dr: on your question, rw can be removed(defaults already imply rw), nofail is up to you, noatime is up to you, the same way discard is just up to your hardware features.