如何mount LVM volume  

原地址:http://taoyh163.blog.163.com/blog/static/19580356200852885449425/



You do not mount a partition of type "Linux LVM" the same way you mount a partition using a standard Linux file system (e.g. ext2, ext3).

如果连root都不能写的话,就不是权限的问题。
首先确定,hda2是不是ntfs或者什么新型的分区。
如果是的话,确实是不能写入的,ntfs可以打开写入功能,但是相当危险,绝对不推荐。
如果不是,你只要在挂上以后执行:
mount -o remount,rw /mnt/e
或者挂载的时候就执行:
mount -o rw /dev/hda2 /mnt/e
就可以了。

# fdisk -l /dev/hda

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14       19457   156183930   8e  Linux LVM

# mount /dev/hda2 /tmp/mnt
mount: /dev/hda2 already mounted or /tmp/mnt busy

First, let's determine the volume group containing the physical volume /dev/hda2.

# pvs
  PV         VG         Fmt  Attr PSize   PFree
  /dev/hda2  VolGroup01 lvm2 a-   148.94G 32.00M
  /dev/hdb2  VolGroup00 lvm2 a-   114.94G 96.00M

Next, let's list the logical volumes in VolGroup01.

# lvdisplay /dev/VolGroup01
  --- Logical volume ---
  LV Name                /dev/VolGroup01/LogVol00
  VG Name                VolGroup01
  LV UUID                zOQogm-G8I7-a4WC-T7KI-AhWe-Ex3Y-JVzFcR
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                146.97 GB
  Current LE             4703
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:2
  
  --- Logical volume ---
  LV Name                /dev/VolGroup01/LogVol01
  VG Name                VolGroup01
  LV UUID                araUBI-4eer-uh5L-Dvnr-3bI6-4gYg-APgYy2
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.94 GB
  Current LE             62
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:3

The logical volume I would like to "mount" (in purely the computing-related sense) is /dev/VolGroup01/LogVol00. The other logical volume is a swap partition.

# mount /dev/VolGroup01/LogVol00 /tmp/mnt


lvm挂载(mount)处理方式

http://www.imata.cn/7.html



以前特别怕服务器用lvm的方式分区,文档里面都特别要求机房要装ext3分区的,就是因为lvm格式不知道怎么处理,后来仔细想想,没道理后面出的文件系统会比老的系统更难用,这会刚好有个lvm的分区格式的机器在手上,花了一些时间,终于整好了lvm挂载的正确方法:
对LVM分区进行挂载,三步曲,探测到,然后激活,再挂载。
1. 探测VolGroup
#vgscan
2. 激活
# vgchange -a y VolGroup00
3. 挂载
#mount /dev/VolGroup00/LogVol01 /mnt/hdb2
注:按实际情况 ls一下/dev/Vol*


文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 65
发表评论
你没有权限发表评论!