|
今天在tubor linux server 7下试验了一下lvm,创建pv,vg,lv都正常,mount后也正常,如下:
[root@turbo2 lvmconf]# vgdisplay
--- Volume group ---
VG Name vg0
VG Access read/write
VG Status available/resizable
VG # 0
MAX LV 256
Cur LV 1
Open LV 0
MAX LV Size 2 TB
Max PV 256
Cur PV 3
Act PV 3
VG Size 68.22 GB
PE Size 32 MB
Total PE 2183
Alloc PE / Size 962 / 30.06 GB
Free PE / Size 1221 / 38.16 GB
VG UUID 21nMd5-4v2S-CW7U-AWPm-pB2d-sOP6-gSnzU9
[root@turbo2 lvmconf]# vgdisplay -v
--- Volume group ---
VG Name vg0
VG Access read/write
VG Status available/resizable
VG # 0
MAX LV 256
Cur LV 1
Open LV 0
MAX LV Size 2 TB
Max PV 256
Cur PV 3
Act PV 3
VG Size 68.22 GB
PE Size 32 MB
Total PE 2183
Alloc PE / Size 962 / 30.06 GB
Free PE / Size 1221 / 38.16 GB
VG UUID 21nMd5-4v2S-CW7U-AWPm-pB2d-sOP6-gSnzU9
--- Logical volume ---
LV Name /dev/vg0/lv01
VG Name vg0
LV Write Access read/write
LV Status available
LV # 1
# open 0
LV Size 30.06 GB
Current LE 962
Allocated LE 962
Allocation next free
Read ahead sectors 1024
Block device 58:0
--- Physical volumes ---
PV Name (#) /dev/sdb1 (1)
PV Status available / allocatable
Total PE / Free PE 609 / 0
PV Name (#) /dev/sdb2 (2)
PV Status available / allocatable
Total PE / Free PE 609 / 256
PV Name (#) /dev/sdb3 (3)
PV Status available / allocatable
Total PE / Free PE 965 / 965
[root@turbo2 lvmconf]# lvdisplay /dev/vg0/lv01
--- Logical volume ---
LV Name /dev/vg0/lv01
VG Name vg0
LV Write Access read/write
LV Status available
LV # 1
# open 0
LV Size 30.06 GB
Current LE 962
Allocated LE 962
Allocation next free
Read ahead sectors 1024
Block device 58:0
[root@turbo2 lvmconf]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda3 10317860 6975596 2818144 72% /
/dev/sda1 62193 11568 47414 20% /boot
/dev/sda4 59147168 13814836 42327776 25% /zxindata
[root@turbo2 lvmconf]# mount /dev/vg0/lv01 /opt
[root@turbo2 lvmconf]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda3 10317860 6975596 2818144 72% /
/dev/sda1 62193 11568 47414 20% /boot
/dev/sda4 59147168 13814836 42327776 25% /zxindata
/dev/vg0/lv01 31028152 285092 29166920 1% /opt
然后我就修改了fstab文件,添加如下一行,让系统启动后自动挂接,
/dev/vg0/lv01 /opt ext2 defaults 1 2
但之后重新启动后就挂接不上,启动不起来。
听我同事说他以前在fedore下边在安装系统的时候使用lvm格式管理,系统就会自动挂接,但他自己创建的lvm添加到fstab后就不能自动mount。
请问高手,还有什么地方需要?? |
|