Emergency Mode and Local Disk

I have added this entry to my /etc/fstab

/dev/sdb1 /user_data xfs rw 0 0

Which works fine, the issue i am getting it sometime i remove this drive and when i do and reboot my machine it goes into emergency mode.

I have tried adding

/etc/systemd/system/local-fs.target.d/nofail.conf

with
OnFailure= in it but i still get the same result

is there something else i can do to stop this happening

Thanks

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Add the nofail option to your /etc/fstab:

/dev/sdb1 /user_data xfs rw,nofail 0 0

Method 2

The options noauto,x-systemd.automount (in place of rw, which is enabled by default) can be used to attempt to mount the disk only when /user_data is accessed. I do not know whether fsck is invoked first, however.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x