Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When I create a Logical Volume on my Hard disk and new partition is showing in fdisk -l output.

[root@linux1 ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bbaa3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        2611    20458496   8e  Linux LVM

Disk /dev/mapper/vg_linux1-lv_root: 18.8 GB, 18832424960 bytes
255 heads, 63 sectors/track, 2289 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_linux1-lv_root doesn't contain a valid partition table

Disk /dev/mapper/vg_linux1-lv_swap: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@linux1 ~]# pvs
  PV         VG        Fmt  Attr PSize  PFree
  /dev/sda2  vg_linux1 lvm2 a--  19.51g    0
[root@linux1 ~]# vgs
  VG        #PV #LV #SN Attr   VSize  VFree
  vg_linux1   1   2   0 wz--n- 19.51g    0
[root@linux1 ~]# lvs
  LV      VG        Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  lv_root vg_linux1 -wi-ao 17.54g
  lv_swap vg_linux1 -wi-ao  1.97g

Please help me how can disable showing logical volumes as individual hardsisks, Otherwise it is getting confusion if we have more number of hardisks with more number of LVM's.

I dont want to see the LV Disks "/dev/mapper/vg_linux1-lv_root" on fdisk -l output. Please let me know if there is any configuration change to do so..

share|improve this question

1 Answer 1

fdisk is working as designed, even if the design is apparently-broken.

From the man page:

       -l     List the partition tables for the  specified  devices  and  then
              exit.   If no devices are given, those mentioned in /proc/parti‐
              tions (if that exists) are used.

To work around this, specify the disks you want to use explicitly. For example:

fdisk -l /dev/sd?
share|improve this answer
    
In linux previous versions it wont show that way and it will show only the physical hardisk in fdisk -l but not the Logical volumes created on Physical hard disks. –  Sriharsha Kalluru Nov 27 '12 at 13:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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