I'm on centOS 6.4. I have a 39TB hardware RAID configured as RAID 6. I created a single 39TB partition with parted. It reports:

(parted) print                                                        
Model: JetStor JetStor -VOL#000 (scsi) Disk /dev/sdb: 39.0TB Sector
size (logical/physical): 512B/512B Partition Table: gpt
Number  Start   End     Size    File system  Name     Flags  1     
1049kB  39.0TB  39.0TB               primary

I created an lvm linear volume like so:

pvcreate /dev/sdb1
vgcreate vg_jet716s /dev/sdb1
lvcreate -L 30T -n lv_jet716s_1 vg_jet716s

Then I created an XFS fs on lv_jet716s_1, matching the raid stripe width and number:

mkfs.xfs -d su=64k,sw=13 /dev/mapper/vg_jet716s-lv_jet716s_1

But pvs outputs this:

[root@cfile ~]# pvs   PV         VG         Fmt  Attr PSize   PFree   
/dev/sda2  vg_cfile   lvm2 a--  464.76g 285.62g
/dev/sdb1  vg_jet716s lvm2 a--   35.47t   5.47t

I don't think I checked what pvs was outputing after creating just the physical volume. I probably only called 'lvs' to see that the logical volume had been created witht the right size. Here's lvs and vgs:

[root@cfile ~]# lvs
  LV           VG         Attr      LSize  Pool Origin Data%  Move Log Cpy%Sync Convert
  lv_root      vg_cfile   -wi-ao--- 50.00g                                             
  lv_swap      vg_cfile   -wi-ao--- 31.48g                                             
  lv_var       vg_cfile   -wi-ao--- 97.66g                                             
  lv_jet716s_1 vg_jet716s -wi-ao--- 30.00t                                             
[root@cfile ~]# vgs
  VG         #PV #LV #SN Attr   VSize   VFree  
  vg_cfile     1   3   0 wz--n- 464.76g 285.62g
  vg_jet716s   1   1   0 wz--n-  35.47t   5.47t

Any thoughts? I'm new to this and it's really surprising to lose almost 10% of my space. Thanks!



Unfortunately, your tools are not being meticulous about whether values are in TB or TiB. The volume is actually about 36 TiB, not 36 TB. The partition is actually about 39 TB, not 39 TiB.

36 TiB = (36 * 1024) GiB = 36,864 GiB
36,864 GiB = (36,864 * 1024) MiB = 37,748,736 MiB.

If you go all the way to bytes, you get 39,582,418,599,936 bytes, or about 39.6 TB.

So 36 TiB is approximately 39 TB.

| improve this answer | |
  • Great, thanks! So there still is 39TB on the vg, it's just decimal. I can remember now reading some about this difference in TiB and TB, it hadn't bit me yet. Now I'll remember! – Michael S Apr 12 '13 at 15:55

Your pvs output is using TiB but it's not immediately obvious; from man pvs:

--units hHbBsSkKmMgGtTpPeE

All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors, (k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes. Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify custom units e.g. --units 3M

You can tell parted to use TiB with

(parted) unit TiB

and then the numbers should match more closely - as David Schwartz said, 36TiB ~= 39TB.

| improve this answer | |
  • Thanks! Now I also see that lvm uses binary units by default, so when I asked for a 30T lv, it was TiB, and thus ~33TB. – Michael S Apr 12 '13 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.