Link to home
Create AccountLog in
Avatar of expertis
expertisFlag for United States of America

asked on

Reboot CentOS, re-mount external drives

I have the following two mount commands that work fine. However, I don't know how to implement these commands so it always mounts on reboot.  The operating system is CentOS.

mount -t nfs nas:/eng /mnt/httpdocs
mount -t nfs nas:/backup /mnt/backup

Right now I have to run the mount commands after a reboot.

Thanks.
SOLUTION
Avatar of Luxana
Luxana
Flag of Australia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Avatar of Kerem ERSOY
Kerem ERSOY

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of expertis

ASKER

Thanks for the link to the instructions, but I need to make sure I have this absolutely correct before continuing.  So, the instructions say run the following from the command line;
echo "10.1.1.200:/home/nfs /home/nfs_local/ nfs defaults 0 0" >> /etc/fstab

Does this mean I change my commands to;
echo "nas:/eng /mnt/httpdocs nfs" >> /etc/fstab
echo "nas:/backup /mnt/backup nfs" >> /etc/fstab

But what about the '-t' switch? I'm using the '-t' based on instructions from the NAS manufacturer.
It looks like KeremE answered the previous question. Thanks.
> But what about the '-t' switch? I'm using the '-t' based on instructions from the NAS manufacturer.

/etc/fstab has its own format. In fstab you specified type in 3th column which is nfs .
Avatar of Kerem ERSOY
Kerem ERSOY

yr welcome :)
BTW -t (type) is a switch for the mount command but instead you have a special  column to specify the Filesystem type in fstab. So you can savely ignore -t here.
Opps Luxana already answered this. I only saw after posting sorry for duplicate info.