Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219
Rep:
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)?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.