Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mounted drives disappear after server reboot

Status
Not open for further replies.

ScottCGI

IS-IT--Management
Dec 20, 2004
141
US
First off, let me say I know very little about linux! We have a brand new linux server with RedHat Enterprise ES 3.0 Standard Edition on it. I have figured out how to mount drives from my linux server to windows servers using this cifs command:

mount -t cifs //servername.domain_name.local/sharename /mnt/mountname \-o user=____,dom=____,password=_______

It works fine BUT they disappear after a reboot. Why is that? What needs to be changed so they will "stick" after a reboot?


Scott




 
What needs to be changed so they will "stick" after a reboot?

Take a look to the file [tt]/etc/fstab[/tt] It tells to linux what filesystem to mount ar boot time.

Cheers.

Chacal, Inc.[wavey]
 
So if my mounts are not in here I need to add them? This is what I have. I dont see my mounted drives.....




# This file is edited by fstab-sync - see 'man fstab-sync' for details

/dev/cciss/c0d0p2 / ext3 defaults 1 1
/dev/cciss/c0d0p1 /boot ext3 defaults 1 2
# RE2: The Following Line May Need Modified
none /dev/pts devpts gid=5,mode=620 0 0
# RE2: The Following Line May Need Modified
none /dev/shm tmpfs defaults 0 0
# RE2: The Following Line May Need Modified
none /proc proc defaults 0 0
# RE2: The Following Line May Need Modified
none /sys sysfs defaults 0 0
# RE2: The Following Line May Need Modified
LABEL=SWAP-cciss/c0d0p swap swap defaults 0 0
/dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0


 
I have two under the /mnt directory.... how do I add them in here?

 
i didn't see that your are trying to put CIFS mounts.

Ok, try to add the following line:

[tt]//servername.domain_name.local/sharename /mnt/mountname cifs user=____,dom=____,password=_______ 0 0
[/tt]



Chacal, Inc.[wavey]
 
fstab is a configuration file which defines your default mounts. It isn't a list of current mounts. Mounts listed there will be automatically mounted at startup unless they have the "noauto" option set.
 
Since /etc/fstab would be a world readable file and you would not want people to see your username & password, you could also create a credentials file under your home or root folder that contains:

username=[your_username]
password=[your_password]

in it. Then you can do:

//servername/sharename /mnt/mountname cifs credentials=[your_credential_file] 0 0

instead.


--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
ok, i will give this a shot. thanx!

scott


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top