Add Parted partitions for storage and Create LVM volumes

Source: Internet
Author: User
New storage is partitioned by Parted and LVM Volume 1, Parted partition 1, parted partition www.2cto.com # parted/dev/sdaGNUParted2.1 use/dev/sdaWelcometoGNUParted! Type & amp; #39; help & amp; #39; toviewalistofcom... add storage partitions with Parted and Create LVM Volume 1, Parted partition 1, parted partition www.2cto.com # parted/dev/sdaGNU Parted 2.1 use/dev/sdaWelcome to GNU Parted! Type 'help' to view a list of commands. (parted) help first, let's take a look at align-check type n check partition N for TYPE (min | opt) alignment check NUMBER do a simple check on the file system cp [FROM-DEVICE] FROM-number to-NUMBER copy file system to another partition help [COMMAND] print general help, or help on COMMAND mklabel, mktable LABEL-TYPE create a new disklabel (partition table) mkfs NUMBER FS-TYPE mak E a FS-TYPE file system on partition NUMBER mkpart PART-TYPE [FS-TYPE] start end make a partition mkpartfs PART-TYPE FS-TYPE start end make a partition with a file system move number start end move partition NUMBER name number name partition NUMBER as name print [devices | free | list, all | NUMBER] display the partition table, available devices, free space, all found partitions, or a participant par Tition quit exit program rescue start end rescue a lost partition near START and END resize number start end resize partition NUMBER and its file system rm NUMBER delete partition NUMBER select DEVICE choose the device to edit set NUMBER flag state change the FLAG on partition NUMBER toggle [NUMBER [FLAG] toggle the state of FLAG on partition NUMBER unit UNIT set the default unit to UNIT version Display the version number and copyright information of GNU Parted (parted) mktable New Disk label type? Gpt GPT is the GRUB partition table. if it is MBR, up to 2 TB partition (parted) p is supported to print the information. here the 4398GB is the Disk capacity Model: DELL MD32xx (scsi) Disk/dev/sda: 4398 GBSector size (logical/physical): 512B/512 BPartition Table: gpt Number Start End Size File system Name flag (parted) mkpart # New partition Name? []? # Default file system type? [Ext2]? # Default start point? 0G # Start point end point? 4398G # end point (parted) p Model: DELL MD32xx (scsi) Disk/dev/sda: 4398 GBSector size (logical/physical): 512B/512 BPartition Table: gpt Number Start End Size File system Name Mark 1 1049kB 4398 GB 4398 GB (parted) toggle 1 lvm # Mark as lvm (parted) p Model: DELL MD32xx (scsi) disk/dev/sda: 4398 GBSector size (logical/physical): 512B/512 BPartition Table: gpt Number Start End Size File system Name Mark 1 1049kB 4398 GB 4398 GB lvm (parted) quit information: You may need to update/etc/fstab.2, the same method for sdb, sdc, sdd partition 2, Create LVM, in three steps, create PV, VG, LVM1, create PV # pvcreate/dev/sda1/dev/sdb1/dev/sdc1/dev/sdd1 Writing physical volume data to disk "/dev/sda1" Physical volume "/dev/sda1" successfully created Writing physical volume data to disk "/dev/sdb1" Physical volume "/dev/sdb1" successfully created Writing physical volume data to disk "/Dev/sdc1" Physical volume "/dev/sdc1" successfully created Writing physical volume data to disk "/dev/sdd1" Physical volume "/dev/sdd1" successfully created2, create VG # vgcreate md3200/dev/sda1/dev/sdb1/dev/sdc1/dev/sdd1 Volume group "md3200" successfully created # lvcreate-n md3200lv1-L 8 T md3200 Logical volume "md3200lv1" createdYou have new mail in/var/spool/mail/root3, create LVM # lvcreate-n md320 0lv1-L 8 T md3200 Logical volume "md3200lv1" created # lvcreate-n md3200lv2-L 8 T md3200 Logical volume "md3200lv2" created III. format the file system # mkfs. ext4/dev/md3200/md3200lv1 mke2fs 1.41.12 (17-May-2010) file system Tag = Operating system: Linux block size = 4096 (log = 2) part size = 4096 (log = 2) Stride = 0 blocks, Stripe width = 0 blocks5000070912 inodes, 2147483648 blocks0000374182 blocks (5.00%) reserved for the super user first data block = 0 Maximum filesystem block S = 429496729665536 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks: 32768,983 04, 163840,229 376, 294912,819 200, 884736,160 5632, 2654208,409 6000, 7962624,112 39424, 20480000,238 87872, 71663616,786 75968, 102400000,214 990848, 512000000,550 731776, 644972544,193 4917632 are being written into the inode table: Creating journal (32768 blocks): Writing completed Superblocks and filesystem accounting information: This filesystem will be automatically checked every 33 mounts or180 days, whichever comes first. use tune2fs-c or-I to override. IV, set automatic mounting at startup # mkdir md3200lv1 md3200lv2 # mount/dev/md3200/md3200lv1/md3200lv1/# ls/md3200lv1/lost + found # tail-n 2/etc/fstab/dev/md3200 /md3200lv1/md3200lv1 ext4 defaults 1 2/dev/md3200/md3200lv2/md3200lv2 ext4 de Faults 1 2 5, restart verification # reboot # df-hl file system capacity used available % mount point/dev/mapper/md3200-md3200lv1 7.9 T 175 M 7.5 T 1%/md3200lv1/dev/mapper/md3200-md3200lv2 7.9 T 175 M 7.5 T 1%/md3200lv2 6, finally, test the storage read/write speed # dd if =/dev/zero of =. /test bs = 10 M count = 1000 Records 1000 + 0 read Records 1000 + 0 write 10485760000 bytes (10 GB) copied, 8.83453 seconds, 1.2 GB/second # free-g total used free shared buffers cachedMem: 62 11 51 0 0 9-/+ buffers/cache: 1 61 Swap: 7 0 7 # d D if =. /test of =. /test1 bs = 10 M count = 1000 Records 1000 + 0 read Records 1000 + 0 write 10485760000 bytes (10 GB) copied, 12.3038 seconds, 852 MB/second # dd if =. /test1 of =. /test2 bs = 10 M count = 1000 Records 1000 + 0 read Records 1000 + 0 write 10485760000 bytes (10 GB) copied, 19.0357 seconds, 551 MB/second # dd if =. /test2 of =. /test3 bs = 10 M count = 1000 Records 1000 + 0 read Records 1000 + 0 write 10485760000 bytes (10 GB) copied, 18.641 seconds, 563 MB/second # free-g total used free shared buffers cachedMem: 62 41 21 0 0 39 -/ + Buffers/cache: 2 60 Swap: 7 0 7 # dd if =. /test3 of =. /test4 bs = 10 M count = 1000 Records 1000 + 0 read Records 1000 + 0 write 10485760000 bytes (10 GB) copied, 17.3797 seconds, 603 MB/second # dd if =. /test4 of =. /test5 bs = 10 M count = 1000 Records 1000 + 0 read Records 1000 + 0 write 10485760000 bytes (10 GB) copied, 22.8714 seconds, 458 MB/second # dd if =. /test5 of =. /test6 bs = 10 M count = 1000 Records 1000 + 0 read Records 1000 + 0 write 10485760000 bytes (10 GB) copied, 100.246 seconds, 105 MB/second because the memory is 64 GB, so the previous test has a cache, and the last 105 is the actual read/write speed.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.