当前位置: 首页 > news >正文

前端学校网站开发视频教程北京定制网站开发

前端学校网站开发视频教程,北京定制网站开发,用dede做网站去掉版权,wordpress 3.9.1下载在Linux平台一部分存储产品使用操作系统自带的多路径软件#xff0c;包括最常见的HP和IBM的部分存储产品#xff0c;在Linux自带的多路径软件叫做multipath#xff0c;这篇文章以HP EVA系列存储在Linux平台的使用为例#xff0c;详细的在Linux平台配置和使用多路径。 那么问…在Linux平台一部分存储产品使用操作系统自带的多路径软件包括最常见的HP和IBM的部分存储产品在Linux自带的多路径软件叫做multipath这篇文章以HP EVA系列存储在Linux平台的使用为例详细的在Linux平台配置和使用多路径。   那么问题就来了到底什么是多路径 普通的电脑主机都是一个硬盘挂接到一个总线上这里是一对一的关系。而到了有光纤组成的SAN环境或者由iSCSI组成的IPSAN环境由于主机和存储通过了光纤交换机或者多块网卡及IP来连接这样的话就构成了多对多的关系。也就是说主机到存储可以有多条路径可以选择。主机到存储之间的IO由多条路径可以选择。每个主机到所对应的存储可以经过几条不同的路径如果是同时使用的话I/O流量如何分配其中一条路径坏掉了如何处理从在操作系统的角度来看每条路径操作系统会认为是一个实际存在的物理盘但实际上只是通向同一个物理盘的不同路径而已这样是在使用的时候就给用户带来了困惑。多路径软件就是为了解决上面的问题应运而生的。   多路径的主要功能就是和存储设备一起配合实现如下功能 1、故障的切换和恢复 2、IO流量的负载均衡 3、磁盘的虚拟化     由于多路径软件是需要和存储在一起配合使用的不同的厂商基于不同的操作系统都提供了不同的版本。并且有的厂商软件和硬件也不是一起卖的如果要使用多路径软件的话可能还需要向厂商购买license才行。比如EMC公司基于linux下的多路径软件就需要单独的购买license。好在 RedHat和Suse的2.6的内核中都自带了免费的多路径软件包并且可以免费使用同时也是一个比较通用的包可以支持大多数存储厂商的设备即使是一些不是出名的厂商通过对配置文件进行稍作修改也是可以支持并运行的很好的。     一、Linux下multipath介绍 在redhat中安装操作系统的时候multipath已经默认被安装查看安装情况 [rootseaing ~]# rpm -qa | grep device-mapper device-mapper-multipath-0.4.7-34.el5 device-mapper-1.02.39-1.el5 device-mapper-1.02.39-1.el5 device-mapper-event-1.02.39-1.el5   1、device-mapper-multipath即multipath-tools。主要提供multipathd和multipath等工具和 multipath.conf等配置文件。这些工具通过device mapper的ioctr的接口创建和配置multipath设备调用device-mapper的用户空间库。创建的多路径设备会在/dev /mapper中。2、 device-mapper主要包括两大部分内核部分和用户部分。内核部分主要由device mapper核心dm.ko和一些target drivermd-multipath.ko。核心完成设备的映射而target根据映射关系和自身特点具体处理从mappered device 下来的i/o。同时在核心部分提供了一个接口用户通过ioctr可和内核部分通信以指导内核驱动的行为比如如何创建mappered device这些divece的属性等。linux device mapper的用户空间部分主要包括device-mapper这个包。其中包括dmsetup工具和一些帮助创建和配置mappered device的库。这些库主要抽象封装了与ioctr通信的接口以便方便创建和配置mappered device。multipath-tool的程序中就需要调用这些库。 3、dm-multipath.ko和dm.kodm.ko是device mapper驱动。它是实现multipath的基础。dm-multipath其实是dm的一个target驱动。 4、scsi_id 包含在udev程序包中可以在multipath.conf中配置该程序来获取scsi设备的序号。通过序号便可以判断多个路径对应了同一设备。这个是多路径实现的关键。scsi_id是通过sg驱动向设备发送EVPD page80或page83 的inquery命令来查询scsi设备的标识。但一些设备并不支持EVPD 的inquery命令所以他们无法被用来生成multipath设备。但可以改写scsi_id为不能提供scsi设备标识的设备虚拟一个标识符并输出到标准输出。multipath程序在创建multipath设备时会调用scsi_id从其标准输出中获得该设备的scsi id。在改写时需要修改scsi_id程序的返回值为0。因为在multipath程序中会检查该直来确定scsi id是否已经成功得到。 二、Linux下multipath详细配置 首先我们本次Linux下multipath的整体的拓扑结构如下所示  因为在安装操作系统的时候multipath的软件包已经那装好了所以这里就不在需要安装如果没有安装的话需要手动的进行安装。   1、检查安装是否正常 [rootseaing ~]# lsmod |grep dm_multipath dm_multipath           56921  2 dm_round_robin scsi_dh                42177  1 dm_multipath dm_mod                101649  19 dm_multipath,dm_raid45,dm_snapshot,dm_zero,dm_mirror,dm_log   如果模块没有加载成功请使用下面的命令初始化DM [rootseaing ~]#modprobe dm-multipath [rootseaing ~]#modprobe dm-round-robin [rootseaing ~]#service multipathd start [rootseaing ~]#multipath –v2   2、编辑配置文件 [rootseaing ~]# cat /etc/multipath.conf blacklist {         devnode ^sda         }   defaults {         user_friendly_names no         }   multipaths {         multipath {                 wwid                    3600508b4000892b90002a00000050000 #磁盘的WWID                 alias                   comsys-dm0  #映射后的别名自己命名                 path_grouping_policy    multibus    #路径组策略                 path_checker            tur         #决定路径状态的方法                 path_selector           round-robin 0  #选择那一条路径进行下次IO操作                 }           multipath {                 wwid                    3600508b4000892b90002a00000090000                 alias                   comsys-dm1                 path_grouping_policy    multibus                 path_checker            tur                 path_selector           round-robin 0                 }           multipath {                 wwid                    3600508b4000892b90002a00000140000                 alias                   comsys-backup                 path_grouping_policy    multibus                 path_checker            tur                 path_selector           round-robin 0                 }         }   devices {         device {                 vendor                  HP                                #厂商名称可通过multipath –v3获取到                 product                 HSV300                            #产品型号                 path_grouping_policy    multibus                            #默认的路径组策略                 getuid_callout          /sbin/scsi_id -g -u -s /block/%n  #获得唯一设备号使用的默认程序                 path_checker            readsector0                         #决定路径状态的方法                 path_selector           round-robin 0                     #选择那条路径进行下一个IO操作的方法                   #failback        immediate                                #故障恢复的模式         #no_path_retry      queue                                           #在disable queue之前系统尝试使用失效路径的次数的数值         #rr_min_io         100                                              #在当前的用户组中在切换到另外一条路径之前的IO请求的数目                   }         }   备注 其中 wwidvendorproduct getuid_callout这些参数可以通过multipath -v3命令来获取。如果在/etc/multipath.conf中有设定各wwid别名,别名会覆盖此设定。   下面是两种方法来获取WWID1默认情况下将使用 /var/lib/multipath/bindings 内的配置设定具体每个多路径设备名如果在/etc/multipath.conf中有设定各wwid 别名别名会覆盖此设定。[rootseaing ~]# cat /var/lib/multipath/bindings# Multipath bindings, Version : 1.0# NOTE: this file is automatically maintained by the multipath program.# You should not need to edit this file in normal circumstances.## Format:# alias wwid#mpath0 SATA_WDC_WD5003ABYX-_WD-WMAYP4135415mpath1 3600508b4000892b90002a00000050000mpath2 3600508b4000892b90002a000000900002通过multipath -v3命令来获取 [rootseaing ~]# multipath -v3   下面是相关参数的标准文档的介绍 Attribute Description wwid Specifies the WWID of the multipath device to which themultipath attributes apply. This parameter is mandatory for this section of themultipath.conf file. alias Specifies the symbolic name for the multipath device to which themultipath attributes apply. If you are usinguser_friendly_names, do not set this value tompathn; this may conflict with an automatically assigned user friendly name and give you incorrect device node names. path_grouping_policy Specifies the default path grouping policy to apply to unspecified multipaths. Possible values include: failover  1 path per priority group multibus  all valid paths in 1 priority group group_by_serial  1 priority group per detected serial number group_by_prio  1 priority group per path priority value group_by_node_name  1 priority group per target node name   path_selector Specifies the default algorithm to use in determining what path to use for the next I/O operation. Possible values include: round-robin 0: Loop through every path in the path group, sending the same amount of I/O to each. queue-length 0: Send the next bunch of I/O down the path with the least number of outstanding I/O requests. service-time 0: Send the next bunch of I/O down the path with the shortest estimated service time, which is determined by dividing the total size of the outstanding I/O to each path by its relative throughput.   failback Manages path group failback. A value of immediate specifies immediate failback to the highest priority path group that contains active paths. A value of manual specifies that there should not be immediate failback but that failback can happen only with operator intervention. A value of followover specifies that automatic failback should be performed when the first path of a path group becomes active. This keeps a node from automatically failing back when another node requested the failover. A numeric value greater than zero specifies deferred failback, expressed in seconds.   prio Specifies the default function to call to obtain a path priority value. For example, the ALUA bits in SPC-3 provide an exploitableprio value. Possible values include: const: Set a priority of 1 to all paths. emc: Generate the path priority for EMC arrays. alua: Generate the path priority based on the SCSI-3 ALUA settings. tpg_pref: Generate the path priority based on the SCSI-3 ALUA settings, using the preferred port bit. ontap: Generate the path priority for NetApp arrays. rdac: Generate the path priority for LSI/Engenio RDAC controller. hp_sw: Generate the path priority for Compaq/HP controller in active/standby mode. hds: Generate the path priority for Hitachi HDS Modular storage arrays.   no_path_retry A numeric value for this attribute specifies the number of times the system should attempt to use a failed path before disabling queueing. A value of fail indicates immediate failure, without queueing. A value of queue indicates that queueing should not stop until the path is fixed.   rr_min_io Specifies the number of I/O requests to route to a path before switching to the next path in the current path group. This setting is only for systems running kernels older that 2.6.31. Newer systems should userr_min_io_rq. The default value is 1000. rr_min_io_rq Specifies the number of I/O requests to route to a path before switching to the next path in the current path group, using request-based device-mapper-multipath. This setting should be used on systems running current kernels. On systems running kernels older than 2.6.31, use rr_min_io. The default value is 1. rr_weight If set to priorities, then instead of sending rr_min_iorequests to a path before calling path_selector to choose the next path, the number of requests to send is determined byrr_min_io times the paths priority, as determined by theprio function. If set to uniform, all path weights are equal. flush_on_last_del If set to yes, then multipath will disable queueing when the last path to a device has been deleted.     3、启动multipathd服务并设置其自动启动 [rootseaing ~]#service multipathd restart [rootseaing ~]#chkconfig --level 345 multipathd on [rootseaing ~]#chkconfig --list | grep multipathd   4、检查multipath聚合后的设备名以及设备对应的链路情况 [rootseaing ~]# multipath -ll comsys-dm1 (3600508b4000892b90002a00000090000) dm-3 HP,HSV300 [size200G][features0][hwhandler0][rw] \_ round-robin 0 [prio4][active]  \_ 4:0:0:2 sdc 8:32  [active][ready]  \_ 4:0:1:2 sdf 8:80  [active][ready]  \_ 5:0:0:2 sdi 8:128 [active][ready]  \_ 5:0:1:2 sdl 8:176 [active][ready] comsys-dm0 (3600508b4000892b90002a00000050000) dm-2 HP,HSV300 [size100G][features0][hwhandler0][rw] \_ round-robin 0 [prio4][active]  \_ 4:0:0:1 sdb 8:16  [active][ready]  \_ 4:0:1:1 sde 8:64  [active][ready]  \_ 5:0:0:1 sdh 8:112 [active][ready]  \_ 5:0:1:1 sdk 8:160 [active][ready] comsys-backup (3600508b4000892b90002a00000140000) dm-4 HP,HSV300 [size100G][features0][hwhandler0][rw] \_ round-robin 0 [prio4][active]  \_ 4:0:0:3 sdd 8:48  [active][ready]  \_ 4:0:1:3 sdg 8:96  [active][ready]  \_ 5:0:0:3 sdj 8:144 [active][ready]  \_ 5:0:1:3 sdm 8:192 [active][ready]   5、检查配置是否成功 如果配置正确的话就会在/dev/mapper/目录下多出mpath0、mpath1自动分配的名称等之类设备但是因为作者在配置的时候起了别名所以会使用别名来代替自动分配的名称 [rootseaing ~]# ll /dev/mapper/ total 0 brw-rw---- 1 root disk 253,  4 Oct 26 14:30 comsys-backup brw-rw---- 1 root disk 253,  2 Oct 26 14:30 comsys-dm0 brw-rw---- 1 root disk 253,  3 Oct 26 14:30 comsys-dm1 crw------- 1 root root  10, 63 Oct 26 14:30 control brw-rw---- 1 root disk 253,  0 Oct 26 14:30 VolGroup00-LogVol00 brw-rw---- 1 root disk 253,  1 Oct 26 14:30 VolGroup00-LogVol01     用fdisk -l命令可以看到多路径软件创建的磁盘如下图中的/dev/dm-[0-3] [rootseaing ~]# fdisk -l Disk /dev/dm-2: 107.3 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units cylinders of 16065 * 512 8225280 bytes   Disk /dev/dm-2 doesnt contain a valid partition table   Disk /dev/dm-3: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 cylinders Units cylinders of 16065 * 512 8225280 bytes   Disk /dev/dm-3 doesnt contain a valid partition table   Disk /dev/dm-4: 107.3 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units cylinders of 16065 * 512 8225280 bytes   Disk /dev/dm-4 doesnt contain a valid partition table   [rootseaing ~]# ll /dev/mpath/ total 0 lrwxrwxrwx 1 root root 7 Oct 26 14:30 comsys-backup - ../dm-4 lrwxrwxrwx 1 root root 7 Oct 26 14:30 comsys-dm0 - ../dm-2 lrwxrwxrwx 1 root root 7 Oct 26 14:30 comsys-dm1 - ../dm-3   multipath基本操作命令 [rootseaing ~]#/etc/init.d/multipathd start #开启mulitipath服务 [rootseaing ~]#multipath -F                   #删除现有路径 [rootseaing ~]#multipath -v2                  #格式化路径 [rootseaing ~]#multipath -ll                  #查看多路径   三、multipath的使用案例 要对多路径软件生成的磁盘进行操作直接操作/dev/mapper/目录下的磁盘就行。在对多路径软件生成的磁盘进行分区之前最好运行一下pvcreate命令: [rootseaing ~]# pvcreate /dev/mapper/comsys-dm0   Physical volume /dev/mapper/comsys-dm0 successfully created [rootseaing ~]# [rootseaing ~]# pvs   PV         VG         Fmt  Attr PSize   PFree    /dev/dm-2             lvm2 --   100.00G 100.00G   /dev/sda2  VolGroup00 lvm2 a-   465.66G      0   [rootseaing ~]# fdisk /dev/mapper/comsys-dm0 Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content wont be recoverable.     The number of cylinders for this disk is set to 13054. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs    (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)   Command (m for help): n Command action    e   extended    p   primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-13054, default 1): Using default value 1 Last cylinder or size or sizeM or sizeK (1-13054, default 13054): 10G   Command (m for help): p   Disk /dev/mapper/comsys-dm0: 107.3 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units cylinders of 16065 * 512 8225280 bytes                     Device Boot      Start         End      Blocks   Id  System /dev/mapper/comsys-dm0p1               1        1217     9775521   83  Linux   Command (m for help): n Command action    e   extended    p   primary partition (1-4) p Partition number (1-4): 2 First cylinder (1218-13054, default 1218): Using default value 1218 Last cylinder or size or sizeM or sizeK (1218-13054, default 13054): 20G   Command (m for help): p   Disk /dev/mapper/comsys-dm0: 107.3 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units cylinders of 16065 * 512 8225280 bytes                     Device Boot      Start         End      Blocks   Id  System /dev/mapper/comsys-dm0p1               1        1217     9775521   83  Linux /dev/mapper/comsys-dm0p2            1218        3650    19543072  83  Linux   Command (m for help): w The partition table has been altered!   Calling ioctl() to re-read partition table.   WARNING: Re-reading the partition table failed with error 22: Invalid argument. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks.   用fdisk对多路径软件生成的磁盘进行分区保存时会有一个报错,此报错不用理会。    [rootseaing ~]# fdisk -l fdisk对多路径软件生成的磁盘进行分区之后所生成的磁盘分区并没有马上添加到/dev/目录下此时我们要重启IPSAN或者FCSAN的驱动如果是用iscsi-initiator来连接IPSAN的重启ISCSI服务就可以发现所生成的磁盘分区了如果是FCSAN的话需要重新启动操作系统才能识别到。   [rootseaing ~]# ll /dev/dm* brw-rw---- 1 root root 253, 2 Oct 26 14:20 /dev/dm-2 brw-rw---- 1 root root 253, 3 Oct 26 14:15 /dev/dm-3 brw-rw---- 1 root root 253, 4 Oct 26 14:15 /dev/dm-4 [rootseaing ~]# [rootseaing ~]# ll /dev/mapper/ total 0 brw-rw---- 1 root disk 253,  4 Oct 26 14:15 comsys-backup brw-rw---- 1 root disk 253,  2 Oct 26 14:22 comsys-dm0 brw-rw---- 1 root disk 253,  3 Oct 26 14:15 comsys-dm1 crw------- 1 root root  10, 63 Oct 26 14:15 control brw-rw---- 1 root disk 253,  0 Oct 26 14:15 VolGroup00-LogVol00 brw-rw---- 1 root disk 253,  1 Oct 26 14:15 VolGroup00-LogVol01   重启操作系统之后   如下的comsys-dm0p1和comsys-dm0p2就是我们对multipath磁盘进行的分区 [rootseaing ~]# ll /dev/mapper/ total 0 brw-rw---- 1 root disk 253,  4 Oct 26 14:30 comsys-backup brw-rw---- 1 root disk 253,  2 Oct 26 14:30 comsys-dm0 brw-rw---- 1 root disk 253,  5 Oct 26 14:35 comsys-dm0p1 brw-rw---- 1 root disk 253,  6 Oct 26 14:30 comsys-dm0p2 brw-rw---- 1 root disk 253,  3 Oct 26 14:30 comsys-dm1 crw------- 1 root root  10, 63 Oct 26 14:30 control   [rootseaing ~]# ll /dev/dm* brw-rw---- 1 root root 253, 2 Oct 26 14:30 /dev/dm-2 brw-rw---- 1 root root 253, 3 Oct 26 14:30 /dev/dm-3 brw-rw---- 1 root root 253, 4 Oct 26 14:30 /dev/dm-4 brw-rw---- 1 root root 253, 5 Oct 26 14:30 /dev/dm-5 brw-rw---- 1 root root 253, 6 Oct 26 14:30 /dev/dm-6   [rootseaing ~]# ll /dev/mpath/ total 0 lrwxrwxrwx 1 root root 7 Oct 26 14:30 comsys-backup - ../dm-4 lrwxrwxrwx 1 root root 7 Oct 26 14:30 comsys-dm0 - ../dm-2 lrwxrwxrwx 1 root root 7 Oct 26 14:30 comsys-dm0p1 - ../dm-5 lrwxrwxrwx 1 root root 7 Oct 26 14:30 comsys-dm0p2 - ../dm-6 lrwxrwxrwx 1 root root 7 Oct 26 14:30 comsys-dm1 - ../dm-3   [rootseaing ~]# fdisk -l Disk /dev/dm-5: 10.0 GB, 10010133504 bytes 255 heads, 63 sectors/track, 1216 cylinders Units cylinders of 16065 * 512 8225280 bytes   Disk /dev/dm-5 doesnt contain a valid partition table   Disk /dev/dm-6: 20.0 GB, 20012106240 bytes 255 heads, 63 sectors/track, 2433 cylinders Units cylinders of 16065 * 512 8225280 bytes   Disk /dev/dm-6 doesnt contain a valid partition table     对comsys-dm0p1分区格式化成ext3文件系统   [rootseaing ~]# mkfs.ext3 /dev/mapper/comsys-dm0p1 mke2fs 1.39 (29-May-2006) Filesystem label OS type: Linux Block size4096 (log2) Fragment size4096 (log2) 1224000 inodes, 2443880 blocks 122194 blocks (5.00%) reserved for the super user First data block0 Maximum filesystem blocks2503999488 75 block groups 32768 blocks per group, 32768 fragments per group 16320 inodes per group Superblock backups stored on blocks:         32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632   Writing inode tables: done                            Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done   This filesystem will be automatically checked every 27 mounts or 180 days, whichever comes first.  Use tune2fs -c or -i to override. [rootseaing ~]# [rootseaing ~]# [rootseaing ~]# df -h Filesystem            Size  Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00                       434G  8.4G  404G   3% / /dev/sda1              99M   18M   77M  19% /boot tmpfs                 7.9G     0  7.9G   0% /dev/shm /software/rhel5.5-x86_64.iso                       3.5G  3.5G     0 100% /mnt/dvd     将/dev/mapper/comsys-dm0p1挂载到/comsys目录下 [rootseaing ~]# mount /dev/mapper/comsys-dm0p1 /comsys/ [rootseaing ~]# [rootseaing ~]# df -h Filesystem            Size  Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00                       434G  8.4G  404G   3% / /dev/sda1              99M   18M   77M  19% /boot tmpfs                 7.9G     0  7.9G   0% /dev/shm /software/rhel5.5-x86_64.iso                       3.5G  3.5G     0 100% /mnt/dvd /dev/mapper/comsys-dm0p1                       9.2G  150M  8.6G   2% /comsys   当然也可以将磁盘创建成物理卷然后在物理卷基础上创建卷组然后创建逻辑卷最后在格式化成文件系统进行挂载下面的案例就是通过这种方法实现的注意下面的案例与上面的案例并没有联系读者朋友请注意 [rootseaing ~]# ll /dev/mapper/ total 0 brw-rw---- 1 root disk 253,  4 Oct 25 11:14 comsys-backup brw-rw---- 1 root disk 253,  2 Oct 25 11:14 comsys-dm0 brw-rw---- 1 root disk 253,  5 Oct 25 11:14 comsys-dm0p1 brw-rw---- 1 root disk 253,  6 Oct 25 11:14 comsys-dm0p2 brw-rw---- 1 root disk 253,  7 Oct 25 11:14 comsys-dm0p3 brw-rw---- 1 root disk 253,  3 Oct 25 11:14 comsys-dm1 crw------- 1 root root  10, 63 Oct 25 11:14 control brw-rw---- 1 root disk 253,  0 Oct 25 11:14 VolGroup00-LogVol00 brw-rw---- 1 root disk 253,  1 Oct 25 11:14 VolGroup00-LogVol01 [rootseaing ~]# [rootseaing ~]# [rootseaing ~]# mkdir /backup [rootseaing ~]# [rootseaing ~]# mount /dev/mapper/comsys-backup /backup mount: you must specify the filesystem type   [rootseaing ~]# pvs   PV         VG         Fmt  Attr PSize   PFree   /dev/sda2  VolGroup00 lvm2 a-   465.66G    0 [rootseaing ~]# [rootseaing ~]# vgs   VG         #PV #LV #SN Attr   VSize   VFree   VolGroup00   1   2   0 wz--n- 465.66G    0 [rootseaing ~]# [rootseaing ~]# lvs   LV       VG         Attr   LSize   Origin Snap%  Move Log Copy%  Convert   LogVol00 VolGroup00 -wi-ao 448.03G                                         LogVol01 VolGroup00 -wi-ao  17.62G                                      [rootseaing ~]# [rootseaing ~]# pvcreate /dev/mapper/comsys-backup   Physical volume /dev/mapper/comsys-backup successfully created [rootseaing ~]# [rootseaing ~]# pvs   PV         VG         Fmt  Attr PSize   PFree    /dev/dm-4             lvm2 --   100.00G 100.00G   /dev/sda2  VolGroup00 lvm2 a-   465.66G      0 [rootseaing ~]# [rootseaing ~]# vgcreate vg_backup /dev/mapper/comsys-backup   Volume group vg_backup successfully created [rootseaing ~]# [rootseaing ~]# [rootseaing ~]# vgs   VG         #PV #LV #SN Attr   VSize   VFree    VolGroup00   1   2   0 wz--n- 465.66G      0   vg_backup    1   0   0 wz--n- 100.00G 100.00G [rootseaing ~]# [rootseaing ~]# pvs   PV         VG         Fmt  Attr PSize   PFree    /dev/dm-4  vg_backup  lvm2 a-   100.00G 100.00G   /dev/sda2  VolGroup00 lvm2 a-   465.66G      0 [rootseaing ~]# [rootseaing ~]# [rootseaing ~]# lvcreate -L 20G -n lv_backup vg_backup   Logical volume lv_backup created [rootseaing ~]# [rootseaing ~]# lvs   LV        VG         Attr   LSize   Origin Snap%  Move Log Copy%  Convert   LogVol00  VolGroup00 -wi-ao 448.03G                                        LogVol01  VolGroup00 -wi-ao  17.62G                                        lv_backup vg_backup  -wi-a-  20.00G                                      [rootseaing ~]# [rootseaing ~]# [rootseaing ~]# mkfs.ext3 /dev/vg_backup/lv_backup mke2fs 1.39 (29-May-2006) Filesystem label OS type: Linux Block size4096 (log2) Fragment size4096 (log2) 2621440 inodes, 5242880 blocks 262144 blocks (5.00%) reserved for the super user First data block0 Maximum filesystem blocks4294967296 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 20 mounts or 180 days, whichever comes first.  Use tune2fs -c or -i to override. [rootseaing ~]# [rootseaing ~]# [rootseaing ~]# mount /dev/vg_backup/lv_backup /backup   [rootseaing ~]# df -h Filesystem            Size  Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00                       434G  4.9G  407G   2% / /dev/sda1              99M   18M   77M  19% /boot tmpfs                 7.9G     0  7.9G   0% /dev/shm /dev/mapper/vg_backup-lv_backup                        20G  173M   19G   1% /backup  转载于:https://www.cnblogs.com/zfox2017/p/8570262.html
http://www.zqtcl.cn/news/652035/

相关文章:

  • 织梦教育网站开发商务网站建设实训总结
  • 广西执业药师培训网站网站设计 原型图
  • 网站建设客户群体分析微信开放平台小程序开发文档
  • led网站建设wordpress .htaccess 固定链接
  • 学校网站建设申请报告一个好网站设计
  • 网站雪花特效wordpress文件解析
  • 招聘网站哪个好用淮北之窗
  • 索莱宝做网站网站在线布局
  • 站内seo的技巧做php网站阿里云服务器
  • 网站开发需要用到哪些软件爱站网权重查询
  • 免费注册个人网站铁路工程造价信息网
  • 电子商务大型网站建设电商静态网页模板
  • 网站建设公司利润怎么样长沙网站制作作
  • 淄博优化网站企业营销型网站做的好
  • 玉泉营网站建设网络营销公司组织架构
  • 网上有专业的做网站吗最新网站域名ip地址查询
  • 大理网站制作公司北京seo服务商找行者seo
  • 有关网站建设合同wordpress 使用
  • 外贸商城网站制作公司毕业设计做系统网站
  • 曲阜住房城乡建设局网站php用什么工具做网站
  • 深圳网站开发奇辰科技视觉vi设计系统
  • 网站开发与管理期末考试工商年检在哪个网站做
  • 网站建设有什么系统深圳微网站
  • 网站建设算什么专业企业建设网站需要注意什么
  • 太原cms建站模板建设部网站监理注销查询
  • 流量对网站排名的影响因素网站内容的作用
  • 彩钢做网站能赚钱吗合肥市住房和城乡建设厅
  • 顺德网站建设itshunde罗村建网站
  • 网站开发语言开发十大免费货源网址
  • 网站建设要那些收费项如何做自己的淘客网站