Eric Gao's Bloggaoqiang.blog.chinaunix.net

Oracle MySQL PostgreSQL AIX Linux Storage

  • 博客访问: 1841767
  • 博文数量: 196
  • 博客积分: 3409
  • 博客等级: 中校
  • 技术积分: 3858
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-24 10:21
  • 认证徽章:
个人简介

● ITPUB名人堂嘉宾 ● ChinaUnix社区博客专家 ● ChinaUnix社区Oracle板块版主 ● 优酷网认证音乐牛人:EricGuitar ● SDOUG 核心成员 ●E-mail:gaoqiangdba@163.com

文章分类

全部博文(196)

文章存档

2016年(5)

2015年(39)

2014年(27)

2013年(18)

2012年(24)

2011年(63)

2010年(20)

微信关注

IT168企业级官微



微信号:IT168qiye



系统架构师大会



微信号:SACC2013

订阅
热词专题

分类: LINUX

<a href="http://weibo.com/u/1816089870?s=6uyXnP" target="_blank" style="white-space:normal;text-decoration:none;color:#19599B;font-family:宋体, Arial;font-size:12px;line-height:18px;background-color:#FFFFFF;"><img border="0" src="http://service.t.sina.com.cn/widget/qmd/1816089870/f2e5e0d3/10.png" /></a><span style="white-space:normal;color:#666666;font-family:宋体, Arial;font-size:12px;line-height:18px;background-color:#FFFFFF;">&nbsp;&nbsp;</span><br style="line-height:26.6666679382324px;white-space:normal;" /> <br style="line-height:26.6666679382324px;white-space:normal;" /> <br style="line-height:26.6666679382324px;white-space:normal;" /> <strong style="line-height:26.6666679382324px;white-space:normal;">实验目的:</strong><br style="line-height:26.6666679382324px;white-space:normal;" /> <span style="line-height:26.6666679382324px;white-space:normal;">测试在老版本的Linux上摘掉LVM管理的磁盘,然后挂载到新版本的主机上,数据是否仍然可用。</span><br style="line-height:26.6666679382324px;white-space:normal;" /> <br style="line-height:26.6666679382324px;white-space:normal;" /> <br style="line-height:26.6666679382324px;white-space:normal;" /> <strong style="line-height:26.6666679382324px;white-space:normal;">测试环境:</strong><br style="line-height:26.6666679382324px;white-space:normal;" /> <span style="line-height:26.6666679382324px;white-space:normal;">VMware Workstation 11 64-bit</span><br style="line-height:26.6666679382324px;white-space:normal;" /> <br style="line-height:26.6666679382324px;white-space:normal;" /> <strong style="line-height:26.6666679382324px;white-space:normal;">系统版本:</strong><br style="line-height:26.6666679382324px;white-space:normal;" /> <br style="line-height:26.6666679382324px;white-space:normal;" /> <span style="line-height:26.6666679382324px;white-space:normal;">源主机:Red Hat Enterprise Linux Server release 5.7 x86_64</span><br style="line-height:26.6666679382324px;white-space:normal;" /> <span style="line-height:26.6666679382324px;white-space:normal;">目的主机:CentOS Linux release 7.0.1406 (Core) &nbsp;x86_64</span><br style="line-height:26.6666679382324px;white-space:normal;" /> <div style="line-height:26.6666679382324px;white-space:normal;"> <br /> <br /> <strong>测试流程:</strong><br /> 1.在源主机创建LVM管理的VG、LV和文件系统并挂载,创建文件并添加内容;<br /> 2.备份VG信息,然后摘掉VG;<br /> 3.在目的主机挂载磁盘,扫描硬件;<br /> 3.挂载VG,检查VG、LV状态;<br /> 4.挂载文件系统;<br /> 5.验证文件系统功能。<br /> <br /> <br /> <strong>操作过程:</strong><br /> <br /> <strong>在源主机上创建LVM的相关资源:<br /> </strong><br /> 打开虚拟机的配置,选中“硬盘”,点击下方的“添加”:<br /> <br /> <img src="/attachment/201509/18/20802110_1442561766HTC1.png" width="700" height="632.38095238095" alt="" /><br /> <br /> <br /> <br /> <br /> <br /> <strong>添加硬件类型选择“硬盘”:</strong><br /> <br /> <img src="/attachment/201509/18/20802110_1442561768jzPW.png" width="503" height="461" alt="" /><br /> <br /> <br /> <br /> <strong>选择创建新虚拟磁盘:</strong><br /> <br /> <img src="/attachment/201509/18/20802110_1442561768l8hA.png" width="503" height="461" alt="" /><br /> <br /> <br /> <br /> <br /> <br /> <br /> <strong>创建容量为0.5G,保存为单个文件,方便复制,简化操作:</strong><br /> <br /> <img src="/attachment/201509/18/20802110_144256176867VU.png" width="503" height="461" alt="" /><br /> <br /> <br /> <br /> <br /> <br /> <br /> <strong>磁盘命名为 “disk4test.vmdk”:</strong><br /> <br /> <img src="/attachment/201509/18/20802110_1442561768NLcI.png" width="503" height="461" alt="" /><br /> <br /> <br /> <br /> <br /> <strong>点击完成后即刻创建磁盘了:</strong><br /> <br /> <img src="/attachment/201509/18/20802110_1442561768Xmqe.png" width="482" height="125" alt="" /><br /> <br /> <br /> <br /> 随后便可看到虚拟机配置信息里有新分配的硬盘信息:<br /> <br /> <img src="/attachment/201509/18/20802110_14425617681kGW.png" width="700" height="632.38095238095" alt="" /><br /> <br /> <br /> <br /> <br /> <br /> <br /> <strong>系统里可以看到认到了新的设备信息:</strong><br /> <br /> root@dbserver ~]#&nbsp;<span style="color:#4C33E5;">fdisk -l</span><br /> <br /> Disk /dev/sda: 32.2 GB, 32212254720 bytes<br /> 255 heads, 63 sectors/track, 3916 cylinders<br /> Units = cylinders of 16065 * 512 = 8225280 bytes<br /> <br /> <br /> &nbsp; &nbsp;Device Boot &nbsp; &nbsp; &nbsp;Start &nbsp; &nbsp; &nbsp; &nbsp; End &nbsp; &nbsp; &nbsp;Blocks &nbsp; Id &nbsp;System<br /> /dev/sda1 &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;13 &nbsp; &nbsp; &nbsp;104391 &nbsp; 83 &nbsp;Linux<br /> /dev/sda2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;14 &nbsp; &nbsp; &nbsp; &nbsp;3916 &nbsp; &nbsp;31350847+ &nbsp;8e &nbsp;Linux LVM<br /> <br /> <br /> <span style="color:#E53333;">Disk /dev/sdb: 536 MB, 536870912 bytes</span><br /> <span style="color:#E53333;">64 heads, 32 sectors/track, 512 cylinders</span><br /> <span style="color:#E53333;">Units = cylinders of 2048 * 512 = 1048576 bytes</span><br /> <br /> <br /> <span style="color:#E53333;">Disk /dev/sdb doesn't contain a valid partition table</span><br /> <div style="white-space:nowrap;"> <br /> </div> <br /> <br /> <br /> <strong>创建PV:</strong><br /> [root@dbserver ~]#&nbsp;<strong><span style="color:#4C33E5;">pvcreate /dev/sdb</span></strong><br /> &nbsp; Physical volume "/dev/sdb" successfully created<br /> <div> <br /> 查看PV信息,当然也可以用pvs和pvdisplay等命令查看相关信息:<br /> </div> [root@dbserver ~]#&nbsp;<strong><span style="color:#4C33E5;">pvscan</span></strong><br /> &nbsp; PV /dev/sda2 &nbsp; VG VolGroup00 &nbsp; &nbsp; &nbsp;lvm2 [29.88 GB / 0 &nbsp; &nbsp;free]<br /> &nbsp;&nbsp;<span style="color:#E53333;">PV /dev/sdb &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lvm2 [512.00 MB]</span><br /> &nbsp; Total: 2 [30.38 GB] / in use: 1 [29.88 GB] / in no VG: 1 [512.00 MB]<br /> <div> <br /> </div> <strong></strong><br /> <strong>创建VG:</strong><br /> [root@dbserver ~]#&nbsp;<strong><span style="color:#4C33E5;">vgcreate mail /dev/sdb</span></strong><br /> &nbsp; Volume group "mail" successfully created<br /> <div> <br /> </div> <br /> <strong>查看VG信息,同样也可以用vgs和vgdisplay等命令查看相关信息:</strong><br /> [root@dbserver ~]#&nbsp;<strong><span style="color:#4C33E5;">vgscan</span></strong><br /> &nbsp; Reading all physical volumes. &nbsp;This may take a while...<br /> &nbsp; Found volume group "mail" using metadata type lvm2<br /> &nbsp; Found volume group "VolGroup00" using metadata type lvm2<br /> <div> <br /> </div> <br /> <strong>创建LV:</strong><br /> [root@dbserver ~]#<strong><span style="color:#4C33E5;">&nbsp;lvcreate -L 500M -n MAILlv mail</span></strong><br /> &nbsp; Logical volume "MAILlv" created<br /> <div> <br /> <strong>查看LV信息,同上,也可以用那3种命令查看更多信息:</strong><br /> </div> [root@dbserver ~]#<strong><span style="color:#4C33E5;">&nbsp;lvscan</span></strong><br /> <span style="color:#E56600;">&nbsp; ACTIVE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'/dev/mail/MAILlv' [500.00 MB] inherit</span><br /> &nbsp; ACTIVE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'/dev/VolGroup00/LogVol00' [25.97 GB] inherit<br /> &nbsp; ACTIVE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'/dev/VolGroup00/LogVol01' [3.91 GB] inherit<br /> <div> <br /> </div> <br /> <strong>创建文件系统:</strong><br /> root@dbserver ~]#&nbsp;<strong><span style="color:#4C33E5;">mkfs -t ext3 /dev/mail/MAILlv&nbsp;</span></strong><br /> mke2fs 1.39 (29-May-2006)<br /> Filesystem label=<br /> OS type: Linux<br /> Block size=1024 (log=0)<br /> Fragment size=1024 (log=0)<br /> 128016 inodes, 512000 blocks<br /> 25600 blocks (5.00%) reserved for the super user<br /> First data block=1<br /> Maximum filesystem blocks=67633152<br /> 63 block groups<br /> 8192 blocks per group, 8192 fragments per group<br /> 2032 inodes per group<br /> Superblock backups stored on blocks:&nbsp;<br /> 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409<br /> <br /> <br /> Writing inode tables: done &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /> Creating journal (8192 blocks): done<br /> Writing superblocks and filesystem accounting information: done<br /> <br /> <br /> This filesystem will be automatically checked every 36 mounts or<br /> 180 days, whichever comes first. &nbsp;Use tune2fs -c or -i to override.<br /> <br /> <br /> <strong>创建挂载点并挂载文件系统:</strong><br /> [root@dbserver /]#&nbsp;<strong><span style="color:#4C33E5;">mkdir mail</span></strong><br /> [root@dbserver /]#&nbsp;<strong><span style="color:#4C33E5;">mount /dev/mail/MAILlv /mail<br /> <br /> <span style="color:#003399;"><span style="color:#000000;">确认文件系统状态</span>:</span></span></strong><br /> [root@dbserver /]#<strong><span style="color:#4C33E5;">&nbsp;df -h</span></strong><br /> 文件系统 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;容量 &nbsp;已用 可用 已用% 挂载点<br /> /dev/mapper/VolGroup00-LogVol00<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;26G &nbsp; 20G &nbsp;4.5G &nbsp;82% /<br /> /dev/sda1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;99M &nbsp; 21M &nbsp; 73M &nbsp;23% /boot<br /> tmpfs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1.3G &nbsp;248M &nbsp;1.1G &nbsp;19% /dev/shm<br /> none &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1.3G &nbsp;104K &nbsp;1.3G &nbsp; 1% /var/lib/xenstored<br /> <span style="color:#E56600;">/dev/mapper/mail-MAILlv</span><span style="color:#E53333;">&nbsp; &nbsp; &nbsp; &nbsp; 485M &nbsp; 11M &nbsp;449M &nbsp; 3% /mail</span><br /> <br /> <br /> <br /> <strong>进入/mail创建测试文件:</strong><br /> [root@dbserver mail]#<strong><span style="color:#4C33E5;">&nbsp;touch test_moving</span></strong><br /> [root@dbserver mail]#&nbsp;<strong><span style="color:#4C33E5;">vi test_moving&nbsp;</span></strong><br /> [root@dbserver mail]#<strong><span style="color:#4C33E5;">&nbsp;cat test_moving&nbsp;</span></strong><br /> This is a testing file for moving storage.<br /> <br /> <br /> <strong>迁移存储</strong><strong>:<br /> <br /> <br /> <span style="color:#E53333;">生产环境上的话,任何操作都要注意细节,都要注意事先想好下一步的思路和回退的方案,备份终于泰山,对客户负责、对项目负责也要对公司负责。</span><br /> <br /> <span style="color:#E53333;">备份VG信息:</span><br /> </strong><span style="line-height:26.6666679382324px;">[root@dbserver /]#&nbsp;<strong><span style="color:#4C33E5;">vgcfgbackup mail</span></strong></span><br style="line-height:26.6666679382324px;" /> <span style="line-height:26.6666679382324px;">&nbsp; Volume group "mail" successfully backed up.</span><br /> <br /> <strong>确认信息已经备份,并记住备份位置:</strong><br /> <span style="line-height:26.6666679382324px;">[root@dbserver backup]#<strong><span style="color:#4C33E5;">&nbsp;ls -lt</span></strong></span><br style="line-height:26.6666679382324px;" /> <span style="line-height:26.6666679382324px;">总计 12</span><br style="line-height:26.6666679382324px;" /> <span style="line-height:26.6666679382324px;color:#E53333;">-rw------- 1 root root 1166 08-01 12:25 mail</span><br style="line-height:26.6666679382324px;" /> <span style="line-height:26.6666679382324px;">-rw------- 1 root root 1539 2013-07-07 VolGroup00</span><br style="line-height:26.6666679382324px;" /> <span style="line-height:26.6666679382324px;">[root@dbserver backup]#<strong><span style="color:#4C33E5;">&nbsp;pwd</span></strong></span><br style="line-height:26.6666679382324px;" /> <span style="line-height:26.6666679382324px;">/etc/lvm/backup</span><br style="line-height:26.6666679382324px;" /> <br /> <br /> <span style="color:#E53333;">-an参数的含义是:deactivate<br /> </span><br /> [root@dbserver /]#<strong><span style="color:#4C33E5;">&nbsp;lvchange -an /dev/mail/MAILlv&nbsp;</span></strong><br /> [root@dbserver /]#&nbsp;<strong><span style="color:#4C33E5;">vgchange -an mail</span></strong><br /> &nbsp; 0 logical volume(s) in volume group "mail" now active<br /> <br /> <strong>摘掉mail VG:</strong><br /> [root@dbserver /]#&nbsp;<strong><span style="color:#4C33E5;">vgexport mail</span></strong><br /> &nbsp; Volume group "mail" successfully exported<br /> <br /> <br /> <div style="white-space:nowrap;"> <br /> </div> <br /> <br /> <br /> 接下来关闭源主机,可以把文件拷贝到目的主机文件夹下也可以是任何地方,也可以不动,我直接复制到了上层文件夹。<br /> <br /> <br /> <br /> <br /> <strong>接下来需要在目的主机上识别设备:</strong><br /> <br /> <br /> <strong>打开目的主机的配置菜单:</strong><br /> <br /> 根据图示往下走即可:<br /> <br /> <img src="/attachment/201509/18/20802110_14425617697G0I.png" width="700" height="632.38095238095" alt="" /><br /> <br /> <br /> <br /> <img src="/attachment/201509/18/20802110_1442561771Z0Q1.png" width="503" height="461" alt="" /><br /> <br /> <br /> <br /> <img src="/attachment/201509/18/20802110_1442561772uUU8.png" width="503" height="461" alt="" /><br /> <br /> <br /> <br /> <img src="/attachment/201509/18/20802110_1442561773Ekhc.png" width="503" height="461" alt="" /><br /> <br /> <br /> <br /> <img src="/attachment/201509/18/20802110_144256177386yv.png" width="700" height="420" alt="" /><br /> <br /> <br /> <br /> <img src="/attachment/201509/18/20802110_14425617739F9w.png" width="503" height="461" alt="" /><br /> <br /> <br /> <br /> <img src="/attachment/201509/18/20802110_1442561773n58C.png" width="377" height="158" alt="" /><br /> <br /> <br /> <br /> <img src="/attachment/201509/18/20802110_1442561773i6T8.png" width="700" height="632.38095238095" alt="" /><br /> <br /> 直到在配置里看到新的硬盘就可以。<br /> <br /> <br /> <br /> <strong>接下来启动虚拟机进入系统(或重启系统),检查硬件信息是否已更新:</strong><br /> <br /> </div> <div style="line-height:26.6666679382324px;white-space:normal;"> <span style="line-height:26.6666679382324px;"><br /> [root@cafe ~]#<strong><span style="color:#4C33E5;">&nbsp;fdisk -l</span></strong><br /> 磁盘 /dev/sda:64.4 GB, 64424509440 字节,125829120 个扇区<br /> Units = 扇区 of 1 * 512 = 512 bytes<br /> 扇区大小(逻辑/物理):512 字节 / 512 字节<br /> I/O 大小(最小/最佳):512 字节 / 512 字节<br /> 磁盘标签类型:dos<br /> 磁盘标识符:0x0009cfc6<br /> &nbsp; &nbsp;设备 Boot &nbsp; &nbsp; &nbsp;Start &nbsp; &nbsp; &nbsp; &nbsp; End &nbsp; &nbsp; &nbsp;Blocks &nbsp; Id &nbsp;System<br /> /dev/sda1 &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp;2048 &nbsp; &nbsp; 1026047 &nbsp; &nbsp; &nbsp;512000 &nbsp; 83 &nbsp;Linux<br /> /dev/sda2 &nbsp; &nbsp; &nbsp; &nbsp; 1026048 &nbsp; 125829119 &nbsp; &nbsp;62401536 &nbsp; 8e &nbsp;Linux LVM<br /> <br /> <span style="color:#E56600;">磁盘 /dev/sdb:536 MB, 536870912 字节,1048576 个扇区</span><br /> Units = 扇区 of 1 * 512 = 512 bytes<br /> 扇区大小(逻辑/物理):512 字节 / 512 字节<br /> I/O 大小(最小/最佳):512 字节 / 512 字节<br /> <br /> 磁盘 /dev/mapper/centos-swap:2181 MB, 2181038080 字节,4259840 个扇区<br /> Units = 扇区 of 1 * 512 = 512 bytes<br /> 扇区大小(逻辑/物理):512 字节 / 512 字节<br /> I/O 大小(最小/最佳):512 字节 / 512 字节<br /> <br /> 磁盘 /dev/mapper/centos-root:41.5 GB, 41469083648 字节,80994304 个扇区<br /> Units = 扇区 of 1 * 512 = 512 bytes<br /> 扇区大小(逻辑/物理):512 字节 / 512 字节<br /> I/O 大小(最小/最佳):512 字节 / 512 字节<br /> <br /> <span style="color:#E56600;">磁盘 /dev/mapper/mail-MAILlv:524 MB, 524288000 字节,1024000 个扇区</span><br /> Units = 扇区 of 1 * 512 = 512 bytes<br /> 扇区大小(逻辑/物理):512 字节 / 512 字节<br /> I/O 大小(最小/最佳):512 字节 / 512 字节<br /> <br /> 磁盘 /dev/mapper/centos-home:20.2 GB, 20245905408 字节,39542784 个扇区<br /> Units = 扇区 of 1 * 512 = 512 bytes<br /> 扇区大小(逻辑/物理):512 字节 / 512 字节<br /> I/O 大小(最小/最佳):512 字节 / 512 字节<br /> <br /> <br /> <br /> <strong>导入VG信息:</strong><br /> [root@cafe ~]#<strong><span style="color:#4C33E5;">&nbsp;vgimport mail</span></strong><br /> &nbsp; Volume group "mail" successfully imported<br /> [root@cafe ~]# vgscan<br /> &nbsp; Reading all physical volumes. &nbsp;This may take a while...<br /> &nbsp; Found volume group "mail" using metadata type lvm2<br /> &nbsp; Found volume group "centos" using metadata type lvm2<br /> <br /> <strong>查看LV信息是否已更新,同样也可以用 **s、**scan和**display命令查看:</strong><br /> [root@cafe ~]#<strong><span style="color:#4C33E5;">&nbsp;lvscan</span></strong><br /> <span style="color:#E56600;">&nbsp; ACTIVE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'/dev/mail/MAILlv' [500.00 MiB] inherit</span><br /> &nbsp; ACTIVE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'/dev/centos/swap' [2.03 GiB] inherit<br /> &nbsp; ACTIVE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'/dev/centos/home' [18.86 GiB] inherit<br /> &nbsp; ACTIVE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'/dev/centos/root' [38.62 GiB] inherit<br /> <br /> <strong>创建挂载点,并挂载文件系统:</strong><br /> [root@cafe ~]#<strong><span style="color:#4C33E5;">&nbsp;cd /</span></strong><br /> [root@cafe /]#&nbsp;<strong><span style="color:#4C33E5;">mkdir mail</span></strong><br /> [root@cafe /]#&nbsp;<strong><span style="color:#4C33E5;">mount /dev/mail/MAILlv /mail<br /> <br /> <br /> <span style="color:#000000;">验证数据可用:</span></span></strong><br /> [root@cafe /]#&nbsp;<strong><span style="color:#4C33E5;">cd mail</span></strong><br /> [root@cafe mail]#&nbsp;<strong><span style="color:#4C33E5;">ls</span></strong><br /> lost+found &nbsp;test_moving<br /> [root@cafe mail]#&nbsp;<strong><span style="color:#4C33E5;">cat test_moving&nbsp;</span></strong><br /> This is a testing file for moving storage.<br /> <br /> <br /> <br /> <strong>测试磁盘的基本功能:<br /> <br /> 复制:</strong><br /> [root@cafe mail]#&nbsp;<strong><span style="color:#4C33E5;">cp test_moving.bak test_moving<br /> <span style="color:#000000;">删除:</span></span></strong><br /> [root@cafe mail]#&nbsp;<strong><span style="color:#4C33E5;">rm -f test_moving.bak&nbsp;</span></strong><br /> [root@cafe mail]#<strong><span style="color:#4C33E5;">&nbsp;ls -lt</span></strong><br /> 总用量 14<br /> -rw-r--r-- 1 root root &nbsp; &nbsp;43 9月 &nbsp;18 15:00 test_moving<br /> -rw-r--r-- 1 root root &nbsp; &nbsp; 6 9月 &nbsp;18 14:59 check<br /> drwx------ 2 root root 12288 8月 &nbsp; 1 12:12 lost+found<br /> <strong>读取:</strong><br /> [root@cafe mail]#<strong><span style="color:#4C33E5;">&nbsp;cat test_moving&nbsp;</span></strong><br /> This is a testing file for moving storage.<br /> <strong>写入:</strong><br /> <span style="line-height:26.6666679382324px;">[root@cafe mail]#<strong><span style="color:#4C33E5;">vi check</span></strong></span><strong><span style="color:#4C33E5;"></span></strong><br /> [root@cafe mail]#&nbsp;<strong><span style="color:#4C33E5;">cat check</span></strong><br /> OK!~<br /> <div> <br /> </div> <br /> <br /> <strong><span style="color:#E53333;"><img src="http://blog.chinaunix.net/kindeditor/plugins/emoticons/images/112.gif" border="0" alt="" />此次步骤忽略了2步,因为我看到挂在上之后便可读到LV信息所以想直接挂载验证效果。在生产环境上最好按部就班、稳扎稳打的按照流程来操作,连接好存储硬件后,fdisk -l 查看设备信息,然后进行激活操作,随后进行挂载等操作。</span></strong><br /> <br /> <br /> <br /> <strong>激活操作如下:</strong><br /> [root@cafe /]#&nbsp;<strong><span style="color:#4C33E5;">vgchange -ay mail</span></strong><br /> &nbsp; 1 logical volume(s) in volume group "mail" now active<br /> [root@cafe /]#<strong><span style="color:#4C33E5;">&nbsp;lvchange -ay /dev/mail/MAILlv&nbsp;</span></strong><br /> [root@cafe /]#<br /> <div style="white-space:nowrap;"> <br /> </div> <br /> <br /> <br /> <br /> <strong><span style="color:#FF9900;"><img src="http://blog.chinaunix.net/kindeditor/plugins/emoticons/images/114.gif" border="0" alt="" />OK!~~~</span></strong></span> </div>
阅读(1483) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册