
LVM的基本组成块(building blocks)如下:
物理卷Physical volume (PV):可以在上面建立卷组的媒介,可以是硬盘分区,也可以是硬盘本身或者回环文件(loopback file)。物理卷包括一个特殊的header,其余部分被切割为一块块物理区域(physical extents)。 Think of physical volumes as big building blocks which can be used to build your hard drive.
卷组Volume group (VG):将一组物理卷收集为一个管理单元。Group of physical volumes that are used as storage volume (as one disk). They contain logical volumes. Think of volume groups as hard drives.
逻辑卷Logical volume (LV):虚拟分区,由物理区域(physical extents)组成。A "virtual/logical partition" that resides in a volume group and is composed of physical extents. Think of logical volumes as normal partitions.
物理区域Physical extent (PE):硬盘可供指派给逻辑卷的最小单位(通常为4MB)。A small part of a disk (usually 4MB) that can be assigned to a logical Volume. Think of physical extents as parts of disks that can be allocated to any partition.
因为服务器的文件会越来越大,占用的空间也会越来越多,所以一般采用LVM管理磁盘,可以在日后空间不足的时候,随时添加新硬盘来解决空间问题。
在linux系统中,可以使用mount命令挂载光盘镜像文件、移动硬盘、U盘以及Windows网络共享和UNIXNFS网络共享等。
命令格式:
mount
[-t
vfstype]
[-o
options]
device
dir
参数说明:
①-t
vfstype
指定文件系统的类型,通常不必指定。mount
会自动选择正确的类型。常用类型有:
光盘或光盘镜像:iso9660
DOS
fat16文件系统:msdos
Windows
9x
fat32文件系统:vfat
Windows
NT
ntfs文件系统:ntfs
Mount
Windows文件网络共享:smbfs
UNIX(LINUX)
文件网络共享:nfs
②-o
options
主要用来描述设备或档案的挂接方式。常用的参数有:
loop:用来把一个文件当成硬盘分区挂接上系统
ro:采用只读方式挂接设备
rw:采用读写方式挂接设备
iocharset:指定访问文件系统所用字符集
③device
要挂接(mount)的设备
④dir设备在系统上的挂接点(mount
point)
案例分析:
光盘镜像文件的挂接(mount)
mkdir /mnt/vcdrom
#建立一个目录用来作挂接点(mount point)
mount -o loop -t iso9660 /home/sunky/mydisk.iso /mnt/vcdrom
#使用/mnt/vcdrom就可以访问盘镜像文件mydisk.iso里的所有文件
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)