0

I'm trying to add a partition on a LVM that resides on a RAID6 volume group and fdisk is complaining about the partition not residing on a physical sector boundry.

My question is, how do you calculate the correct starting sector for a partition on a LVM? This partition will be formated ext3. Would it be better to just format the LVM directly instead of creating a new partition?

Disk /dev/dedvol/backup: 2199.0 GB, 2199023255552 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 1048576 bytes / 8388608 bytes
Disk identifier: 0x4e428f49

                     Device Boot      Start         End      Blocks   Id  System
/dev/dedvol/backup1              63      267349  2146982827+  83  Linux
Partition 1 does not start on physical sector boundary.
lvdisplay /dev/dedvol/backup 
  --- Logical volume ---
  LV Name                /dev/dedvol/backup
  VG Name                dedvol
  LV UUID                OV2n5j-7LHb-exJL-t8dI-dU8A-2vxf-uIicCt
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                2.00 TiB
  Current LE             524288
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     32768
  Block device           253:1
vgdisplay dedvol
  --- Volume group ---
  VG Name               dedvol
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               14.55 TiB
  PE Size               4.00 MiB
  Total PE              3815448
  Alloc PE / Size       3670016 / 14.00 TiB
  Free  PE / Size       145432 / 568.09 GiB
  VG UUID               8fBcOk-aXGx-P3Qy-VVpJ-0zK1-fQgy-Cb691J

2 Answers 2

1

I'm trying to add a partition on a LVM

You're doing it wrong. man lvcreate

3
  • 1
    +1. I was just in the middle of a much longer answer that was going to say the same thing. Nov 16, 2011 at 17:53
  • The logical volume was created using "lvcreate -L2T -nbackup dedvol", so basically used all the defaults. Are you saying you should not partition an LVM? Or the LVM should have been created using custom chunk and strip sizes?
    – John P
    Nov 16, 2011 at 18:48
  • @John P, Dear John, why would one need partitioning a block device which is already a part of volume group? Since you're messing up basic concepts, I gently suggest you reading some intro to LVM-2. I hope en.Wikipedia.org's article could explain it quite well.
    – poige
    Nov 17, 2011 at 2:15
0

"Would it be better to just format the LVM directly instead of creating a new partition?"

Yes!

Unless something is badly messed up, LVM autoaligns the LV start on the boundary but you also need to give the correct stripe and stride values for a Raid6 to achieve reasonable performance.

There's an online calculator for those values which you need to give during the filesystem format. http://busybox.net/~aldot/mkfs_stride.html

The performance improvement can be worth doing it all over again. exception: when the array is just lightly used, then there's no improvement.

It's also possible to put them in the /etc/mk2efs.conf and then i.e. give the --fsprofile option during the kickstart install for RedHat / CentOS. If you have the same kind of raid box everywhere it'll make sense. Otherwise no :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .