歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux lvm創建文件系統

Linux lvm創建文件系統

日期:2017/2/28 16:27:23   编辑:Linux教程

以下僅為安裝記錄
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

Copyright © Linux教程網 All Rights Reserved