Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

RH AS v4.0 - LVM2 Mounting Question

Ok I am learning LVM and think I have everything setup correctly on my server.  

- Created my first VG which 70 gig (this is all on a RAID5)
- Created two LV's in this 10 gig a piece
- Created ext3 filesystem on both LV's
- Can mount them manually via: mount -t ext3

Problem is these do not get mounted on startup.. do I add this to fstab ? or were should I go for this...

Thank you!

0
akant74
Asked:
akant74
  • 3
  • 2
1 Solution
 
wesly_chenCommented:
>  do I add this to fstab ?
Yes, you need to modify your /etc/fstab to mount your LVM.
Say your LVMs are
/dev/vg1/lv01    mount on /data1
/dev/vg1/lv02    mount on /data2

Then add the following lines to /etc/fstab
/dev/vg1/lv01  /data1  ext3 defaults 1 2
/dev/vg1/lv02  /data2  ext3 defaults 1 2

Regards,

Wesly
0
 
akant74Author Commented:

/dev/vg1/lv01  /data1  ext3 defaults 1 2
/dev/vg1/lv02  /data2  ext3 defaults 1 2


OK i am stupid what do "defaults" and "1 2" refer to?


Thanks



0
 
wesly_chenCommented:
"defaults" is default mount options.

/etc/fstab
<device>      <mountpoint>    <filesystemtype><options>  <dump> <fsckorder>
/dev/vg1/lv01  /data1              ext3                   defaults         1           2

For more details, do
man fstab
0
 
akant74Author Commented:
I edited the fstab file directly and all worked well and was able to mount to LV's very very cool.  So it is ok to edit fstab with nano or the like?  I think I read something about fstab-sync?  Thank you!

0
 
wesly_chenCommented:
> it is ok to edit fstab with nano or the like?
Sure. Any editor on Linux is ok.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now