pv size limit within LVM
Why can't I create a pv larger then 2T from an fdisk volume that I partitioned as 1 24T partition?
Responses
Typically one does not need to use parted or gparted (see next paragraph) unless they are creating a 2tb or larger partition. See Jan's response above, Are you using a current version of Red Hat Linux including a current kernel?
Try the command-line "parted" or graphical version "gparted"(in the EPEL repo) instead. see this Red Hat solution ID 54200.
If you have not already done so, make sure to install e4fsprogs, which provides mkfs.ext4 which allows you to format a dirve to ext4. The limitation of ext4 goes to 16TB.
Good news for RHEL 7: it comes standard with XFS as it's file system. In RHEL 7, ext4 can go to 100TB according to this performance tuning guide at Red Hat's website.
Did you use an 'msdos' or 'gpt' label? I am not certain about this, but I imagine you are likely running up against that limitation (can anyone validate that?)
parted /dev/sdb print
parted -s /dev/sdb mklabel gpt mkpart primary ext3 0 100% set 1 lvm on
Now... some "things" about that parted command. Ext3 does not mean it will be an ext3 filesystem, it's just a label (of sorts). If when you run this it complains about not being aligned properly, run this instead
parted -s /dev/sdb mklabel gpt mkpart primary ext3 2048s 100% set 1 lvm on
Here is the output in it's entirety:
[root@rhvsrv91 ~]# parted /dev/mapper/CAPELLA_002a print
Model: Linux device-mapper (multipath) (dm)
Disk /dev/mapper/CAPELLA_002a: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
[root@rhvsrv91 ~]# parted -s /dev/mapper/CAPELLA_002a mklabel gpt mkpart ext3 0 100% set 1 lvm on
Warning: The resulting partition is not properly aligned for best performance.
[root@rhvsrv91 ~]# parted -s /dev/mapper/CAPELLA_002a mklabel gpt mkpart ext3 2048s 100% set 1 lvm on
[root@rhvsrv91 ~]# pvcreate /dev/mapper/CAPELLA_002ap1
Physical volume "/dev/mapper/CAPELLA_002ap1" successfully created
[root@rhvsrv91 ~]# vgcreate vg_test /dev/mapper/CAPELLA_002ap1
Volume group "vg_test" successfully created
[root@rhvsrv91 ~]# lvcreate --extents 100%FREE -nlv_test vg_test
Logical volume "lv_test" created
[root@rhvsrv91 ~]# mkfs /dev/vg_test/lv_test
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
3276800 inodes, 13106176 blocks
655308 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
400 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
