lvm的條帶化

peng163fj發表於2015-07-30

如何設定條帶化

 

 [root@test-lvm ~]# vgscan

  Reading all physical volumes.  This may take a while...

  Found volume group "VolGroup00" using metadata type lvm2

--找到了VolGroup00的組

 

[root@test-lvm ~]# vgdisplay VolGroup00

  --- Volume group ---

  VG Name               VolGroup00

  System ID            

  Format                lvm2

  Metadata Areas        1

  Metadata Sequence No  2

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                1

  Open LV               1

  Max PV                0

  Cur PV                1

  Act PV                1

  VG Size               34.16 GB

  PE Size               32.00 MB

  Total PE              1093

  Alloc PE / Size       128 / 4.00 GB

  Free  PE / Size       965 / 30.16 GB

  VG UUID               Tw0R7c-dFFv-l3gQ-yYo8-msuk-n2rb-INHVdd

  

[root@test-lvm ~]# lvcreate -i 1 -I 64 -l 965 -n stript_lv1 VolGroup00

---64是塊大小,一般是oracle塊的2倍,-n是給其齊的名字,最後是組名

 

  Ignoring stripesize argument with single stripe

  Logical volume "stript_lv1" created

[root@test-lvm ~]# lvdiskplay /dev/VolGroup00/stript_lv1

-bash: lvdiskplay: command not found

[root@test-lvm ~]# lvdisplay /dev/VolGroup00/stript_lv1

  --- Logical volume ---

  LV Name                /dev/VolGroup00/stript_lv1

  VG Name                VolGroup00

  LV UUID                oGaBgD-p9tf-S6QR-NOjv-DgYT-BRxT-gmc4X7

  LV Write Access        read/write

  LV Status              available

  # open                 0

  LV Size                30.16 GB

  Current LE             965

  Segments               1

  Allocation             inherit

  Read ahead sectors     auto

  - currently set to     256

  Block device           253:1

  

[root@test-lvm ~]# mkfs.ext3 /dev/VolGroup00/stript_lv1

mke2fs 1.39 (29-May-2006)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

3957184 inodes, 7905280 blocks

395264 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

242 block groups

32768 blocks per group, 32768 fragments per group

16352 inodes per group

Superblock backups stored on blocks:

        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

        4096000

 

Writing inode tables: done                            

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

 

This filesystem will be automatically checked every 31 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@test-lvm ~]# mkdir /u01

[root@test-lvm ~]# mount /dev/VolGroup00/stript_lv1 /u01

[root@test-lvm ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3              15G  3.6G   11G  26% /

/dev/sda1             487M   28M  434M   7% /boot

tmpfs                1002M     0 1002M   0% /dev/shm

/dev/mapper/VolGroup00-stript_lv1

                       30G  173M   29G   1% /u01

[root@test-lvm ~]#

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21302630/viewspace-1756335/,如需轉載,請註明出處,否則將追究法律責任。

相關文章