-   Linux - Newbie (
-   -   Mounting a Logical Volume at Boot - fedora 13 (

Skynet091 06-29-2010 11:40 PM

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,

John VV 06-30-2010 01:07 AM

besides the auto mount in fedora ? ( it should just auto set it up in /media )
adding a line to the /etc/fstab ?

alli_yas 06-30-2010 04:18 AM


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:


/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.

16pide 06-30-2010 04:27 AM

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.

alli_yas 06-30-2010 04:37 AM


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).

Skynet091 07-08-2010 09:15 PM

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!!

alli_yas 07-09-2010 04:46 AM


/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:


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

All times are GMT -5. The time now is 04:27 AM.