LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-29-2010, 10:40 PM   #1
Skynet091
LQ Newbie
 
Registered: Jun 2010
Posts: 9

Rep: Reputation: 0
Mounting a Logical Volume at Boot - fedora 13


I have a logical volume on my disk that I use for storage/backup.
Is there any way to get it to mount automatically at boot?

Thanks ahead,
 
Old 06-30-2010, 12:07 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
besides the auto mount in fedora ? ( it should just auto set it up in /media )
or
adding a line to the /etc/fstab ?
 
Old 06-30-2010, 03:18 AM   #3
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Hi

Assuming your logical volume is called mylogvol (in a volume group called myvolgroup) and you're mounting on a mount point called mydir; add the following line (you need root priveleges) to /etc/fstab:

Code:
/dev/myvolgroup/mylogvol       /mydir      ext4    defaults        0 0
The above assumes you've formatted an ext4 filesystem on the logical volume.

Thereafter either a reboot or mount -a will have the logical volume mounted.
 
Old 06-30-2010, 03:27 AM   #4
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
my advice is to use fdisk -l to discover your partition.
create a directory as a mount point.
then edit /etc/fstab (just mimic the existing lines)
then issue the mount command just specifying the mount point. If it succeeds it will succeed again after a reboot.
 
Old 06-30-2010, 03:37 AM   #5
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
@16pide

Not a bad summary but consider the OP is using LVM. Thus over and above the partition he/she would need to create volume groups and logical volumes. You then mount the actual logical volume on your mount point (which will be different to an "ordinary" partition).
 
Old 07-08-2010, 08:15 PM   #6
Skynet091
LQ Newbie
 
Registered: Jun 2010
Posts: 9

Original Poster
Rep: Reputation: 0
so i tried editing /etc/fstab and chose as a mount point a folder in my home dir called /home/<...>/Space. I had already added a bunch of music to the partition and it doesn't show up in this folder. the only difference is that if I mount the partition (manually) in it is a folder called Space. here is the content of /etc/fstab (Skynet being the name of my pc)


/dev/mapper/vg_skynet-lv_root / ext4 defaults 1 1
UUID=d0ea18be-a518-4d20-9d12-d0b67fbcabf7 /boot ext4 defaults 1 2
/dev/mapper/vg_skynet-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_skynet-lv_swap swap swap defaults 0 0
/media/space /home/<...>/Space ext4 defaults 0 0
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

thanks ahead everybody!!
 
Old 07-09-2010, 03:46 AM   #7
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Quote:
/media/space /home/<...>/Space ext4 defaults 0 0
OK so I'm assuming that /media/space is a flash drive or some other storage (doesn't really matter).

Before you added that line to /etc/fstab; if you had a directory called /home/<...>/Space in which you placed music; remember this directory would have been by default mounted on the root filesystem.

Now, once you've added this line into fstab and rebooted/mounted; you now have /home/<...>/Space mounted on /media/space - a different filesystem. This is why you no longer see your music in /home/<...>/Space.

If you did something like:

Code:
# umount /home/<...>/Space
And then changed into the directory; you'd find your music is still there.
 
  


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
Having an issue in regards mounting a file system to a logical volume in RHEL5 crathm Linux - Newbie 6 01-28-2009 04:51 PM
Mounting logical volume? jdege Linux - General 3 12-15-2007 05:39 PM
Problem mounting a logical volume with JFS sumta Linux - General 3 10-05-2006 11:49 AM
How can I tell Fedora to activate a non-standard logical volume during boot? PTrenholme Fedora 1 02-26-2006 08:55 AM
cloning both partitions, dual boot system, master boot record, logical volume manager saranga2000 Linux - Hardware 3 01-10-2005 11:04 AM

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

All times are GMT -5. The time now is 11:32 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