{"id":5468,"date":"2021-01-09T12:09:25","date_gmt":"2021-01-09T04:09:25","guid":{"rendered":"http:\/\/39.97.231.10\/?p=5468"},"modified":"2021-01-09T12:09:25","modified_gmt":"2021-01-09T04:09:25","slug":"%e9%98%bf%e9%87%8c%e4%ba%91%e6%b7%bb%e5%8a%a0%e6%95%b0%e6%8d%ae%e7%9b%98parted%e6%96%b9%e5%bc%8f%e5%88%86%e5%8c%ba%e6%a0%bc%e5%bc%8f%e5%8c%96%e5%92%8clvm%e6%8c%82%e8%bd%bd%e5%8f%8a%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=5468","title":{"rendered":"\u963f\u91cc\u4e91\u6dfb\u52a0\u6570\u636e\u76d8parted\u65b9\u5f0f\u5206\u533a\u683c\u5f0f\u5316\u548clvm\u6302\u8f7d\u53ca\u6570\u636e\u76d8\u7684\u6269\u5bb9"},"content":{"rendered":"<h1>\u4e00\u3001\u666e\u901a\u78c1\u76d8\u5206\u533a\u7ba1\u7406\u65b9\u5f0f<\/h1>\n<p>1.\u5bf9\u78c1\u76d8\u8fdb\u884c\u5206\u533a<br \/>\u5217\u51fa\u78c1\u76d8<br \/># fdisk -l<br \/><br \/># fdisk \/dev\/vdb<br \/>Welcome to fdisk (util-linux 2.23.2).<br \/><br \/>Changes will remain in memory only, until you decide to write them.<br \/>Be careful before using the write command.<br \/><br \/>Device does not contain a recognized partition table<br \/>Building a new DOS disklabel with disk identifier 0x4765885b.<br \/><br \/>Command (m for help): n<br \/>Partition type:<br \/>\u00a0 \u00a0p \u00a0 primary (0 primary, 0 extended, 4 free)<br \/>\u00a0 \u00a0e \u00a0 extended<br \/>Select (default p): p<br \/>Partition number (1-4, default 1): 1<br \/>First sector (2048-2097151999, default 2048):\u00a0<br \/>Using default value 2048<br \/>Last sector, +sectors or +size{K,M,G} (2048-2097151999, default 2097151999):\u00a0<br \/>Using default value 2097151999<br \/>Partition 1 of type Linux and of size 1000 GiB is set<br \/><br \/>Command (m for help): w<br \/>The partition table has been altered!<br \/><br \/>Calling ioctl() to re-read partition table.<br \/>Syncing disks.<br \/># fdisk -l<br \/><br \/>Disk \/dev\/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors<br \/>Units = sectors of 1 * 512 = 512 bytes<br \/>Sector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>Disk label type: dos<br \/>Disk identifier: 0x635e6c7d<br \/><br \/>\u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/>\/dev\/vda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02048 \u00a0 \u00a083886079 \u00a0 \u00a041942016 \u00a0 83 \u00a0Linux<br \/><br \/>Disk \/dev\/vdb: 1073.7 GB, 1073741824000 bytes, 2097152000 sectors<br \/>Units = sectors of 1 * 512 = 512 bytes<br \/>Sector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>Disk label type: dos<br \/>Disk identifier: 0x4765885b<br \/><br \/>\u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/>\/dev\/vdb1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02048 \u00a02097151999 \u00a01048574976 \u00a0 83 \u00a0Linux<br \/><br \/>2.\u5bf9\u78c1\u76d8\u683c\u5f0f\u5316\u6210ext4\u683c\u5f0f<br \/># mkfs.ext4 \/dev\/vdb1<br \/>mke2fs 1.42.9 (28-Dec-2013)<br \/>Filesystem label=<br \/>OS type: Linux<br \/>Block size=4096 (log=2)<br \/>Fragment size=4096 (log=2)<br \/>Stride=0 blocks, Stripe width=0 blocks<br \/>65536000 inodes, 262143744 blocks<br \/>13107187 blocks (5.00%) reserved for the super user<br \/>First data block=0<br \/>Maximum filesystem blocks=2409627648<br \/>8000 block groups<br \/>32768 blocks per group, 32768 fragments per group<br \/>8192 inodes per group<br \/>Superblock backups stored on blocks:\u00a0<br \/>32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,\u00a0<br \/>4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,\u00a0<br \/>102400000, 214990848<br \/><br \/>Allocating group tables: done \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Writing inode tables: done \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Creating journal (32768 blocks): done<br \/>Writing superblocks and filesystem accounting information: done<br \/><br \/>3.\u5c06\u65b0\u7684\u78c1\u76d8\u6302\u8f7d\u5728\/data\u76ee\u5f55\u4e0b<br \/>mkdir \/data<br \/># mount \/dev\/vdb1 \/data<br \/><br \/>\u67e5\u770b\u662f\u5426\u6302\u8f7d\u6210\u529f<br \/># df -Th<br \/>Filesystem \u00a0 \u00a0 Type \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/>\/dev\/vda1 \u00a0 \u00a0 \u00a0ext4 \u00a0 \u00a0 \u00a0 40G \u00a01.3G \u00a0 37G \u00a0 4% \/<br \/>devtmpfs \u00a0 \u00a0 \u00a0 devtmpfs \u00a0 32G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev\/shm<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 \u00a032G \u00a0292K \u00a0 32G \u00a0 1% \/run<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/sys\/fs\/cgroup<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 6.3G \u00a0 \u00a0 0 \u00a06.3G \u00a0 0% \/run\/user\/0<br \/>\/dev\/vdb1 \u00a0 \u00a0 \u00a0ext4 \u00a0 \u00a0 \u00a0985G \u00a0 77M \u00a0935G \u00a0 1% \/data<br \/><br \/>4.\u6dfb\u52a0\u81ea\u52a8\u6302\u8f7d\uff0c\u91cd\u542f\u7cfb\u7edf\u540e\u4f9d\u7136\u751f\u6548<br \/><br \/>vim \/etc\/fstab<br \/>\/dev\/vdb1 \/data ext4 defaults 0 0<\/p>\n<h2>\u4e5f\u53ef\u4ee5\u901a\u8fc7uuid\u7684\u65b9\u5f0f\u8fdb\u884c\u6302\u8f7d<\/h2>\n<p># mkdir \/data<br \/># mount \/dev\/vdb1 \/data<br \/><br \/>\u2460\u4f7f\u7528lsblk\u547d\u4ee4\u53ef\u4ee5\u6e05\u6670\u7684\u83b7\u53d6\u5168\u5c40\u7684\u5757\u8bbe\u5907\u5e03\u5c40<br \/># lsblk<br \/>NAME \u00a0 MAJ:MIN RM \u00a0 SIZE RO TYPE MOUNTPOINT<br \/>sr0 \u00a0 \u00a0 11:0 \u00a0 \u00a01 \u00a01024M \u00a00 rom \u00a0<br \/>vda \u00a0 \u00a0253:0 \u00a0 \u00a00 \u00a0 \u00a040G \u00a00 disk\u00a0<br \/>\u2514\u2500vda1 253:1 \u00a0 \u00a00 \u00a0 \u00a040G \u00a00 part \/<br \/>vdb \u00a0 \u00a0253:16 \u00a0 0 \u00a0 150G \u00a00 disk\u00a0<br \/>\u2514\u2500vdb1 253:17 \u00a0 0 \u00a0 150G \u00a00 part\u00a0<br \/><br \/>\u2461\u4f7f\u7528blkid\u547d\u4ee4\u53ef\u4ee5\u83b7\u53d6\u8bbe\u5907\u7684UUID\uff0c\u590d\u5236\u8bb0\u4e0bvdb1\u7684UUID<br \/># blkid<br \/>\/dev\/vda1: UUID=\\&#8221;af414ad8-9936-46cd-b074-528854656fcd\\&#8221; TYPE=\\&#8221;ext4\\&#8221;\u00a0<br \/>\/dev\/vdb1: UUID=\\&#8221;a2dc5e87-a07a-4976-86c3-d13b3d264124\\&#8221; TYPE=\\&#8221;ext4\\&#8221;\u00a0<br \/><br \/>\u2462\u5f00\u673a\u6302\u8f7d\u78c1\u76d8<br \/>vim \/etc\/fstab<br \/>UUID=a2dc5e87-a07a-4976-86c3-d13b3d264124 \/data ext4 defaults 0 0<\/p>\n<h1>\u4e8c\u3001\u903b\u8f91\u5377\u7684\u65b9\u5f0f<\/h1>\n<div>\u5b89\u88c5\u903b\u8f91\u5377\u7ba1\u7406\u3001vim\u3001unzip\u3001iftop\u7b49\u5de5\u5177<br \/>yum install -y lvm2 vim unzip iftop<br \/><br \/># fdisk -l<br \/><br \/>Disk \/dev\/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors<br \/>Units = sectors of 1 * 512 = 512 bytes<br \/>Sector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>Disk label type: dos<br \/>Disk identifier: 0x635e6c7d<br \/><br \/>\u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/>\/dev\/vda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02048 \u00a0 \u00a083886079 \u00a0 \u00a041942016 \u00a0 83 \u00a0Linux<br \/><br \/>Disk \/dev\/vdb: 2147.5 GB, 2147483648000 bytes, 4194304000 sectors<br \/>Units = sectors of 1 * 512 = 512 bytes<br \/>Sector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/><br \/># fdisk \/dev\/vdb<br \/>Welcome to fdisk (util-linux 2.23.2).<br \/><br \/>Changes will remain in memory only, until you decide to write them.<br \/>Be careful before using the write command.<br \/><br \/>Device does not contain a recognized partition table<br \/>Building a new DOS disklabel with disk identifier 0x31ab9b87.<br \/><br \/>Command (m for help): n<br \/>Partition type:<br \/>\u00a0 \u00a0p \u00a0 primary (0 primary, 0 extended, 4 free)<br \/>\u00a0 \u00a0e \u00a0 extended<br \/>Select (default p): p<br \/>Partition number (1-4, default 1): 1<br \/>First sector (2048-4194303999, default 2048):\u00a0<br \/>Using default value 2048<br \/>Last sector, +sectors or +size{K,M,G} (2048-4194303999, default 4194303999):\u00a0<br \/>Using default value 4194303999<br \/>Partition 1 of type Linux and of size 2 TiB is set<\/div>\n<div>\u00a0<\/div>\n<div>Command (m for help):\u00a0t<br \/>Selected partition 1<br \/>Hex code (type L to list codes): L<br \/><br \/>\u00a00 \u00a0Empty \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 24 \u00a0NEC DOS \u00a0 \u00a0 \u00a0 \u00a0 81 \u00a0Minix \/ old Lin bf \u00a0Solaris \u00a0 \u00a0 \u00a0 \u00a0<br \/>\u00a01 \u00a0FAT12 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 39 \u00a0Plan 9 \u00a0 \u00a0 \u00a0 \u00a0 \u00a082 \u00a0Linux swap \/ So c1 \u00a0DRDOS\/sec (FAT-<br \/>\u00a02 \u00a0XENIX root \u00a0 \u00a0 \u00a03c \u00a0PartitionMagic \u00a083 \u00a0Linux \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 c4 \u00a0DRDOS\/sec (FAT-<br \/>\u00a03 \u00a0XENIX usr \u00a0 \u00a0 \u00a0 40 \u00a0Venix 80286 \u00a0 \u00a0 84 \u00a0OS\/2 hidden C: \u00a0c6 \u00a0DRDOS\/sec (FAT-<br \/>\u00a04 \u00a0FAT16 &lt;32M \u00a0 \u00a0 \u00a041 \u00a0PPC PReP Boot \u00a0 85 \u00a0Linux extended \u00a0c7 \u00a0Syrinx \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>\u00a05 \u00a0Extended \u00a0 \u00a0 \u00a0 \u00a042 \u00a0SFS \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 86 \u00a0NTFS volume set da \u00a0Non-FS data \u00a0 \u00a0<br \/>\u00a06 \u00a0FAT16 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4d \u00a0QNX4.x \u00a0 \u00a0 \u00a0 \u00a0 \u00a087 \u00a0NTFS volume set db \u00a0CP\/M \/ CTOS \/ .<br \/>\u00a07 \u00a0HPFS\/NTFS \u00a0 \u00a0 \u00a0 4e \u00a0QNX4.x 2nd part 88 \u00a0Linux plaintext de \u00a0Dell Utility \u00a0\u00a0<br \/>\u00a08 \u00a0AIX \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4f \u00a0QNX4.x 3rd part 8e \u00a0Linux LVM \u00a0 \u00a0 \u00a0 df \u00a0BootIt \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>\u00a09 \u00a0AIX bootable \u00a0 \u00a050 \u00a0OnTrack DM \u00a0 \u00a0 \u00a093 \u00a0Amoeba \u00a0 \u00a0 \u00a0 \u00a0 \u00a0e1 \u00a0DOS access \u00a0 \u00a0\u00a0<br \/>\u00a0a \u00a0OS\/2 Boot Manag 51 \u00a0OnTrack DM6 Aux 94 \u00a0Amoeba BBT \u00a0 \u00a0 \u00a0e3 \u00a0DOS R\/O \u00a0 \u00a0 \u00a0 \u00a0<br \/>\u00a0b \u00a0W95 FAT32 \u00a0 \u00a0 \u00a0 52 \u00a0CP\/M \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a09f \u00a0BSD\/OS \u00a0 \u00a0 \u00a0 \u00a0 \u00a0e4 \u00a0SpeedStor \u00a0 \u00a0 \u00a0<br \/>\u00a0c \u00a0W95 FAT32 (LBA) 53 \u00a0OnTrack DM6 Aux a0 \u00a0IBM Thinkpad hi eb \u00a0BeOS fs \u00a0 \u00a0 \u00a0 \u00a0<br \/>\u00a0e \u00a0W95 FAT16 (LBA) 54 \u00a0OnTrackDM6 \u00a0 \u00a0 \u00a0a5 \u00a0FreeBSD \u00a0 \u00a0 \u00a0 \u00a0 ee \u00a0GPT \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\u00a0f \u00a0W95 Ext\\&#8217;d (LBA) 55 \u00a0EZ-Drive \u00a0 \u00a0 \u00a0 \u00a0a6 \u00a0OpenBSD \u00a0 \u00a0 \u00a0 \u00a0 ef \u00a0EFI (FAT-12\/16\/<br \/>10 \u00a0OPUS \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a056 \u00a0Golden Bow \u00a0 \u00a0 \u00a0a7 \u00a0NeXTSTEP \u00a0 \u00a0 \u00a0 \u00a0f0 \u00a0Linux\/PA-RISC b<br \/>11 \u00a0Hidden FAT12 \u00a0 \u00a05c \u00a0Priam Edisk \u00a0 \u00a0 a8 \u00a0Darwin UFS \u00a0 \u00a0 \u00a0f1 \u00a0SpeedStor \u00a0 \u00a0 \u00a0<br \/>12 \u00a0Compaq diagnost 61 \u00a0SpeedStor \u00a0 \u00a0 \u00a0 a9 \u00a0NetBSD \u00a0 \u00a0 \u00a0 \u00a0 \u00a0f4 \u00a0SpeedStor \u00a0 \u00a0 \u00a0<br \/>14 \u00a0Hidden FAT16 &lt;3 63 \u00a0GNU HURD or Sys ab \u00a0Darwin boot \u00a0 \u00a0 f2 \u00a0DOS secondary \u00a0<br \/>16 \u00a0Hidden FAT16 \u00a0 \u00a064 \u00a0Novell Netware \u00a0af \u00a0HFS \/ HFS+ \u00a0 \u00a0 \u00a0fb \u00a0VMware VMFS \u00a0 \u00a0<br \/>17 \u00a0Hidden HPFS\/NTF 65 \u00a0Novell Netware \u00a0b7 \u00a0BSDI fs \u00a0 \u00a0 \u00a0 \u00a0 fc \u00a0VMware VMKCORE\u00a0<br \/>18 \u00a0AST SmartSleep \u00a070 \u00a0DiskSecure Mult b8 \u00a0BSDI swap \u00a0 \u00a0 \u00a0 fd \u00a0Linux raid auto<br \/>1b \u00a0Hidden W95 FAT3 75 \u00a0PC\/IX \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 bb \u00a0Boot Wizard hid fe \u00a0LANstep \u00a0 \u00a0 \u00a0 \u00a0<br \/>1c \u00a0Hidden W95 FAT3 80 \u00a0Old Minix \u00a0 \u00a0 \u00a0 be \u00a0Solaris boot \u00a0 \u00a0ff \u00a0BBT \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>1e \u00a0Hidden W95 FAT1<br \/>Hex code (type L to list codes):\u00a08e<br \/>Changed system type of partition 1 to 8e (Linux LVM)<br \/><br \/>Command (m for help): w<br \/>The partition table has been altered!<br \/><br \/># \u89c4\u8303\u7684\u505a\u6cd5\u662f\u5728\u5206\u533a\u65f6\u9700\u8981\u4e00\u4e2a\u4fee\u6539\u78c1\u76d8\u5206\u533a\u683c\u5f0f\u4e3alinux lvm \u4ee3\u7801\u4e3a8e\u7684\u64cd\u4f5c<br \/><br \/>Command (m for help): w<br \/>The partition table has been altered!<br \/><br \/>Calling ioctl() to re-read partition table.<br \/>Syncing disks.<br \/># cat \/proc\/partitions<br \/>major minor \u00a0#blocks \u00a0name<br \/><br \/>\u00a0 11 \u00a0 \u00a0 \u00a0 \u00a00 \u00a0 \u00a01048575 sr0<br \/>\u00a0253 \u00a0 \u00a0 \u00a0 \u00a00 \u00a0 41943040 vda<br \/>\u00a0253 \u00a0 \u00a0 \u00a0 \u00a01 \u00a0 41942016 vda1<br \/>\u00a0253 \u00a0 \u00a0 \u00a0 16 2097152000 vdb<br \/>\u00a0253 \u00a0 \u00a0 \u00a0 17 2097150976 vdb1<br \/><br \/># pvcreate \/dev\/vdb1<br \/>\u00a0 Physical volume \\&#8221;\/dev\/vdb1\\&#8221; successfully created.<br \/># vgcreate myvg \/dev\/vdb1<br \/>\u00a0 Volume group \\&#8221;myvg\\&#8221; successfully created<br \/># vgdisplay\u00a0<br \/>\u00a0 &#8212; Volume group &#8212;<br \/>\u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 myvg<br \/>\u00a0 System ID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>\u00a0 Format \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0lvm2<br \/>\u00a0 Metadata Areas \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 Metadata Sequence No \u00a01<br \/>\u00a0 VG Access \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 read\/write<br \/>\u00a0 VG Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 resizable<br \/>\u00a0 MAX LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Cur LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Open LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 0<br \/>\u00a0 Max PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Cur PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 Act PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 VG Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1.95 TiB<br \/>\u00a0 PE Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4.00 MiB<br \/>\u00a0 Total PE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0511999<br \/>\u00a0 Alloc PE \/ Size \u00a0 \u00a0 \u00a0 0 \/ 0 \u00a0\u00a0<br \/>\u00a0 Free \u00a0PE \/ Size \u00a0 \u00a0 \u00a0 511999 \/ 1.95 TiB<br \/>\u00a0 VG UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 RpMeCU-gIV2-kEe5-fe6C-8iVI-xe0i-vf4ocp<br \/>\u00a0 \u00a0<br \/># lvcreate -L 1.95T -n mylv myvg<br \/>\u00a0 Rounding up size to full physical extent 1.95 TiB<br \/>\u00a0 Logical volume \\&#8221;mylv\\&#8221; created.<br \/># lvdisplay\u00a0<br \/>\u00a0 &#8212; Logical volume &#8212;<br \/>\u00a0 LV Path \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/dev\/myvg\/mylv<br \/>\u00a0 LV Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0mylv<br \/>\u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0myvg<br \/>\u00a0 LV UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0e1nL7K-0qyc-BHt8-x9oO-1gGC-6qWn-a52o6x<br \/>\u00a0 LV Write Access \u00a0 \u00a0 \u00a0 \u00a0read\/write<br \/>\u00a0 LV Creation host, time iZ2ze47of4mpxkhhzcgjheZ, 2017-01-07 12:18:26 +0800<br \/>\u00a0 LV Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0available<br \/>\u00a0 # open \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 0<br \/>\u00a0 LV Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01.95 TiB<br \/>\u00a0 Current LE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 511181<br \/>\u00a0 Segments \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<br \/>\u00a0 Allocation \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 inherit<br \/>\u00a0 Read ahead sectors \u00a0 \u00a0 auto<br \/>\u00a0 &#8211; currently set to \u00a0 \u00a0 256<br \/>\u00a0 Block device \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 252:0<br \/>\u00a0 \u00a0<br \/># mke2fs -t ext4 -b 2048 \/dev\/myvg\/mylv\u00a0<br \/>mke2fs 1.42.9 (28-Dec-2013)<br \/>Filesystem label=<br \/>OS type: Linux<br \/>Block size=2048 (log=1)<br \/>Fragment size=2048 (log=1)<br \/>Stride=0 blocks, Stripe width=0 blocks<br \/>130863104 inodes, 1046898688 blocks<br \/>52344934 blocks (5.00%) reserved for the super user<br \/>First data block=0<br \/>Maximum filesystem blocks=1315438592<br \/>63898 block groups<br \/>16384 blocks per group, 16384 fragments per group<br \/>2048 inodes per group<br \/>Superblock backups stored on blocks:\u00a0<br \/>16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816, 1327104,\u00a0<br \/>2048000, 3981312, 5619712, 10240000, 11943936, 35831808, 39337984,\u00a0<br \/>51200000, 107495424, 256000000, 275365888, 322486272, 967458816<br \/><br \/><br \/>Allocating group tables: done \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Writing inode tables: done \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Creating journal (32768 blocks): done<br \/>Writing superblocks and filesystem accounting information: done \u00a0\u00a0<br \/><br \/><br \/># mkdir \/data<br \/># mount \/dev\/myvg\/mylv \/data<br \/># df -Th<br \/>Filesystem \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Type \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/>\/dev\/vda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ext4 \u00a0 \u00a0 \u00a0 40G \u00a01.3G \u00a0 37G \u00a0 4% \/<br \/>devtmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0devtmpfs \u00a0 32G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev\/shm<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 \u00a032G \u00a0356K \u00a0 32G \u00a0 1% \/run<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/sys\/fs\/cgroup<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 6.3G \u00a0 \u00a0 0 \u00a06.3G \u00a0 0% \/run\/user\/0<br \/>\/dev\/mapper\/myvg-mylv ext4 \u00a0 \u00a0 \u00a02.0T \u00a0 24M \u00a01.9T \u00a0 1% \/data<br \/><br \/><br \/>\u5f00\u673a\u81ea\u542f\u52a8\u6302\u8f7d\u5206\u533a<br \/>vim \/etc\/fstab<br \/>\u52a0\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<br \/>\/dev\/myvg\/mylv \/data ext4 defaults,noatime 0 0<br \/><br \/><br \/># cat \/etc\/fstab\u00a0<br \/><br \/>#<br \/># \/etc\/fstab<br \/># Created by anaconda on Tue May \u00a03 13:48:10 2016<br \/>#<br \/># Accessible filesystems, by reference, are maintained under \\&#8217;\/dev\/disk\\&#8217;<br \/># See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info<br \/>#<br \/>UUID=80b9b662-0a1d-4e84-b07b-c1bf19e72d97 \/ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ext4 \u00a0 \u00a0defaults \u00a0 \u00a0 \u00a0 \u00a01 1<br \/>\/dev\/myvg\/mylv \/data ext4 defaults,noatime 0 0<\/div>\n<div>\u00a0<\/div>\n<h1>\u903b\u8f91\u5377\u6269\u5bb9\u7684\u793a\u4f8b<\/h1>\n<div>\u793a\u4f8b\uff1a\u5c06\/aliyun\u7684\u903b\u8f91\u5377\u5206\u533a\u7531110G\u589e\u52a0\u5230150G<br \/><br \/># vgdisplay myvg<br \/>\u00a0 &#8212; Volume group &#8212;<br \/>\u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 myvg<br \/>\u00a0 System ID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>\u00a0 Format \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0lvm2<br \/>\u00a0 Metadata Areas \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 Metadata Sequence No \u00a02<br \/>\u00a0 VG Access \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 read\/write<br \/>\u00a0 VG Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 resizable<br \/>\u00a0 MAX LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Cur LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 Open LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<br \/>\u00a0 Max PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Cur PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 Act PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 VG Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 120.00 GiB<br \/>\u00a0 PE Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4.00 MiB<br \/>\u00a0 Total PE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a030719<br \/>\u00a0 Alloc PE \/ Size \u00a0 \u00a0 \u00a0 28160 \/ 110.00 GiB<br \/>\u00a0 Free \u00a0PE \/ Size \u00a0 \u00a0 \u00a0 2559 \/ 10.00 GiB<br \/>\u00a0 VG UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 v5LSS8-E5HW-htEL-ioet-Up3T-zUFz-vtCzlA<br \/><br \/><br \/>[root@mini2 ~]# df -Th<br \/>Filesystem \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Type \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/>\/dev\/mapper\/centos-root xfs \u00a0 \u00a0 \u00a0 \u00a030G \u00a01.8G \u00a0 29G \u00a0 6% \/<br \/>devtmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0devtmpfs \u00a0907M \u00a0 \u00a0 0 \u00a0907M \u00a0 0% \/dev<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 917M \u00a0 \u00a0 0 \u00a0917M \u00a0 0% \/dev\/shm<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 917M \u00a08.6M \u00a0908M \u00a0 1% \/run<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 917M \u00a0 \u00a0 0 \u00a0917M \u00a0 0% \/sys\/fs\/cgroup<br \/>\/dev\/mapper\/centos-data xfs \u00a0 \u00a0 \u00a0 \u00a040G \u00a0 33M \u00a0 40G \u00a0 1% \/data<br \/>\/dev\/mapper\/myvg-mylv \u00a0 ext4 \u00a0 \u00a0 \u00a0109G \u00a0 19M \u00a0103G \u00a0 1% \/aliyun<br \/>\/dev\/sda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 xfs \u00a0 \u00a0 \u00a0 297M \u00a0115M \u00a0183M \u00a039% \/boot<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 184M \u00a0 \u00a0 0 \u00a0184M \u00a0 0% \/run\/user\/0<br \/><br \/><br \/>1.\u65b0\u589e\u4e00\u575760G\u7684\u786c\u76d8\uff0c\u5206\u533a<br \/># fdisk \/dev\/sdc<br \/>Welcome to fdisk (util-linux 2.23.2).<br \/><br \/>Changes will remain in memory only, until you decide to write them.<br \/>Be careful before using the write command.<br \/><br \/>Device does not contain a recognized partition table<br \/>Building a new DOS disklabel with disk identifier 0x58d7841e.<br \/><br \/>Command (m for help): n<br \/>Partition type:<br \/>\u00a0 \u00a0p \u00a0 primary (0 primary, 0 extended, 4 free)<br \/>\u00a0 \u00a0e \u00a0 extended<br \/>Select (default p): p<br \/>Partition number (1-4, default 1): 1<br \/>First sector (2048-104857599, default 2048):\u00a0<br \/>Using default value 2048<br \/>Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599):\u00a0<br \/>Using default value 104857599<br \/>Partition 1 of type Linux and of size 50 GiB is set<br \/><br \/>Command (m for help): w<br \/>The partition table has been altered!<br \/><br \/>Calling ioctl() to re-read partition table.<br \/>Syncing disks.<br \/><br \/>2.\u5c06\u65b0\u589e\u52a0\u7684\u5206\u533a\/dev\/sdc1\u6269\u5bb9\u5230\u7269\u7406\u5377myvg\u4e2d<br \/># vgextend myvg \/dev\/sdc1<br \/>\u00a0 Physical volume \\&#8221;\/dev\/sdc1\\&#8221; successfully created<br \/>\u00a0 Volume group \\&#8221;myvg\\&#8221; successfully extended<br \/># \u53ef\u4ee5\u770b\u5230\u753110G\u6269\u5c55\u5230\u4e8659.99G<br \/>[root@mini2 ~]# vgdisplay myvg<br \/>\u00a0 &#8212; Volume group &#8212;<br \/>\u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 myvg<br \/>\u00a0 System ID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>\u00a0 Format \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0lvm2<br \/>\u00a0 Metadata Areas \u00a0 \u00a0 \u00a0 \u00a02<br \/>\u00a0 Metadata Sequence No \u00a03<br \/>\u00a0 VG Access \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 read\/write<br \/>\u00a0 VG Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 resizable<br \/>\u00a0 MAX LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Cur LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 Open LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<br \/>\u00a0 Max PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Cur PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02<br \/>\u00a0 Act PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02<br \/>\u00a0 VG Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 169.99 GiB<br \/>\u00a0 PE Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4.00 MiB<br \/>\u00a0 Total PE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a043518<br \/>\u00a0 Alloc PE \/ Size \u00a0 \u00a0 \u00a0 28160 \/ 110.00 GiB<br \/>\u00a0 Free \u00a0PE \/ Size \u00a0 \u00a0 \u00a0 15358 \/ 59.99 GiB<br \/>\u00a0 VG UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 v5LSS8-E5HW-htEL-ioet-Up3T-zUFz-vtCzlA<br \/><br \/># lvdisplay \/dev\/myvg\/mylv<br \/>\u00a0 &#8212; Logical volume &#8212;<br \/>\u00a0 LV Path \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/dev\/myvg\/mylv<br \/>\u00a0 LV Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0mylv<br \/>\u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0myvg<br \/>\u00a0 LV UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a03H0Qgm-tDJr-BJ96-Y0Vh-TMOE-1EZv-DN3qUE<br \/>\u00a0 LV Write Access \u00a0 \u00a0 \u00a0 \u00a0read\/write<br \/>\u00a0 LV Creation host, time mini2, 2017-01-07 13:55:37 +0800<br \/>\u00a0 LV Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0available<br \/>\u00a0 # open \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<br \/>\u00a0 LV Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0110.00 GiB<br \/>\u00a0 Current LE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 28160<br \/>\u00a0 Segments \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<br \/>\u00a0 Allocation \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 inherit<br \/>\u00a0 Read ahead sectors \u00a0 \u00a0 auto<br \/>\u00a0 &#8211; currently set to \u00a0 \u00a0 8192<br \/>\u00a0 Block device \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 253:2<br \/><br \/>3.\u6269\u5c55\u7269\u7406\u8fb9\u754c\u4e3a150G<br \/>[root@mini2 ~]# lvextend -L 150G \/dev\/myvg\/mylv<br \/>\u00a0 Size of logical volume myvg\/mylv changed from 110.00 GiB (28160 extents) to 150.00 GiB (38400 extents).<br \/>\u00a0 Logical volume mylv successfully resized.<br \/>\u53ef\u4ee5\u770b\u5230\u5df2\u7ecf\u6709110\u53d8\u6210\u4e86150G<br \/>[root@mini2 ~]# lvdisplay \/dev\/myvg\/mylv<br \/>\u00a0 &#8212; Logical volume &#8212;<br \/>\u00a0 LV Path \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/dev\/myvg\/mylv<br \/>\u00a0 LV Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0mylv<br \/>\u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0myvg<br \/>\u00a0 LV UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a03H0Qgm-tDJr-BJ96-Y0Vh-TMOE-1EZv-DN3qUE<br \/>\u00a0 LV Write Access \u00a0 \u00a0 \u00a0 \u00a0read\/write<br \/>\u00a0 LV Creation host, time mini2, 2017-01-07 13:55:37 +0800<br \/>\u00a0 LV Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0available<br \/>\u00a0 # open \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<br \/>\u00a0 LV Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0150.00 GiB<br \/>\u00a0 Current LE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 38400<br \/>\u00a0 Segments \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 2<br \/>\u00a0 Allocation \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 inherit<br \/>\u00a0 Read ahead sectors \u00a0 \u00a0 auto<br \/>\u00a0 &#8211; currently set to \u00a0 \u00a0 8192<br \/>\u00a0 Block device \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 253:2<br \/><br \/>[root@mini2 ~]# df -Th<br \/>Filesystem \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Type \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/>\/dev\/mapper\/centos-root xfs \u00a0 \u00a0 \u00a0 \u00a030G \u00a01.8G \u00a0 29G \u00a0 6% \/<br \/>devtmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0devtmpfs \u00a0907M \u00a0 \u00a0 0 \u00a0907M \u00a0 0% \/dev<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 917M \u00a0 \u00a0 0 \u00a0917M \u00a0 0% \/dev\/shm<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 917M \u00a08.6M \u00a0908M \u00a0 1% \/run<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 917M \u00a0 \u00a0 0 \u00a0917M \u00a0 0% \/sys\/fs\/cgroup<br \/>\/dev\/mapper\/centos-data xfs \u00a0 \u00a0 \u00a0 \u00a040G \u00a0 33M \u00a0 40G \u00a0 1% \/data<br \/>\/dev\/mapper\/myvg-mylv \u00a0 ext4 \u00a0 \u00a0 \u00a0109G \u00a0 19M \u00a0103G \u00a0 1% \/aliyun<br \/>\/dev\/sda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 xfs \u00a0 \u00a0 \u00a0 297M \u00a0115M \u00a0183M \u00a039% \/boot<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 184M \u00a0 \u00a0 0 \u00a0184M \u00a0 0% \/run\/user\/0<br \/><br \/><br \/>4.\u6269\u5c55\u903b\u8f91\u8fb9\u754c\uff0c\u53ef\u4ee5\u770b\u5230\u78c1\u76d8\u5206\u533a\/aliyun\u7531109G\u53d8\u6210\u4e86148G<br \/>[root@mini2 ~]# resize2fs \/dev\/myvg\/mylv\u00a0<br \/>resize2fs 1.42.9 (28-Dec-2013)<br \/>Filesystem at \/dev\/myvg\/mylv is mounted on \/aliyun; on-line resizing required<br \/>old_desc_blocks = 110, new_desc_blocks = 150<br \/>The filesystem on \/dev\/myvg\/mylv is now 78643200 blocks long.<br \/><br \/><br \/>[root@mini2 ~]# df -Th<br \/>Filesystem \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Type \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/>\/dev\/mapper\/centos-root xfs \u00a0 \u00a0 \u00a0 \u00a030G \u00a01.8G \u00a0 29G \u00a0 6% \/<br \/>devtmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0devtmpfs \u00a0907M \u00a0 \u00a0 0 \u00a0907M \u00a0 0% \/dev<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 917M \u00a0 \u00a0 0 \u00a0917M \u00a0 0% \/dev\/shm<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 917M \u00a08.6M \u00a0908M \u00a0 1% \/run<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 917M \u00a0 \u00a0 0 \u00a0917M \u00a0 0% \/sys\/fs\/cgroup<br \/>\/dev\/mapper\/centos-data xfs \u00a0 \u00a0 \u00a0 \u00a040G \u00a0 33M \u00a0 40G \u00a0 1% \/data<br \/>\/dev\/mapper\/myvg-mylv \u00a0 ext4 \u00a0 \u00a0 \u00a0148G \u00a0 17M \u00a0141G \u00a0 1% \/aliyun<br \/>\/dev\/sda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 xfs \u00a0 \u00a0 \u00a0 297M \u00a0115M \u00a0183M \u00a039% \/boot<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 184M \u00a0 \u00a0 0 \u00a0184M \u00a0 0% \/run\/user\/0<\/div>\n<div>\u00a0<\/div>\n<div>\n<h1>\u6269\u5bb9\u963f\u91cc\u4e91\u6570\u636e\u76d8\u75311T\u53d8\u4e3a2T\uff0c\u975elvm<\/h1>\n1.\u767b\u5f55\u4e91\u670d\u52a1\u5668\u7ba1\u7406\u63a7\u5236\u53f0\u3002<br \/>\u66f4\u591a &gt; \u78c1\u76d8\u6269\u5bb9\u5c06\u78c1\u76d8\u5bb9\u91cf\u6539\u4e3a2000G<br \/><br \/>2.\u91cd\u542f\u670d\u52a1\u5668\uff0c\u8fdb\u5165\u5b9e\u4f8b\u5217\u8868\u9875\u9762\uff0c\u70b9\u51fb \u66f4\u591a\uff0c\u9009\u62e9 \u91cd\u542f(\u6ce8\u610f\uff1a\u4e00\u5b9a\u8981\u901a\u8fc7\u63a7\u5236\u53f0\u91cd\u542f\uff0c\u901a\u8fc7shell\u8fdb\u53bb\u91cd\u542fecs\u4e0d\u751f\u6548)\u00a0<br \/><br \/>3.\u53d6\u6d88\u6302\u8f7d<br \/># umount \/data<br \/>umount: \/data: target is busy.<br \/>\u00a0 \u00a0 \u00a0 \u00a0 (In some cases useful info about processes that use<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0the device is found by lsof(8) or fuser(1))<br \/># \u63d0\u793a\/data\u76ee\u6807\u7e41\u5fd9\uff0c\u627e\u5230\u8fd9\u4e9b\u8fdb\u7a0b\u5f3a\u5236\u7ed3\u675f<br \/># fuser -m \/data<br \/>\/data: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01080c \u00a01081cm<br \/># ps -ef|grep 1080<br \/>yunva \u00a0 \u00a0 1080 \u00a0 \u00a0 1 \u00a00 15:05 ? \u00a0 \u00a0 \u00a0 \u00a000:00:00 bash -c cd \/data\/elasticsearch-5.0.1\/bin &amp;&amp; \/bin\/bash elasticsearch &amp;<br \/>yunva \u00a0 \u00a0 1081 \u00a01080 98 15:05 ? \u00a0 \u00a0 \u00a0 \u00a000:08:11 \/usr\/java\/jdk1.8.0_111\/bin\/java -Xms32g -Xmx32g -XX:+UseG1GC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -server -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -XX:+HeapDumpOnOutOfMemoryError -Xss256k -Des.path.home=\/data\/elasticsearch-5.0.1 -cp \/data\/elasticsearch-5.0.1\/lib\/elasticsearch-5.0.1.jar:\/data\/elasticsearch-5.0.1\/lib\/* org.elasticsearch.bootstrap.Elasticsearch<br \/>root \u00a0 \u00a0 \u00a02027 \u00a01296 \u00a00 15:13 pts\/1 \u00a0 \u00a000:00:00 grep &#8211;color=auto 1080<br \/># kill -9 1080<br \/># kill -9 1081<br \/><br \/># \u518d\u6b21\u5378\u8f7d\u6210\u529f<br \/># umount \/data<br \/># df -Th<br \/>Filesystem \u00a0 \u00a0 Type \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/>\/dev\/vda1 \u00a0 \u00a0 \u00a0ext4 \u00a0 \u00a0 \u00a0 40G \u00a02.0G \u00a0 36G \u00a0 6% \/<br \/>devtmpfs \u00a0 \u00a0 \u00a0 devtmpfs \u00a0 32G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev\/shm<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 \u00a032G \u00a0300K \u00a0 32G \u00a0 1% \/run<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/sys\/fs\/cgroup<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 6.3G \u00a0 \u00a0 0 \u00a06.3G \u00a0 0% \/run\/user\/0<br \/><br \/># fdisk \/dev\/vdb<br \/>\u5220\u9664\u539f\u6709\u7684\/dev\/vdb1\u5206\u533a<br \/>d<br \/>1<br \/>\u65b0\u5efa\u5206\u533a<br \/>n<br \/>p<br \/>1<br \/>w<br \/># \u5982\u4e0b\u63d0\u793a\u8868\u793a\u6210\u529f<br \/>The partition table has been altered!<br \/><br \/>Calling ioctl() to re-read partition table.<br \/>Syncing disks.<br \/><br \/>4.\u68c0\u67e5\u6587\u4ef6\u7cfb\u7edf\uff0c\u5e76\u53d8\u66f4\u6587\u4ef6\u7cfb\u7edf\u5927\u5c0f<br \/><br \/># e2fsck -f \/dev\/vdb1<br \/>e2fsck 1.42.9 (28-Dec-2013)<br \/>Pass 1: Checking inodes, blocks, and sizes<br \/>Pass 2: Checking directory structure<br \/>Pass 3: Checking directory connectivity<br \/>Pass 4: Checking reference counts<br \/>Pass 5: Checking group summary information<br \/>\/dev\/vdb1: 6083\/65536000 files (6.5% non-contiguous), 221329845\/262143744 blocks<br \/><br \/># resize2fs \/dev\/vdb1<br \/>resize2fs 1.42.9 (28-Dec-2013)<br \/>Resizing the filesystem on \/dev\/vdb1 to 524287744 (4k) blocks.<br \/>The filesystem on \/dev\/vdb1 is now 524287744 blocks long.<br \/><br \/>\u91cd\u65b0\u6302\u8f7d\uff0c\u770b\u5230\u5df2\u7ecf\u6210\u529f\u4e86\uff0c\u542f\u52a8\u91cc\u9762\u7684\u4e1a\u52a1\u7a0b\u5e8f\u5373\u53ef<br \/># mount \/dev\/vdb1 \/data<br \/># df -Th<br \/>Filesystem \u00a0 \u00a0 Type \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/>\/dev\/vda1 \u00a0 \u00a0 \u00a0ext4 \u00a0 \u00a0 \u00a0 40G \u00a02.0G \u00a0 36G \u00a0 6% \/<br \/>devtmpfs \u00a0 \u00a0 \u00a0 devtmpfs \u00a0 32G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev\/shm<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 \u00a032G \u00a0300K \u00a0 32G \u00a0 1% \/run<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/sys\/fs\/cgroup<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 \u00a0 6.3G \u00a0 \u00a0 0 \u00a06.3G \u00a0 0% \/run\/user\/0<br \/>\/dev\/vdb1 \u00a0 \u00a0 \u00a0ext4 \u00a0 \u00a0 \u00a02.0T \u00a0829G \u00a01.1T \u00a045% \/data<\/div>\n<h1>\u00a0<\/h1>\n<h1>\u5f53\u786c\u76d8\u6216\u8005\u5355\u4e2a\u78c1\u76d8\u5206\u533a\u5927\u4e8e2T\u65f6\u7684\u5206\u533a\u65b9\u6cd5\uff1a<\/h1>\n<div>1.\u67e5\u770b\u78c1\u76d8\u57fa\u672c\u4fe1\u606f<br \/><br \/><br \/># fdisk -l\u00a0<br \/><br \/><br \/>Disk \/dev\/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors<br \/>Units = sectors of 1 * 512 = 512 bytes<br \/>Sector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>Disk label type: dos<br \/>Disk identifier: 0x635e6c7d<br \/><br \/><br \/>\u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/>\/dev\/vda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02048 \u00a0 \u00a083886079 \u00a0 \u00a041942016 \u00a0 83 \u00a0Linux<br \/><br \/><br \/>Disk \/dev\/vdb: 6442.5 GB, 6442450944000 bytes, 12582912000 sectors<br \/>Units = sectors of 1 * 512 = 512 bytes<br \/>Sector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>Disk label type: dos<br \/>Disk identifier: 0x9ac7dffd<br \/><br \/><br \/>\u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/><br \/><br \/>2.\u4f7f\u7528parted\u5de5\u5177\u8fdb\u884c\u5206\u533a(fdisk\u65e0\u6cd5\u652f\u6301\u5355\u4e2a\u5206\u533a\u5927\u4e8e2T)<br \/><br \/><br \/># parted \/dev\/vdb<br \/>GNU Parted 3.1<br \/>Using \/dev\/vdb<br \/>Welcome to GNU Parted! Type \\&#8217;help\\&#8217; to view a list of commands.<br \/>(parted)\u00a0print\u00a0 \u00a0# 1. \u6253\u5370\u57fa\u672c\u5206\u533a\u4fe1\u606f \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Model: Virtio Block Device (virtblk)<br \/>Disk \/dev\/vdb: 6442GB<br \/>Sector size (logical\/physical): 512B\/512B<br \/>Partition Table: msdos<br \/>Disk Flags:\u00a0<br \/><br \/>Number \u00a0Start \u00a0End \u00a0Size \u00a0Type \u00a0File system \u00a0Flags<br \/><br \/>(parted)\u00a0mklabel gpt\u00a0# 2. \u6807\u8bb0\u4e3agpt \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Warning: The existing disk label on \/dev\/vdb will be destroyed and all data on this disk will be lost. Do you want to continue?<br \/>Yes\/No? yes \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>(parted)\u00a0mkpart\u00a0 \u00a0# 3. \u65b0\u5efa\u5206\u533a \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Partition name? \u00a0[]? \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0# 4. \u4fdd\u6301\u9ed8\u8ba4<br \/>File system type? \u00a0[ext2]?\u00a0ext4\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 # 5. \u6587\u4ef6\u7cfb\u7edf\u5206\u533a\u683c\u5f0f\u4e3aext4 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Start?\u00a00\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0# 6. \u8d77\u59cb\u4f4d\u7f6e \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>End?\u00a0-1\u00a0 # 7. \u7ed3\u675f(\u6574\u4e2a\u78c1\u76d8)<br \/>Warning: The resulting partition is not properly aligned for best performance.<br \/>Ignore\/Cancel?\u00a0Ignore\u00a0# 8. \u9009\u62e9Ignore(\u5ffd\u7565) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>(parted)\u00a0print # 9. \u518d\u6b21\u6253\u5370\u5206\u533a\u4fe1\u606f\uff0c\u6b64\u65f6\u5df2\u7ecf\u5206\u597d\u533a\u4e3a6442G\u4e86 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Model: Virtio Block Device (virtblk)<br \/>Disk \/dev\/vdb: 6442GB<br \/>Sector size (logical\/physical): 512B\/512B<br \/>Partition Table: gpt<br \/>Disk Flags:\u00a0<br \/><br \/>Number \u00a0Start \u00a0 End \u00a0 \u00a0 Size \u00a0 \u00a0File system \u00a0Name \u00a0Flags<br \/>\u00a01 \u00a0 \u00a0 \u00a017.4kB \u00a06442GB \u00a06442GB<br \/><br \/># \u5982\u679c\u4e0d\u4f7f\u7528lvm\u903b\u8f91\u5206\u5377\uff0c\u6b64\u65f6\u76f4\u63a5\u9000\u51fa\u7136\u540e\u00a0# mkfs.ext4 \/dev\/vdb1 \u5206\u533a\uff0c\u6302\u8f7d\u5373\u53ef<\/div>\n<div><br \/>(parted) toggle 1\u00a0lvm\u00a0# \u6807\u8bb0\u5206\u533a\u4e3alvm \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>(parted) p \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Model: Virtio Block Device (virtblk)<br \/>Disk \/dev\/vdb: 6442GB<br \/>Sector size (logical\/physical): 512B\/512B<br \/>Partition Table: gpt<br \/>Disk Flags:\u00a0<br \/><br \/>Number \u00a0Start \u00a0 End \u00a0 \u00a0 Size \u00a0 \u00a0File system \u00a0Name \u00a0Flags<br \/>\u00a01 \u00a0 \u00a0 \u00a017.4kB \u00a06442GB \u00a06442GB \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 lvm<br \/><br \/>(parted) quit\u00a0 # \u9000\u51fa \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Information: You may need to update \/etc\/fstab.<br \/><br \/># \u518d\u6b21\u67e5\u770b\u78c1\u76d8\u5206\u533a\u4fe1\u606f\uff0c\u6b64\u65f6\u5df2\u7ecf\u5206\u533a\u6210\u529f\u4e86<br \/># fdisk -l \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/><br \/>Disk \/dev\/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors<br \/>Units = sectors of 1 * 512 = 512 bytes<br \/>Sector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>Disk label type: dos<br \/>Disk identifier: 0x635e6c7d<br \/><br \/>\u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/>\/dev\/vda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02048 \u00a0 \u00a083886079 \u00a0 \u00a041942016 \u00a0 83 \u00a0Linux<br \/><br \/>Disk \/dev\/vdb: 6442.5 GB, 6442450944000 bytes, 12582912000 sectors<br \/>Units = sectors of 1 * 512 = 512 bytes<br \/>Sector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>Disk label type: dos<br \/>Disk identifier: 0x00000000<br \/><br \/>\u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/>\/dev\/vdb1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a04294967295 \u00a02147483647+ \u00a0ee \u00a0GPT<br \/><br \/>3.\u5206\u533a\u5df2\u7ecf\u5212\u5206\u597d\uff0c\u6b64\u65f6\u9700\u8981\u521b\u5efalvm\uff1a<br \/>\u2460\u521b\u5efa\u7269\u7406\u5377<br \/># pvcreate \/dev\/vdb1<br \/>\u00a0 Physical volume \\&#8221;\/dev\/vdb1\\&#8221; successfully created.<br \/># pvdisplay<br \/>\u00a0 \\&#8221;\/dev\/vdb1\\&#8221; is a new physical volume of \\&#8221;5.86 TiB\\&#8221;<br \/>\u00a0 &#8212; NEW Physical volume &#8212;<br \/>\u00a0 PV Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/dev\/vdb1<br \/>\u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>\u00a0 PV Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 5.86 TiB<br \/>\u00a0 Allocatable \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 NO<br \/>\u00a0 PE Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 0 \u00a0\u00a0<br \/>\u00a0 Total PE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Free PE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 0<br \/>\u00a0 Allocated PE \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 PV UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tbHjVp-Szmc-5q3O-S3eY-waTF-Ybzx-l3I7bR<br \/>\u2461\u521b\u5efa\u903b\u8f91\u5377\u7ec4<br \/># vgcreate myvg \/dev\/vdb1<br \/>\u00a0 Volume group \\&#8221;myvg\\&#8221; successfully created<br \/># vgdisplay<br \/>\u00a0 &#8212; Volume group &#8212;<br \/>\u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 myvg<br \/>\u00a0 System ID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<br \/>\u00a0 Format \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0lvm2<br \/>\u00a0 Metadata Areas \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 Metadata Sequence No \u00a01<br \/>\u00a0 VG Access \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 read\/write<br \/>\u00a0 VG Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 resizable<br \/>\u00a0 MAX LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Cur LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Open LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 0<br \/>\u00a0 Max PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/>\u00a0 Cur PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 Act PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/>\u00a0 VG Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 5.86 TiB<br \/>\u00a0 PE Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4.00 MiB<br \/>\u00a0 Total PE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01535999<br \/>\u00a0 Alloc PE \/ Size \u00a0 \u00a0 \u00a0 0 \/ 0 \u00a0\u00a0<br \/>\u00a0 Free \u00a0PE \/ Size \u00a0 \u00a0 \u00a0 1535999 \/ 5.86 TiB<br \/>\u00a0 VG UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 mQjQYq-uN4O-RUdV-0aZ3-he8g-aD4l-a2lhSc<br \/><br \/>\u2462\u521b\u5efalv\u903b\u8f91\u5377<br \/># lvcreate -L 5.86T -n mylv myvg<br \/>\u00a0 Rounding up size to full physical extent 5.86 TiB<br \/>\u00a0 Volume group \\&#8221;myvg\\&#8221; has insufficient free space (1535999 extents): 1536164 required. \u00a0# \u8d85\u51fa\u5927\u5c0f<br \/># lvcreate -L 5.8T -n mylv myvg<br \/>\u00a0 Rounding up size to full physical extent 5.80 TiB<br \/>\u00a0 Logical volume \\&#8221;mylv\\&#8221; created.<br \/># lvdisplay<br \/>\u00a0 &#8212; Logical volume &#8212;<br \/>\u00a0 LV Path \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/dev\/myvg\/mylv<br \/>\u00a0 LV Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0mylv<br \/>\u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0myvg<br \/>\u00a0 LV UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00xzuSU-BeVP-uUit-8DRl-8ytZ-az8E-W64gxp<br \/>\u00a0 LV Write Access \u00a0 \u00a0 \u00a0 \u00a0read\/write<br \/>\u00a0 LV Creation host, time iZ2zehv5i5lv499i7u6i5vZ, 2017-02-27 15:48:54 +0800<br \/>\u00a0 LV Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0available<br \/>\u00a0 # open \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 0<br \/>\u00a0 LV Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a05.80 TiB<br \/>\u00a0 Current LE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1520436<br \/>\u00a0 Segments \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<br \/>\u00a0 Allocation \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 inherit<br \/>\u00a0 Read ahead sectors \u00a0 \u00a0 auto<br \/>\u00a0 &#8211; currently set to \u00a0 \u00a0 256<br \/>\u00a0 Block device \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 252:0<br \/><br \/>\u2463\u683c\u5f0f\u5316<br \/># mke2fs -t ext4 -b 4096 \/dev\/myvg\/mylv\u00a0<br \/>mke2fs 1.42.9 (28-Dec-2013)<br \/>Filesystem label=<br \/>OS type: Linux<br \/>Block size=4096 (log=2)<br \/>Fragment size=4096 (log=2)<br \/>Stride=0 blocks, Stripe width=0 blocks<br \/>194617344 inodes, 1556926464 blocks<br \/>77846323 blocks (5.00%) reserved for the super user<br \/>First data block=0<br \/>Maximum filesystem blocks=3705667584<br \/>47514 block groups<br \/>32768 blocks per group, 32768 fragments per group<br \/>4096 inodes per group<br \/>Superblock backups stored on blocks:\u00a0<br \/>32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,\u00a0<br \/>4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,\u00a0<br \/>102400000, 214990848, 512000000, 550731776, 644972544<br \/><br \/>Allocating group tables: done \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Writing inode tables: done \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>Creating journal (32768 blocks): done<br \/>Writing superblocks and filesystem accounting information: done \u00a0 \u00a0\u00a0<br \/><br \/>\u2464\u6302\u8f7d<br \/># mkdir \/data<br \/># mount \/dev\/myvg\/mylv \/data<br \/># df -Th<br \/>Filesystem \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Type \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/>\/dev\/vda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ext4 \u00a0 \u00a0 \u00a0 40G \u00a01.8G \u00a0 36G \u00a0 5% \/<br \/>devtmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0devtmpfs \u00a0 32G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/dev\/shm<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 \u00a032G \u00a0340K \u00a0 32G \u00a0 1% \/run<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 \u00a032G \u00a0 \u00a0 0 \u00a0 32G \u00a0 0% \/sys\/fs\/cgroup<br \/>tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 tmpfs \u00a0 \u00a0 6.3G \u00a0 \u00a0 0 \u00a06.3G \u00a0 0% \/run\/user\/0<br \/>\/dev\/mapper\/myvg-mylv ext4 \u00a0 \u00a0 \u00a05.8T \u00a0 89M \u00a05.5T \u00a0 1% \/data<br \/><br \/>\u5f00\u673a\u81ea\u542f\u52a8\u6302\u8f7d\u5206\u533a<br \/>vim \/etc\/fstab<br \/>\u52a0\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<br \/>\/dev\/myvg\/mylv \/data ext4 defaults,noatime 0 0<br \/><br \/><br \/>\u79fb\u9664pv\u3001\u79fb\u9664vg\u7684\u547d\u4ee4<br \/>pvremove \/dev\/vdb1<br \/>vgremove myvg<\/div>\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u666e\u901a\u78c1\u76d8\u5206\u533a\u7ba1\u7406\u65b9\u5f0f 1.\u5bf9\u78c1\u76d8\u8fdb\u884c\u5206\u533a\u5217\u51fa\u78c1\u76d8# fdisk -l # fdisk \/dev\/vdbWe &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=5468\"> <span class=\"screen-reader-text\">\u963f\u91cc\u4e91\u6dfb\u52a0\u6570\u636e\u76d8parted\u65b9\u5f0f\u5206\u533a\u683c\u5f0f\u5316\u548clvm\u6302\u8f7d\u53ca\u6570\u636e\u76d8\u7684\u6269\u5bb9<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[102,124],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":3,"uagb_excerpt":"\u4e00\u3001\u666e\u901a\u78c1\u76d8\u5206\u533a\u7ba1\u7406\u65b9\u5f0f 1.\u5bf9\u78c1\u76d8\u8fdb\u884c\u5206\u533a\u5217\u51fa\u78c1\u76d8# fdisk -l # fdisk \/dev\/vdbWe&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5468"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5468"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5468\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5468"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}