Mount LVM on boot

If it doesn't fit in another category, ask it here.
Post Reply
dan223
Posts: 64
Joined: 2006/11/13 18:12:14
Contact:

Mount LVM on boot

Post by dan223 » 2011/08/16 10:16:59

I am wondering how I can mount an LV on boot

I mount it manually by typing mount -t ext3 /dev/VolGroup00/solus /home/solusvm

However I assume it can possibly mounted using fstab? If so what would I put in there? If not how would I get it to mount on boot?

User avatar
TrevorH
Forum Moderator
Posts: 26970
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Mount LVM on boot

Post by TrevorH » 2011/08/16 10:26:44

Yes, you can mount it through /etc/fstab in the normal way. Just put /dev/VolGroup00/solus in the first column where you'd normally put the device name.

dan223
Posts: 64
Joined: 2006/11/13 18:12:14
Contact:

Re: Mount LVM on boot

Post by dan223 » 2011/08/16 10:47:51

Sorry I'm a bit of a Linux noob, on the next part would i put /home/solusvm ? would it basically be /dev/VolGroup00/solus /home/solusvm ext3 defaults 1 2

User avatar
AlanBartlett
Forum Moderator
Posts: 9323
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Mount LVM on boot

Post by AlanBartlett » 2011/08/16 13:21:30

[quote]
dan223 wrote:
Sorry I'm a bit of a Linux noob, on the next part would i put /home/solusvm ? would it basically be /dev/VolGroup00/solus /home/solusvm ext3 defaults 1 2[/quote]
Yes, it could be. However you are the only one who knows your system and what you are attempting to do with it. ;-)

So, please try the following --

[code]
[b]man fstab[/b]
[/code]

dan223
Posts: 64
Joined: 2006/11/13 18:12:14
Contact:

Re: Mount LVM on boot

Post by dan223 » 2011/08/17 13:47:15

Thanks,

I just hoping some can confirm that the below is correct:

/dev/VolGroup00/solus /home/solusvm ext3 defaults 1 2

The left hand side is the LVM, the middle is the area to mount and the file system type, not t sure what the defaults etc is for?

User avatar
TrevorH
Forum Moderator
Posts: 26970
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Mount LVM on boot

Post by TrevorH » 2011/08/17 14:46:56

As [b]Alan[/b] said, `man fstab` is the definitve resource for the format of the file.

But presuming that you want to mount /dev/VolGroup00/solus on /home/solusvm and that the LV contains an ext3 filesystem that you want mounted with the default options then that is correct. If you add the line, umount /home/solusvm then run `mount -a` it will mount it for you as it would during the boot process. If it's syntactically wrong then it will tell you about it as you mount -a.

Post Reply

Return to “CentOS 5 - Miscellaneous Questions”