Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have created RAID1 device, using mdadm, on a 5 Bay USB Hard Drive Enclosure.
I do not want fstab to mount this RAID device at boot as the USB Hard Drive Enclosure is not always on.
I understand that the fstab "defaults" option is equivalent to rw, suid, dev, exec, auto, nouser, async, which includes auto mounting at boot. Can I use both defaults and noauto (defaults,noauto) together in the same fstab device entry in order for the RAID device not to be amounted at boot or would it better to explicitly list all of the options (rw,suid,dev,exec,noauto,nouser,async)?
I have often customized my fstab, but I've never tried this combination. I would think that using "defaults" and then specifying something that is not a default would not be an optimal action, because it sets up an internal contradiction in fstab.
If I'm wrong, I trust someone more knowledgeable than I will set me straight.
Typically the last option wins so with defaults,noauto the noauto should override auto. I probably would go with specifying all the defaults individually.
AIUI, defaults is purely a placeholder for the options column. It's inert used in conjunction with any specific options. Only using noauto means use all the other defaults, but mounting requires an explicit mount command. Mount -a fails, and automatic mount at boot is not attempted. IIRC, none of my current fstabs include the string defaults anywhere.
The "defaults" is a filler word and does nothing.
It must be there if there is no option, otherwise the column would be empty and the format would be wrong.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.