LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-05-2006, 09:42 AM   #1
giokat
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Rep: Reputation: 0
mount drives on start up


i m glad i find this forum, i m total new to linux and i have a problem,
i have a server (debian installed) and it have some hard disks all mirrored in dev/sda1 /test/test1
(i dont use raid)
i have added the disks to test1 dir with this ssh commant :
mount -t xfs /dev/sda1 /test/test1
the problem is that when i m restarting the server its not possible to see the disks and i have to run the commant once more.
how is possible to run this commant on the server start up?
can anyone help with this?
thanks in advance
 
Old 12-05-2006, 10:13 AM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
You need to edit /etc/fstab. Reading the man page on fstab would also be a good idea.
 
Old 12-05-2006, 10:51 AM   #3
Broder
Member
 
Registered: Oct 2006
Location: Santa Barbara, C.A.
Distribution: Mood dependent
Posts: 117

Rep: Reputation: 15
As root, edit the /etc/fstab file. The line that corresponds to your drive will have a 'noauto' entry. Set this to 'auto' and it will mount upon start up.
 
Old 12-05-2006, 11:21 AM   #4
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Rep: Reputation: 55
An example may help. Here's what I have for my /etc/fstab:

Code:
/dev/hda5        swap             swap        defaults         0   0
/dev/hda6        /                ext3        defaults         1   1
/dev/hda1        /fatc            vfat        defaults         1   0
/dev/cdrom       /mnt/cdrom       auto        noauto,user,ro   0   0
/dev/sda1        /mnt/floppy      auto        noauto,user      0   0
/dev/sdb1	 /mnt/stick	  auto	      noauto,user      0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
I have none of the external drives set to mount on startup (See /dev/cdrom/, /dev/sda1 and /dev/sdb1 is set to "noauto" on the 4th column). Setting these to "auto" will mount these drives on startup.

Not to confuse with the "auto" on the 3rd column though... "auto" on the 3rd column means "detect the filesystem automatically"

Last edited by kcirick; 12-05-2006 at 11:22 AM.
 
Old 12-05-2006, 01:38 PM   #5
giokat
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Original Poster
Rep: Reputation: 0
> my /fstab lines looks like this now:


Quote:
> /dev/sdb3 / ext3 defaults,errors=remount-ro 0 1
> /dev/sdb1 /boot ext2 defaults 0 2
> /dev/sdb2 none swap sw 0 0
> /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
> /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
> /dev/sda1 /raid ext3 defaults 0 0

> /dev/sda1 /test/test1 xfs defaults 0 0

i have added the line:
Quote:
> /dev/sda1 /test/test1 xfs defaults 0 0

but i think that i have to move this 1:
Quote:
> /dev/sda1 /raid ext3 defaults 0 0
shall i do it?
 
Old 12-05-2006, 01:53 PM   #6
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
1. What filesystem does your SCSI drive [/dev/sda1] use? It can't be "ext3" and "xfs" in the same time. This means one of the line just won't work. Issuing "fdisk /dev/sda" and pressing "p" will make it clear which filesystem is correct [press "q" to quit the fdisk].
2. Where do you want your SCSI drive to be mounted? If /test/test1 is OK for you and you don't need to have it available from /raid, you can just comment the "/dev/sda1 /raid ext3 defaults 0 0" line out.
Hope it helps

Vitalie CIUBOTARU
 
Old 12-05-2006, 02:07 PM   #7
giokat
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Original Poster
Rep: Reputation: 0
here is what i have

Quote:
Disk /dev/sda: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 267350 2147483647+ ee EFI GPT
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 1) logical=(0, 0, 2)
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(267349, 89, 4)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to mount drives anjum Linux - Software 6 05-01-2005 10:13 AM
Give user permission to mount/use cdrom drives or usb drives zwyrbla Linux - Newbie 2 08-23-2004 04:30 PM
why can't i mount my drives Eradicator Linux - Newbie 4 10-31-2003 09:15 PM
CD Drives doesn't mount by themselves. shankariyer Linux - Software 4 04-02-2002 11:48 AM
mount drives steelrose Linux - Newbie 1 03-01-2002 06:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration