\n\u7f29\u5c0f<\/td>\n | <\/td>\n | vgreduce<\/td>\n | lvreduce<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n \u4e3a\u4e86\u907f\u514d\u591a\u4e2a\u5b9e\u9a8c\u4e4b\u95f4\u76f8\u4e92\u53d1\u751f\u51b2\u7a81\uff0c\u8bf7\u5927\u5bb6\u81ea\u884c\u5c06\u865a\u62df\u673a\u8fd8\u539f\u5230\u521d\u59cb\u72b6\u6001\uff0c\u5e76\u5728\u865a\u62df\u673a\u4e2d\u6dfb\u52a0\u4e24\u5757\u65b0\u786c\u76d8\u8bbe\u5907\uff0c\u7136\u540e\u5f00\u673a\uff0c\u5982\u56fe7-8\u6240\u793a\u3002<\/p>\n \u5728\u865a\u62df\u673a\u4e2d\u6dfb\u52a0\u4e24\u5757\u65b0\u786c\u76d8\u8bbe\u5907\u7684\u76ee\u7684\uff0c\u662f\u4e3a\u4e86\u66f4\u597d\u5730\u6f14\u793aLVM\u7406\u5ff5\u4e2d\u7528\u6237\u65e0\u9700\u5173\u5fc3\u5e95\u5c42\u7269\u7406\u786c\u76d8\u8bbe\u5907\u7684\u7279\u6027\u3002\u6211\u4eec\u5148\u5bf9\u8fd9\u4e24\u5757\u65b0\u786c\u76d8\u8fdb\u884c\u521b\u5efa\u7269\u7406\u5377\u7684\u64cd\u4f5c\uff0c\u53ef\u4ee5\u5c06\u8be5\u64cd\u4f5c\u7b80\u5355\u7406\u89e3\u6210\u8ba9\u786c\u76d8\u8bbe\u5907\u652f\u6301LVM\u6280\u672f\uff0c\u6216\u8005\u7406\u89e3\u6210\u662f\u628a\u786c\u76d8\u8bbe\u5907\u52a0\u5165\u5230LVM\u6280\u672f\u53ef\u7528\u7684\u786c\u4ef6\u8d44\u6e90\u6c60\u4e2d\uff0c\u7136\u540e\u5bf9\u8fd9\u4e24\u5757\u786c\u76d8\u8fdb\u884c\u5377\u7ec4\u5408\u5e76\uff0c\u5377\u7ec4\u7684\u540d\u79f0\u53ef\u4ee5\u7531\u7528\u6237\u6765\u81ea\u5b9a\u4e49\u3002\u63a5\u4e0b\u6765\uff0c\u6839\u636e\u9700\u6c42\u628a\u5408\u5e76\u540e\u7684\u5377\u7ec4\u5207\u5272\u51fa\u4e00\u4e2a\u7ea6\u4e3a150MB\u7684\u903b\u8f91\u5377\u8bbe\u5907\uff0c\u6700\u540e\u628a\u8fd9\u4e2a\u903b\u8f91\u5377\u8bbe\u5907\u683c\u5f0f\u5316\u6210EXT4\u6587\u4ef6\u7cfb\u7edf\u540e\u6302\u8f7d\u4f7f\u7528\u3002\u5728\u4e0b\u6587\u4e2d\uff0c\u5218\u9044\u8001\u5e08\u5c06\u5bf9\u6bcf\u4e00\u4e2a\u6b65\u9aa4\u518d\u4f5c\u4e00\u4e9b\u7b80\u5355\u7684\u63cf\u8ff0\u3002<\/p>\n \u7b2c1\u6b65<\/strong>\uff1a\u8ba9\u65b0\u6dfb\u52a0\u7684\u4e24\u5757\u786c\u76d8\u8bbe\u5907\u652f\u6301LVM\u6280\u672f\u3002<\/p>\n[root@linuxprobe ~]# pvcreate \/dev\/sdb \/dev\/sdc\r\n Physical volume \"\/dev\/sdb\" successfully created\r\n Physical volume \"\/dev\/sdc\" successfully created\r\n<\/pre>\n<\/p>\n \u56fe7-8\u00a0 \u5728\u865a\u62df\u673a\u4e2d\u6dfb\u52a0\u4e24\u5757\u65b0\u7684\u786c\u76d8\u8bbe\u5907<\/p>\n \u7b2c2\u6b65<\/strong>\uff1a\u628a\u4e24\u5757\u786c\u76d8\u8bbe\u5907\u52a0\u5165\u5230storage\u5377\u7ec4\u4e2d\uff0c\u7136\u540e\u67e5\u770b\u5377\u7ec4\u7684\u72b6\u6001\u3002<\/p>\n[root@linuxprobe ~]# vgcreate storage \/dev\/sdb \/dev\/sdc\r\n Volume group \"storage\" successfully created\r\n[root@linuxprobe ~]# vgdisplay\r\n--- Volume group ---\r\n VG Name storage\r\n System ID \r\n Format lvm2\r\n Metadata Areas 2\r\n Metadata Sequence No 1\r\n VG Access read\/write\r\n VG Status resizable\r\n MAX LV 0\r\n Cur LV 0\r\n Open LV 0\r\n Max PV 0\r\n Cur PV 2\r\n Act PV 2\r\n VG Size 39.99 GiB\r\n PE Size 4.00 MiB\r\n Total PE 10238\r\n Alloc PE \/ Size 0 \/ 0 <\/strong> Free PE \/ Size 10238 \/ 39.99 GiB<\/strong>\r\n VG UUID KUeAMF-qMLh-XjQy-ArUo-LCQI-YF0o-pScxm1\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\u7b2c3\u6b65<\/strong>\uff1a\u5207\u5272\u51fa\u4e00\u4e2a\u7ea6\u4e3a150MB\u7684\u903b\u8f91\u5377\u8bbe\u5907\u3002<\/p>\n\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u5207\u5272\u5355\u4f4d\u7684\u95ee\u9898\u3002\u5728\u5bf9\u903b\u8f91\u5377\u8fdb\u884c\u5207\u5272\u65f6\u6709\u4e24\u79cd\u8ba1\u91cf\u5355\u4f4d\u3002\u7b2c\u4e00\u79cd\u662f\u4ee5\u5bb9\u91cf\u4e3a\u5355\u4f4d\uff0c\u6240\u4f7f\u7528\u7684\u53c2\u6570\u4e3a-L\u3002\u4f8b\u5982\uff0c\u4f7f\u7528-L 150M\u751f\u6210\u4e00\u4e2a\u5927\u5c0f\u4e3a150MB\u7684\u903b\u8f91\u5377\u3002\u53e6\u5916\u4e00\u79cd\u662f\u4ee5\u57fa\u672c\u5355\u5143\u7684\u4e2a\u6570\u4e3a\u5355\u4f4d\uff0c\u6240\u4f7f\u7528\u7684\u53c2\u6570\u4e3a-l\u3002\u6bcf\u4e2a\u57fa\u672c\u5355\u5143\u7684\u5927\u5c0f\u9ed8\u8ba4\u4e3a4MB\u3002\u4f8b\u5982\uff0c\u4f7f\u7528-l 37\u53ef\u4ee5\u751f\u6210\u4e00\u4e2a\u5927\u5c0f\u4e3a37\u00d74MB=148MB\u7684\u903b\u8f91\u5377\u3002<\/p>\n [root@linuxprobe ~]# lvcreate -n vo -l 37 storage\r\n Logical volume \"vo\" created\r\n[root@linuxprobe ~]# lvdisplay \r\n --- Logical volume ---\r\n LV Path \/dev\/storage\/vo\r\n LV Name vo\r\n VG Name storage\r\n LV UUID D09HYI-BHBl-iXGr-X2n4-HEzo-FAQH-HRcM2I\r\n LV Write Access read\/write\r\n LV Creation host, time localhost.localdomain, 2017-02-01 01:22:54 -0500\r\n LV Status available\r\n # open 0\r\n LV Size 148.00 MiB<\/strong>\r\n Current LE 37\r\n Segments 1\r\n Allocation inherit\r\n Read ahead sectors auto\r\n - currently set to 8192\r\n Block device 253:2\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\u7b2c4\u6b65<\/strong>\uff1a\u628a\u751f\u6210\u597d\u7684\u903b\u8f91\u5377\u8fdb\u884c\u683c\u5f0f\u5316\uff0c\u7136\u540e\u6302\u8f7d\u4f7f\u7528\u3002<\/p>\nLinux\u7cfb\u7edf\u4f1a\u628aLVM\u4e2d\u7684\u903b\u8f91\u5377\u8bbe\u5907\u5b58\u653e\u5728\/dev\u8bbe\u5907\u76ee\u5f55\u4e2d\uff08\u5b9e\u9645\u4e0a\u662f\u505a\u4e86\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff09\uff0c\u540c\u65f6\u4f1a\u4ee5\u5377\u7ec4\u7684\u540d\u79f0\u6765\u5efa\u7acb\u4e00\u4e2a\u76ee\u5f55\uff0c\u5176\u4e2d\u4fdd\u5b58\u4e86\u903b\u8f91\u5377\u7684\u8bbe\u5907\u6620\u5c04\u6587\u4ef6\uff08\u5373\/dev\/\u5377\u7ec4\u540d\u79f0\/\u903b\u8f91\u5377\u540d\u79f0\uff09\u3002<\/p>\n [root@linuxprobe\u00a0~]# mkfs.ext4 \/dev\/storage\/vo \r\nmke2fs 1.42.9 (28-Dec-2013)\r\nFilesystem label=\r\nOS type: Linux\r\nBlock size=1024 (log=0)\r\nFragment size=1024 (log=0)\r\nStride=0 blocks, Stripe width=0 blocks\r\n38000 inodes, 151552 blocks\r\n7577 blocks (5.00%) reserved for the super user\r\nFirst data block=1\r\nMaximum filesystem blocks=33816576\r\n19 block groups\r\n8192 blocks per group, 8192 fragments per group\r\n2000 inodes per group\r\nSuperblock backups stored on blocks: \r\n 8193, 24577, 40961, 57345, 73729\r\nAllocating group tables: done \r\nWriting inode tables: done \r\nCreating journal (4096 blocks): done\r\nWriting superblocks and filesystem accounting information: done \r\n[root@linuxprobe\u00a0~]# mkdir \/linuxprobe\r\n[root@linuxprobe ~]# mount \/dev\/storage\/vo \/linuxprobe\r\n<\/pre>\n\u7b2c5\u6b65<\/strong>\uff1a\u67e5\u770b\u6302\u8f7d\u72b6\u6001\uff0c\u5e76\u5199\u5165\u5230\u914d\u7f6e\u6587\u4ef6\uff0c\u4f7f\u5176\u6c38\u4e45\u751f\u6548\u3002<\/p>\n[root@linuxprobe ~]# df -h\r\n Filesystem Size Used Avail Use% Mounted on\r\n \/dev\/mapper\/rhel-root 18G 3.0G 15G 17% \/\r\n devtmpfs 905M 0 905M 0% \/dev\r\n tmpfs 914M 140K 914M 1% \/dev\/shm\r\n tmpfs 914M 8.8M 905M 1% \/run\r\n tmpfs 914M 0 914M 0% \/sys\/fs\/cgroup\r\n \/dev\/sr0 3.5G 3.5G 0 100% \/media\/cdrom\r\n \/dev\/sda1 497M 119M 379M 24% \/boot\r\n \/dev\/mapper\/storage-vo 145M 7.6M 138M 6% \/linuxprobe<\/strong>\r\n [root@linuxprobe ~]# echo \"\/dev\/storage\/vo \/linuxprobe ext4 defaults 0 0\" >> \/etc\/fstab<\/pre>\n7.2.2 \u6269\u5bb9\u903b\u8f91\u5377<\/span><\/strong><\/h6>\n\u5728\u524d\u9762\u7684\u5b9e\u9a8c\u4e2d\uff0c\u5377\u7ec4\u662f\u7531\u4e24\u5757\u786c\u76d8\u8bbe\u5907\u5171\u540c\u7ec4\u6210\u7684\u3002\u7528\u6237\u5728\u4f7f\u7528\u5b58\u50a8\u8bbe\u5907\u65f6\u611f\u77e5\u4e0d\u5230\u8bbe\u5907\u5e95\u5c42\u7684\u67b6\u6784\u548c\u5e03\u5c40\uff0c\u66f4\u4e0d\u7528\u5173\u5fc3\u5e95\u5c42\u662f\u7531\u591a\u5c11\u5757\u786c\u76d8\u7ec4\u6210\u7684\uff0c\u53ea\u8981\u5377\u7ec4\u4e2d\u6709\u8db3\u591f\u7684\u8d44\u6e90\uff0c\u5c31\u53ef\u4ee5\u4e00\u76f4\u4e3a\u903b\u8f91\u5377\u6269\u5bb9\u3002\u6269\u5c55\u524d\u8bf7\u4e00\u5b9a\u8981\u8bb0\u5f97\u5378\u8f7d\u8bbe\u5907\u548c\u6302\u8f7d\u70b9\u7684\u5173\u8054\u3002<\/p>\n [root@linuxprobe ~]# umount \/linuxprobe\r\n<\/pre>\n\u7b2c1\u6b65<\/strong>\uff1a\u628a\u4e0a\u4e00\u4e2a\u5b9e\u9a8c\u4e2d\u7684\u903b\u8f91\u5377vo\u6269\u5c55\u81f3290MB\u3002<\/p>\n[root@linuxprobe ~]# lvextend -L 290M \/dev\/storage\/vo\r\n Rounding size to boundary between physical extents: 292.00 MiB\r\n Extending logical volume vo to 292.00 MiB\r\n Logical volume vo successfully resized\r\n<\/pre>\n\u7b2c2\u6b65<\/strong>\uff1a\u68c0\u67e5\u786c\u76d8\u5b8c\u6574\u6027\uff0c\u5e76\u91cd\u7f6e\u786c\u76d8\u5bb9\u91cf\u3002<\/p>\n[root@linuxprobe ~]# e2fsck -f \/dev\/storage\/vo\r\ne2fsck 1.42.9 (28-Dec-2013)\r\nPass 1: Checking inodes, blocks, and sizes\r\nPass 2: Checking directory structure\r\nPass 3: Checking directory connectivity\r\nPass 4: Checking reference counts\r\nPass 5: Checking group summary information\r\n\/dev\/storage\/vo: 11\/38000 files (0.0% non-contiguous), 10453\/151552 blocks\r\n[root@linuxprobe ~]# resize2fs \/dev\/storage\/vo\r\nresize2fs 1.42.9 (28-Dec-2013)\r\nResizing the filesystem on \/dev\/storage\/vo to 299008 (1k) blocks.\r\nThe filesystem on \/dev\/storage\/vo is now 299008 blocks long.\r\n<\/pre>\n\u7b2c3\u6b65<\/strong>\uff1a\u91cd\u65b0\u6302\u8f7d\u786c\u76d8\u8bbe\u5907\u5e76\u67e5\u770b\u6302\u8f7d\u72b6\u6001\u3002<\/p>\n[root@linuxprobe ~]# mount -a\r\n[root@linuxprobe ~]# df -h\r\nFilesystem Size Used Avail Use% Mounted on\r\n\/dev\/mapper\/rhel-root 18G 3.0G 15G 17% \/\r\ndevtmpfs 985M 0 985M 0% \/dev\r\ntmpfs 994M 80K 994M 1% \/dev\/shm\r\ntmpfs 994M 8.8M 986M 1% \/run\r\ntmpfs 994M 0 994M 0% \/sys\/fs\/cgroup\r\n\/dev\/sr0 3.5G 3.5G 0 100% \/media\/cdrom\r\n\/dev\/sda1 497M 119M 379M 24% \/boot\r\n\/dev\/mapper\/storage-vo 279M 2.1M 259M 1% \/linuxprobe<\/strong><\/pre>\n7.2.3 \u7f29\u5c0f\u903b\u8f91\u5377<\/span><\/strong><\/h6>\n\u76f8\u8f83\u4e8e\u6269\u5bb9\u903b\u8f91\u5377\uff0c\u5728\u5bf9\u903b\u8f91\u5377\u8fdb\u884c\u7f29\u5bb9\u64cd\u4f5c\u65f6\uff0c\u5176\u4e22\u5931\u6570\u636e\u7684\u98ce\u9669\u66f4\u5927\u3002\u6240\u4ee5\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u6267\u884c\u76f8\u5e94\u64cd\u4f5c\u65f6\uff0c\u4e00\u5b9a\u8981\u63d0\u524d\u5907\u4efd\u597d\u6570\u636e\u3002\u53e6\u5916Linux\u7cfb\u7edf\u89c4\u5b9a\uff0c\u5728\u5bf9LVM\u903b\u8f91\u5377\u8fdb\u884c\u7f29\u5bb9\u64cd\u4f5c\u4e4b\u524d\uff0c\u8981\u5148\u68c0\u67e5\u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\uff08\u5f53\u7136\u8fd9\u4e5f\u662f\u4e3a\u4e86\u4fdd\u8bc1\u6211\u4eec\u7684\u6570\u636e\u5b89\u5168\uff09\u3002\u5728\u6267\u884c\u7f29\u5bb9\u64cd\u4f5c\u524d\u8bb0\u5f97\u5148\u628a\u6587\u4ef6\u7cfb\u7edf\u5378\u8f7d\u6389\u3002<\/p>\n [root@linuxprobe ~]# umount \/linuxprobe\r\n<\/pre>\n\u7b2c1\u6b65<\/strong>\uff1a\u68c0\u67e5\u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\u3002<\/p>\n[root@linuxprobe ~]# e2fsck -f \/dev\/storage\/vo\r\ne2fsck 1.42.9 (28-Dec-2013)\r\nPass 1: Checking inodes, blocks, and sizes\r\nPass 2: Checking directory structure\r\nPass 3: Checking directory connectivity\r\nPass 4: Checking reference counts\r\nPass 5: Checking group summary information\r\n\/dev\/storage\/vo: 11\/74000 files (0.0% non-contiguous), 15507\/299008 blocks\r\n<\/pre>\n\u7b2c2\u6b65<\/strong>\uff1a\u628a\u903b\u8f91\u5377vo\u7684\u5bb9\u91cf\u51cf\u5c0f\u5230120MB\u3002<\/p>\n[root@linuxprobe ~]# resize2fs \/dev\/storage\/vo 120M\r\nresize2fs 1.42.9 (28-Dec-2013)\r\nResizing the filesystem on \/dev\/storage\/vo to 122880 (1k) blocks.\r\nThe filesystem on \/dev\/storage\/vo is now 122880 blocks long.\r\n[root@linuxprobe ~]# lvreduce -L 120M \/dev\/storage\/vo\r\n WARNING: Reducing active logical volume to 120.00 MiB\r\n THIS MAY DESTROY YOUR DATA (filesystem etc.)\r\nDo you really want to reduce vo? [y\/n]: y\r\n Reducing logical volume vo to 120.00 MiB\r\n Logical volume vo successfully resized\r\n<\/pre>\n\u7b2c3\u6b65<\/strong>\uff1a\u91cd\u65b0\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u5e76\u67e5\u770b\u7cfb\u7edf\u72b6\u6001\u3002<\/p>\n[root@linuxprobe ~]# mount -a\r\n[root@linuxprobe ~]# df -h\r\nFilesystem Size Used Avail Use% Mounted on\r\n\/dev\/mapper\/rhel-root 18G 3.0G 15G 17% \/\r\ndevtmpfs 985M 0 985M 0% \/dev\r\ntmpfs 994M 80K 994M 1% \/dev\/shm\r\ntmpfs 994M 8.8M 986M 1% \/run\r\ntmpfs 994M 0 994M 0% \/sys\/fs\/cgroup\r\n\/dev\/sr0 3.5G 3.5G 0 100% \/media\/cdrom\r\n\/dev\/sda1 497M 119M 379M 24% \/boot\r\n\/dev\/mapper\/storage-vo 113M 1.6M 103M 2% \/linuxprobe<\/pre>\n\n 7.2.4 \u903b\u8f91\u5377\u5feb\u7167<\/strong><\/span><\/h6>\nLVM\u8fd8\u5177\u5907\u6709\u201c\u5feb\u7167\u5377\u201d\u529f\u80fd\uff0c\u8be5\u529f\u80fd\u7c7b\u4f3c\u4e8e\u865a\u62df\u673a\u8f6f\u4ef6\u7684\u8fd8\u539f\u65f6\u95f4\u70b9\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u5bf9\u67d0\u4e00\u4e2a\u903b\u8f91\u5377\u8bbe\u5907\u505a\u4e00\u6b21\u5feb\u7167\uff0c\u5982\u679c\u65e5\u540e\u53d1\u73b0\u6570\u636e\u88ab\u6539\u9519\u4e86\uff0c\u5c31\u53ef\u4ee5\u5229\u7528\u4e4b\u524d\u505a\u597d\u7684\u5feb\u7167\u5377\u8fdb\u884c\u8986\u76d6\u8fd8\u539f\u3002LVM\u7684\u5feb\u7167\u5377\u529f\u80fd\u6709\u4e24\u4e2a\u7279\u70b9\uff1a<\/p>\n \u5feb\u7167\u5377\u7684\u5bb9\u91cf\u5fc5\u987b\u7b49\u540c\u4e8e\u903b\u8f91\u5377\u7684\u5bb9\u91cf\uff1b<\/p>\n \u5feb\u7167\u5377\u4ec5\u4e00\u6b21\u6709\u6548\uff0c\u4e00\u65e6\u6267\u884c\u8fd8\u539f\u64cd\u4f5c\u540e\u5219\u4f1a\u88ab\u7acb\u5373\u81ea\u52a8\u5220\u9664\u3002<\/p><\/blockquote>\n \u9996\u5148\u67e5\u770b\u5377\u7ec4\u7684\u4fe1\u606f\u3002<\/p>\n [root@linuxprobe ~]# vgdisplay\r\n --- Volume group ---\r\n VG Name storage\r\n System ID \r\n Format lvm2\r\n Metadata Areas 2\r\n Metadata Sequence No 4\r\n VG Access read\/write\r\n VG Status resizable\r\n MAX LV 0\r\n Cur LV 1\r\n Open LV 1\r\n Max PV 0\r\n Cur PV 2\r\n Act PV 2\r\n VG Size 39.99 GiB\r\n PE Size 4.00 MiB\r\n Total PE 10238\r\n Alloc PE \/ Size 30 \/ 120.00 MiB<\/strong> Free PE \/ Size 10208 \/ 39.88 GiB<\/strong>\r\n VG UUID CTaHAK-0TQv-Abdb-R83O-RU6V-YYkx-8o2R0e\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\u901a\u8fc7\u5377\u7ec4\u7684\u8f93\u51fa\u4fe1\u606f\u53ef\u4ee5\u6e05\u6670\u770b\u5230\uff0c\u5377\u7ec4\u4e2d\u5df2\u7ecf\u4f7f\u7528\u4e86120MB\u7684\u5bb9\u91cf\uff0c\u7a7a\u95f2\u5bb9\u91cf\u8fd8\u670939.88GB\u3002\u63a5\u4e0b\u6765\u7528\u91cd\u5b9a\u5411\u5f80\u903b\u8f91\u5377\u8bbe\u5907\u6240\u6302\u8f7d\u7684\u76ee\u5f55\u4e2d\u5199\u5165\u4e00\u4e2a\u6587\u4ef6\u3002<\/p>\n [root@linuxprobe ~]# echo \"Welcome to lrxjmw.cn\" > \/linuxprobe\/readme.txt\r\n[root@linuxprobe ~]# ls -l \/linuxprobe\r\ntotal 14\r\ndrwx------. 2 root root 12288 Feb 1 07:18 lost+found\r\n-rw-r--r--. 1 root root 26 Feb 1 07:38 readme.txt\r\n<\/pre>\n\u7b2c1\u6b65<\/strong>\uff1a\u4f7f\u7528-s\u53c2\u6570\u751f\u6210\u4e00\u4e2a\u5feb\u7167\u5377\uff0c\u4f7f\u7528-L\u53c2\u6570\u6307\u5b9a\u5207\u5272\u7684\u5927\u5c0f\u3002\u53e6\u5916\uff0c\u8fd8\u9700\u8981\u5728\u547d\u4ee4\u540e\u9762\u5199\u4e0a\u662f\u9488\u5bf9\u54ea\u4e2a\u903b\u8f91\u5377\u6267\u884c\u7684\u5feb\u7167\u64cd\u4f5c\u3002<\/p>\n[root@linuxprobe ~]# lvcreate -L 120M -s -n SNAP \/dev\/storage\/vo\r\n Logical volume \"SNAP\" created\r\n[root@linuxprobe ~]# lvdisplay\r\n--- Logical volume ---\r\n LV Path \/dev\/storage\/SNAP<\/strong>\r\n LV Name SNAP\r\n VG Name storage<\/strong>\r\n LV UUID BC7WKg-fHoK-Pc7J-yhSd-vD7d-lUnl-TihKlt\r\n LV Write Access read\/write\r\n LV Creation host, time localhost.localdomain, 2017-02-01 07:42:31 -0500\r\n LV snapshot status active destination for vo<\/strong>\r\n LV Status available\r\n # open 0\r\n LV Size 120.00 MiB\r\n Current LE 30\r\n COW-table size 120.00 MiB\r\n COW-table LE 30\r\n Allocated to snapshot 0.01%<\/strong>\r\n Snapshot chunk size 4.00 KiB\r\n Segments 1\r\n Allocation inherit\r\n Read ahead sectors auto\r\n - currently set to 8192\r\n Block device 253:3\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\u7b2c2\u6b65<\/strong>\uff1a\u5728\u903b\u8f91\u5377\u6240\u6302\u8f7d\u7684\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2a100MB\u7684\u5783\u573e\u6587\u4ef6\uff0c\u7136\u540e\u518d\u67e5\u770b\u5feb\u7167\u5377\u7684\u72b6\u6001\u3002\u53ef\u4ee5\u53d1\u73b0\u5b58\u50a8\u7a7a\u95f4\u5360\u7684\u7528\u91cf\u4e0a\u5347\u4e86\u3002<\/p>\n[root@linuxprobe ~]# dd if=\/dev\/zero of=\/linuxprobe\/files count=1 bs=100M\r\n1+0 records in\r\n1+0 records out\r\n104857600 bytes (105 MB) copied, 3.35432 s, 31.3 MB\/s\r\n[root@linuxprobe ~]# lvdisplay\r\n --- Logical volume ---\r\n LV Path \/dev\/storage\/SNAP\r\n LV Name SNAP\r\n VG Name storage\r\n LV UUID BC7WKg-fHoK-Pc7J-yhSd-vD7d-lUnl-TihKlt\r\n LV Write Access read\/write\r\n LV Creation host, time localhost.localdomain, 2017-02-01 07:42:31 -0500\r\n LV snapshot status active destination for vo\r\n LV Status available\r\n # open 0\r\n LV Size 120.00 MiB\r\n Current LE 30\r\n COW-table size 120.00 MiB\r\n COW-table LE 30\r\n Allocated to snapshot 83.71%<\/strong>\r\n Snapshot chunk size 4.00 KiB\r\n Segments 1\r\n Allocation inherit\r\n Read ahead sectors auto\r\n - currently set to 8192\r\n Block device 253:3<\/pre>\n\u7b2c3\u6b65<\/strong>\uff1a\u4e3a\u4e86\u6821\u9a8cSNAP\u5feb\u7167\u5377\u7684\u6548\u679c\uff0c\u9700\u8981\u5bf9\u903b\u8f91\u5377\u8fdb\u884c\u5feb\u7167\u8fd8\u539f\u64cd\u4f5c\u3002\u5728\u6b64\u4e4b\u524d\u8bb0\u5f97\u5148\u5378\u8f7d\u6389\u903b\u8f91\u5377\u8bbe\u5907\u4e0e\u76ee\u5f55\u7684\u6302\u8f7d\u3002<\/p>\n[root@linuxprobe ~]# umount \/linuxprobe\r\n[root@linuxprobe ~]# lvconvert --merge \/dev\/storage\/SNAP\r\n Merging of volume SNAP started.\r\n vo: Merged: 21.4%\r\n vo: Merged: 100.0%\r\n Merge of snapshot into logical volume vo has finished.\r\n Logical volume \"SNAP\" successfully removed\r\n<\/pre>\n\u7b2c4\u6b65<\/strong>\uff1a\u5feb\u7167\u5377\u4f1a\u88ab\u81ea\u52a8\u5220\u9664\u6389\uff0c\u5e76\u4e14\u521a\u521a\u5728\u903b\u8f91\u5377\u8bbe\u5907\u88ab\u6267\u884c\u5feb\u7167\u64cd\u4f5c\u540e\u518d\u521b\u5efa\u51fa\u6765\u7684100MB\u7684\u5783\u573e\u6587\u4ef6\u4e5f\u88ab\u6e05\u9664\u4e86\u3002<\/p>\n[root@linuxprobe ~]# mount -a\r\n[root@linuxprobe ~]# ls \/linuxprobe\/\r\nlost+found readme.txt<\/pre>\n7.2.5 \u5220\u9664\u903b\u8f91\u5377<\/strong><\/span><\/h6>\n\u5f53\u751f\u4ea7\u73af\u5883\u4e2d\u60f3\u8981\u91cd\u65b0\u90e8\u7f72LVM\u6216\u8005\u4e0d\u518d\u9700\u8981\u4f7f\u7528LVM\u65f6\uff0c\u5219\u9700\u8981\u6267\u884cLVM\u7684\u5220\u9664\u64cd\u4f5c\u3002\u4e3a\u6b64\uff0c\u9700\u8981\u63d0\u524d\u5907\u4efd\u597d\u91cd\u8981\u7684\u6570\u636e\u4fe1\u606f\uff0c\u7136\u540e\u4f9d\u6b21\u5220\u9664\u903b\u8f91\u5377\u3001\u5377\u7ec4\u3001\u7269\u7406\u5377\u8bbe\u5907\uff0c\u8fd9\u4e2a\u987a\u5e8f\u4e0d\u53ef\u98a0\u5012\u3002<\/p>\n \u7b2c1\u6b65<\/strong>\uff1a\u53d6\u6d88\u903b\u8f91\u5377\u4e0e\u76ee\u5f55\u7684\u6302\u8f7d\u5173\u8054\uff0c\u5220\u9664\u914d\u7f6e\u6587\u4ef6\u4e2d\u6c38\u4e45\u751f\u6548\u7684\u8bbe\u5907\u53c2\u6570\u3002<\/p>\n[root@linuxprobe ~]# umount \/linuxprobe\r\n[root@linuxprobe ~]# vim \/etc\/fstab\r\n#\r\n# \/etc\/fstab\r\n# Created by anaconda on Fri Feb 19 22:08:59 2017\r\n#\r\n# Accessible filesystems, by reference, are maintained under '\/dev\/disk'\r\n# See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info\r\n#\r\n\/dev\/mapper\/rhel-root \/ xfs defaults 1 1\r\nUUID=50591e35-d47a-4aeb-a0ca-1b4e8336d9b1 \/boot xfs defaults 1 2\r\n\/dev\/mapper\/rhel-swap swap swap defaults 0 0\r\n\/dev\/cdrom \/media\/cdrom iso9660 defaults 0 0 \r\n\/dev\/storage\/vo \/linuxprobe ext4 defaults 0 0<\/del><\/pre>\n\u7b2c2\u6b65<\/strong>\uff1a\u5220\u9664\u903b\u8f91\u5377\u8bbe\u5907\uff0c\u9700\u8981\u8f93\u5165y\u6765\u786e\u8ba4\u64cd\u4f5c\u3002<\/p>\n[root@linuxprobe ~]# lvremove \/dev\/storage\/vo \r\nDo you really want to remove active logical volume vo? [y\/n]: y<\/strong>\r\n Logical volume \"vo\" successfully removed\r\n<\/pre>\n\u7b2c3\u6b65<\/strong>\uff1a\u5220\u9664\u5377\u7ec4\uff0c\u6b64\u5904\u53ea\u5199\u5377\u7ec4\u540d\u79f0\u5373\u53ef\uff0c\u4e0d\u9700\u8981\u8bbe\u5907\u7684\u7edd\u5bf9\u8def\u5f84\u3002<\/p>\n[root@linuxprobe ~]# vgremove storage\r\n Volume group \"storage\" successfully removed<\/pre>\n<\/div>\n\u7b2c4\u6b65<\/strong>\uff1a\u5220\u9664\u7269\u7406\u5377\u8bbe\u5907\u3002<\/p>\n[root@linuxprobe ~]# pvremove \/dev\/sdb \/dev\/sdc\r\n Labels on physical volume \"\/dev\/sdb\" successfully wiped\r\n Labels on physical volume \"\/dev\/sdc\" successfully wiped<\/pre>\n\u5728\u4e0a\u8ff0\u64cd\u4f5c\u6267\u884c\u5b8c\u6bd5\u4e4b\u540e\uff0c\u518d\u6267\u884clvdisplay\u3001vgdisplay\u3001pvdisplay\u547d\u4ee4\u6765\u67e5\u770bLVM\u7684\u4fe1\u606f\u65f6\u5c31\u4e0d\u4f1a\u518d\u770b\u5230\u4fe1\u606f\u4e86\uff08\u524d\u63d0\u662f\u4e0a\u8ff0\u6b65\u9aa4\u7684\u64cd\u4f5c\u662f\u6b63\u786e\u7684\uff09\u3002<\/p>\n \u672c\u7ae0\u8282\u7684\u590d\u4e60\u4f5c\u4e1a(\u7b54\u6848\u5c31\u5728\u95ee\u9898\u7684\u4e0b\u4e00\u884c\u54e6\uff0c\u7528\u9f20\u6807\u9009\u4e2d\u5373\u53ef\u770b\u5230\u7684~)<\/span><\/span><\/strong><\/p>\n1\uff0e\u00a0RAID\u6280\u672f\u4e3b\u8981\u662f\u4e3a\u4e86\u89e3\u51b3\u4ec0\u4e48\u95ee\u9898\u5462\uff1f<\/p>\n \u7b54\uff1a<\/strong>RAID\u6280\u672f\u53ef\u4ee5\u89e3\u51b3\u5b58\u50a8\u8bbe\u5907\u7684\u8bfb\u5199\u901f\u5ea6\u95ee\u9898\u53ca\u6570\u636e\u7684\u5197\u4f59\u5907\u4efd\u95ee\u9898\u3002<\/span><\/p>\n2\uff0e\u00a0RAID 0\u548cRAID 5\u54ea\u4e2a\u66f4\u5b89\u5168\uff1f<\/p>\n \u7b54\uff1a<\/strong>RAID 0\u6ca1\u6709\u6570\u636e\u5197\u4f59\u529f\u80fd\uff0c\u56e0\u6b64RAID 5\u66f4\u5b89\u5168\u3002<\/span><\/p>\n3\uff0e\u5047\u8bbe\u4f7f\u75284\u5757\u786c\u76d8\u6765\u90e8\u7f72RAID 10\u65b9\u6848\uff0c\u5916\u52a0\u4e00\u5757\u5907\u4efd\u76d8\uff0c\u6700\u591a\u53ef\u4ee5\u5141\u8bb8\u51e0\u5757\u786c\u76d8\u540c\u65f6\u635f\u574f\u5462\uff1f<\/p>\n \u7b54\uff1a<\/strong>\u6700\u591a\u5141\u8bb85\u5757\u786c\u76d8\u8bbe\u5907\u4e2d\u76843\u5757\u8bbe\u5907\u540c\u65f6\u635f\u574f\u3002<\/span><\/p>\n4\uff0e\u4f4d\u4e8eLVM\u6700\u5e95\u5c42\u7684\u662f\u7269\u7406\u5377\u8fd8\u662f\u5377\u7ec4\uff1f<\/p>\n \u7b54\uff1a<\/strong>\u6700\u5e95\u5c42\u7684\u662f\u7269\u7406\u5377\uff0c\u7136\u540e\u5728\u901a\u8fc7\u7269\u7406\u5377\u7ec4\u6210\u5377\u7ec4\u3002<\/span><\/p>\n5\uff0e\u00a0LVM\u5bf9\u903b\u8f91\u5377\u7684\u6269\u5bb9\u548c\u7f29\u5bb9\u64cd\u4f5c\u6709\u4f55\u5f02\u540c\u70b9\u5462\uff1f<\/p>\n \u7b54\uff1a<\/strong>\u6269\u5bb9\u548c\u7f29\u5bb9\u64cd\u4f5c\u90fd\u9700\u8981\u5148\u53d6\u6d88\u903b\u8f91\u5377\u4e0e\u76ee\u5f55\u7684\u6302\u8f7d\u5173\u8054\uff1b\u6269\u5bb9\u64cd\u4f5c\u662f\u5148\u6269\u5bb9\u540e\u68c0\u67e5\u6587\u4ef6\u7cfb\u7edf\u5b8c\u6574\u6027\uff0c\u800c\u7f29\u5bb9\u64cd\u4f5c\u4e3a\u4e86\u4fdd\u8bc1\u6570\u636e\u7684\u5b89\u5168\uff0c\u9700\u8981\u5148\u68c0\u67e5\u6587\u4ef6\u7cfb\u7edf\u5b8c\u6574\u6027\u518d\u7f29\u5bb9\u3002<\/span><\/p>\n6\uff0e\u00a0LVM\u7684\u5feb\u7167\u5377\u80fd\u4f7f\u7528\u51e0\u6b21\uff1f<\/p>\n \u7b54\uff1a<\/strong>\u53ea\u53ef\u4f7f\u7528\u4e00\u6b21\uff0c\u800c\u4e14\u4f7f\u7528\u540e\u5373\u81ea\u52a8\u5220\u9664\u3002<\/span><\/p>\n7\uff0e\u00a0LVM\u7684\u5220\u9664\u987a\u5e8f\u662f\u600e\u4e48\u6837\u7684\uff1f<\/p>\n \u7b54\uff1a<\/strong>\u4f9d\u6b21\u79fb\u9664\u903b\u8f91\u5377\u3001\u5377\u7ec4\u548c\u7269\u7406\u5377\u3002<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"👇\u672c\u7ae0\u8282\u5185\u5bb9\u5df2\u66f4\u65b0\uff0c\u8bf7\u5728\u7ebf\u9605\u8bfb\u6700\u65b0RHEL 8\u7248\u672c\u4e66\u7c4d 👇 https:\/\/w […]<\/p>\n","protected":false},"author":1,"featured_media":17172,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[558],"tags":[],"class_list":["post-17152","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rhel7"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/17152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=17152"}],"version-history":[{"count":83,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/17152\/revisions"}],"predecessor-version":[{"id":218015,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/17152\/revisions\/218015"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/17172"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=17152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=17152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=17152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
|