testing drives before mount

Kernels & Hardware, configuring network, installing services

testing drives before mount

Postby daggs » 2018-06-18 12:12


I have a server with two hdds on my debian stable server, one is for media sharing and the other is for backups.
my plan is to depend the fs sharing (samba and nfs) on a systemd mount unit for the media drive and depend the backup software on the systemd mount unit for the backups drive.
thing is, I want to make sure that the drive is ok fs wise before mounting it.
how can I instruct systemd to mount the drives only of the fs on them is intact? my biggest concern is for the backup drive which is more important, also it has lot of files thus making every fs check disk rather time consuming.

any ideas?

Posts: 4
Joined: 2018-04-21 16:12

Re: testing drives before mount

Postby daggs » 2018-06-22 03:53

debiman wrote:iiuc, this does what you want:
https://wiki.archlinux.org/index.php/fs ... _partition

thanks, so I add this to the code, the filesystems gets mounted regardless, the file sharing and the backups too and the minute the drive is accessed, the fs will get checked?
if so, does it fixes issues it finds? if not, does it unmounts the fs? if it runs fsck on the drive every boot, it will take along time to check the backup partition (lots of files).
also, noauto will not automount the drive, when it will get mounted? when the folder is accessed?

any ideas regarding these issues?
Posts: 4
Joined: 2018-04-21 16:12

Return to System configuration

Who is online

Users browsing this forum: No registered users and 5 guests