LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-12-2009, 01:32 PM   #1
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Rep: Reputation: 32
Question about fstab


I have 2 disks on my new machine,and second machine is /dev/sdb1 mounted to /disk1.I unmounted that and formated disk by using LVM,i created first pyshical then volume group and then created two volume partitions with size 150 gb and 20 gb.Rest of space,(disk have 230 gB)will be used when i will be needed.What is bother me now,i see in fstab there is still value
/dev/sdb1 /disk1.Purpose of fstab is to automont partitions right?
So what i would need to is to remove that line(/dev/sdb1 /disk1 ext3 defaults,noatime 0 0)
and replace it with /dev/mapper/volume001 ext3 defaults,noatime 0 0
and add /dev/mapper/volume002 ext3 defaults,noatime 0 0 for every other volume.Also,there wont be any problems caused beacuse entire hard disk space is not used(right now two volume partition of 150 GB and 20 GB)?
 
Old 08-12-2009, 03:30 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Quote:
Originally Posted by JACOBKELL View Post
Purpose of fstab is to automont partitions right?
Not exactly. The main purpose of fstab is to pre-define mount actions, so that you don't have to manually type in complex mount commands all the time. Now by default your system will mount all fstab entries on boot-up (unless "noauto" is added as an option), since the OS needs access to the main system drives at least, but that's not the same thing as an "automount".

Quote:
So what i would need to is to remove that line
(/dev/sdb1 /disk1 ext3 defaults,noatime 0 0)

and replace it with
/dev/mapper/volume001 /disk1 ext3 defaults,noatime 0 0

and add
/dev/mapper/volume002 /newmountpoint ext3 defaults,noatime 0 0
for every other volume.
You need to define a mount point for each drive, as I've flagged above. I'm assuming you want to keep the same mount point from the old settings fort he first partition, but you need to create a new, separate mount point for the other(s).

Quote:
Also,there wont be any problems caused beacuse entire hard disk space is not used(right now two volume partition of 150 GB and 20 GB)?
No, there's no problem with extra undefined space, or even partitioned space. fstab only pays attention to the partitions you configure.

Last edited by David the H.; 08-12-2009 at 03:34 PM.
 
Old 08-14-2009, 08:09 AM   #3
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Ok my old fstab is
PHP Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL
=/boot             /boot                   ext3    defaults        1 2
tmpfs                   
/dev/shm                tmpfs   defaults        0 0
devpts                  
/dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   
/sys                    sysfs   defaults        0 0
proc                    
/proc                   proc    defaults        0 0
LABEL
=SWAP-sda3         swap                    swap    pri=0,defaults        0 0
/dev/sdb1               /disk1                  ext3    defaults,noatime        0 0 
And new one:
PHP Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL
=/boot             /boot                   ext3    defaults        1 2
tmpfs                   
/dev/shm                tmpfs   defaults        0 0
devpts                  
/dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   
/sys                    sysfs   defaults        0 0
proc                    
/proc                   proc    defaults        0 0
LABEL
=SWAP-sda3         swap                    swap    pri=0,defaults        0 0
/dev/vg1/volume1            /volume1                  ext3    defaults,noatime        0 0 
Also i have one more logical volume which i wont add it to fstab or mount ever beacuse it is made for virtual machine.Will that cause any problem?
 
Old 08-14-2009, 02:11 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
No problems at all. Like I said, all fstab does is provide shortcuts for the mount command: "mount device-a at location-b, using configuration c". Then you only need to use "mount device-a" or "mount location-b" to run that command. Read "man mount" for more details.

Or you can mount everything in the file at once with "mount -a" (this is what your system does at startup).

If you can mount your drives like that with no errors, then you're done.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab question cjstm Linux - Newbie 1 12-12-2004 02:46 PM
question about /etc/fstab nny0000 Slackware 6 04-27-2004 07:42 PM
fstab question. buckwheat12 Fedora 6 03-05-2004 06:31 PM
fstab question rayne Linux - Newbie 2 10-04-2002 04:41 PM
i have an fstab question... isajera Linux - General 7 12-21-2001 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:19 PM.

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