How to permanently mount a local volume to mnt folder

Issues related to hardware problems
Post Reply
scottbouch
Posts: 14
Joined: 2017/06/30 21:02:16

How to permanently mount a local volume to mnt folder

Post by scottbouch » 2017/11/27 11:33:18

Hi all, (bit new to all this, and have had a good google for my answer before asking)...

I have a 3 drive RAID 5 array I've built using a hardware raid controller configuration (HP Proliant rack mount server with P410i raid controller).

I'm using CentOS 7 with KDE desktop, just downloaded and installed recently, so all up to date. This up-to-date-ness has given me a headache, as with all new Linux versions as they now use systemd, which screws up existing fstab way of mounting drives on boot, making me have to do a sudo mount -a after every reboot as it doesn't get done automatically any more.

My array volume is physically within the server (not a NAS), and is labelled "Store".

I'm aware that the sda sdb etc references can change depending on which volume gets seen first by the OS on boot, so I'm inclined to use a more permanent way of referring to the volume to mount it to /mnt/Store/ such as a volume id (or will use better alternative solution if one is suggested).

I also have two other drives in the machine that I've formatted as individual volumes, plus the OS drive. I'd also like to permanently mount these two extra volumes to /mnt too using the same persistent method, and to be able to see them after a reboot automatically now we're on systemd, like what used to happen before systemd came along.

Over all, it has the following volumes:
250GB 1 drive - OS and software
500GB 1 drive - Backup personal files storage
750GB 1 drive - CCTV storage
6TB 3 drive Raid 5 - "Store" for Plex server media

Any idiots guides are more than welcome! In my googling, I've come across symlinks, binding, some use of fstab, and tricks with systemd.. but am quite lost as to what's best for me to do! Most websites I've seen talk about mounting networked drives, not local drives.

Cheers, Scott.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to permanently mount a local volume to mnt folder

Post by TrevorH » 2017/11/27 13:11:38

Not sure what you mean - /etc/fstab works perfectly still, why would it not?

If it isn't working for you then why not? What errors do you get? If you edit /etc/fstab and add your filesystem to it and then run mount -a what happens?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

scottbouch
Posts: 14
Joined: 2017/06/30 21:02:16

Re: How to permanently mount a local volume to mnt folder

Post by scottbouch » 2017/11/27 13:27:29

Hi Trevor,

Thanks for the advice..

I'll give it a stab using fstab.

My comments were based on an assumption that it wouldn't work, as my other Linux machines (Mint and Manjaro) have given me this issue since the invent of systemd to automatically on boot mount networked drives listed in fstab, but will later mount manually with mount -a.

I had:
a) made the assumption this would be an issue on CentOS too
b) not tried it with local drives on these computers, as it may be CIFS mounts only that struggle.

I will try it by UUID (not sdb etc..) in fstab and report back.

Thanks, Scott.

scottbouch
Posts: 14
Joined: 2017/06/30 21:02:16

Re: How to permanently mount a local volume to mnt folder

Post by scottbouch » 2017/11/27 15:01:49

Hi Trevor, that worked very nicely, thank you.

And it mounted again after a reboot, no issues! I'm now building my PLEX Media Server library from this RAID volume.

So I can only guess the issues I've had may be with CIFS shares not mounting on boot with newer systems that use systemd. maybe I should look into NFS instead.

Thanks, Scott.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: How to permanently mount a local volume to mnt folder

Post by hunter86_bg » 2017/11/28 01:37:51

Systemd is quite smart and it now recognises nfs/nfs4/cifs as network-based filesystems and you no longer requre the '_netdev' option.
For mounting, you have also autofs and systemd's '.mount'/'.automount' units.

Post Reply