Operating System - Linux
1753792 Members
5780 Online
108799 Solutions
New Discussion юеВ

mounting filesystem on a logical volume

 
brian_31
Super Advisor

mounting filesystem on a logical volume

RHEL5. I am trying to mount a logical volume on /new

[root@cl40 mpath]# vgs
VG #PV #LV #SN Attr VSize VFree
new_vg 1 1 0 wz--n- 100.00G 98.04G
[root@cl40 mpath]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
newvol new_vg -wi--- 1.95G

I have to mount this newvol on new_vg..Coming from HP-UX i am trying a manual mount and it fails..What would be the correct syntax to mount this filesystem manually and also the correct entry in the fstab. i did the following cmd to create filesystem
(mkfs.ext3 /dev/new_vg/newvol) so that it could mount on reboots. Please help.

Thanks

Brian.

3 REPLIES 3
Alzhy
Honored Contributor

Re: mounting filesystem on a logical volume

Assuming you have mkfs.ext[2,3] /dev/new_vg/newvol alerady:

TO manually mount:
mount /dev/new_vg/newvol /mntpnt


Fstab entry:

/dev/new_vg/newvol /mntpnt ext3 defaults 1 2

or

/dev/mapper/new_vg-newvol /mnt ext3 defaults 1 2

or

UUID="90367864-193a-4492-9524-f79db62e690f" /mnt ext3 defaults 1 2


where UUID val is "blkid /dev/new_vg/newvol"

The last form is the best practice.


Hakuna Matata.
brian_31
Super Advisor

Re: mounting filesystem on a logical volume

Thanks Alzhy..

I seem to have lot HP-UX imprints in me and even try to do mkfs on the rlvol (LOL)..But generally the mkfs in linux is it normally done on a logical volume?

Thanks

Brian.
Modris Bremze
Esteemed Contributor

Re: mounting filesystem on a logical volume

Yes. There are no rlvol files for LVs in Linux, just the one lvol, which is the one used to create a file system. The fstab entries Alzhy already correctly described.
If it is still not working - what are the error messages?