Skip to content

Instantly share code, notes, and snippets.

@freeubuntu
Last active December 29, 2016 04:10
Show Gist options
  • Save freeubuntu/76f61c3a3cf7ecb666929d12b7d8f4eb to your computer and use it in GitHub Desktop.
Save freeubuntu/76f61c3a3cf7ecb666929d12b7d8f4eb to your computer and use it in GitHub Desktop.
磁盘挂载
pvcreate /dev/sdb
vgcreate VGdata /dev/sdb
lvcreate -l 100%VG -n LVdata VGdata
mkdir /data
mkfs.xfs /dev/mapper/VGdata-LVdata
/dev/mapper/VGdata-LVdata /data xfs defaults 0 0
磁盘如果是普通的分区,比如:ntfs、ext3等,可以直接用 mount -t <type>来制定文件系统类型来挂载,但有时候磁盘是采用的lvm卷的分区,要挂载这类磁盘,就应该按照以下方式:
a. 扫描逻辑卷:
#vgscan
b. 激活扫描到的卷:
#vgchange -a y VolGroup00
c. 挂载
#mount /dev/VolGroup00/lvm_root /mnt
注:/dev/VolGroup00文件夹下面可能会有几个:lvm_root、lvm_swap、lvm_home。根据自己的需要来挂载。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment