日期:2014-05-16  浏览次数:20679 次

linux lvm创建文件系统
以下仅为安装记录
1、创建lv
引用
[root@Linux ~]# lvcreate -L 20480 VolGroup_ID_25519 -n lvdbra
  Logical volume "lvdbra" created

2、创建挂载点
引用
[root@Linux ~]# mkdir /dbra

3、直接挂载或用ext3格式挂载报错 
引用
[root@Linux ~]# mount /dev/VolGroup_ID_25519/lvdbra /dbra
mount: you must specify the filesystem type
 
[root@Linux ~]# mount -t ext3 /dev/VolGroup_ID_25519/lvdbra /dbra
mount: wrong fs type, bad option, bad superblock on /dev/VolGroup_ID_25519/lvdbra,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

      
4、用ext3文件系统格式lv     
引用
[root@Linux ~]# mkfs.ext3 -L lvdbra /dev/VolGroup_ID_25519/lvdbra
mke2fs 1.39 (29-May-2006)
Filesystem label=lvdbra
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2621440 inodes, 5242880 blocks
262144 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
160 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:
done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.


5、mount挂载点
引用
[root@Linux ~]# mount /dev/VolGroup_ID_25519/lvdbra /dbra

6、在/etc/fstab添加条目,随系统自启动
引用
/dev/VolGroup_ID_25519/lvdbra  /dbra                   ext3    defaults        1 2