LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-26-2023, 07:52 PM   #1
Cannondale
Member
 
Registered: Jan 2023
Location: USA
Distribution: Linux Mint
Posts: 41

Rep: Reputation: 1
fstab options


New to Linux and running Mint v21.

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)?
 
Old 02-26-2023, 08:44 PM   #2
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
I don't think you can defaults because that is auto. Just specify all the options you want and noauto.
 
Old 02-26-2023, 08:48 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,403
Blog Entries: 28

Rep: Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166
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.
 
Old 02-26-2023, 09:15 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,822

Rep: Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960
Typically the last option wins so with defaults,noauto the noauto should override auto. I probably would go with specifying all the defaults individually.
 
1 members found this post helpful.
Old 02-26-2023, 09:28 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,403
Blog Entries: 28

Rep: Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166
Thanks, michaelk. I learned something new because of you.
 
Old 02-26-2023, 09:48 PM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,905
Blog Entries: 1

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
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.

Last edited by mrmazda; 02-26-2023 at 09:50 PM.
 
Old 02-27-2023, 12:32 AM   #7
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,844

Rep: Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222
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.
 
Old 02-27-2023, 05:30 AM   #8
Cannondale
Member
 
Registered: Jan 2023
Location: USA
Distribution: Linux Mint
Posts: 41

Original Poster
Rep: Reputation: 1
fstab options

Thanks for all the insight into fstab options. Very helpful and just what I needed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Suse won't boot after fstab changes - fstab not editable baking-a-77 Linux - Newbie 10 06-02-2007 10:51 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
newbie vs fstab. fstab wins :( blop Linux - Newbie 3 01-07-2005 05:54 AM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration