I am trying to add additional 40 GB to the 60 GB disk and make it 100GB. Disk is added from backend and in fdisk it shows 100GB. However, when trying to create new partition I get error "No free sectors available".
While trying to create partition with fdisk /dev/sda as below:
]# fdisk /dev/sda
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): p
Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0006d1e9
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 6528 51915776 8e Linux LVM
/dev/sda3 6528 7832 10481740 8e Linux LVM
/dev/sda4 7833 9137 10482412+ 5 Extended
/dev/sda5 7833 9137 10482381 8e Linux LVM
Partition 5 does not start on physical sector boundary.
Command (m for help): n
No free sectors available
Command (m for help): q
The fdisk -l output is below:
~]# fdisk -l
Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0006d1e9
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 6528 51915776 8e Linux LVM
/dev/sda3 6528 7832 10481740 8e Linux LVM
/dev/sda4 7833 9137 10482412+ 5 Extended
/dev/sda5 7833 9137 10482381 8e Linux LVM
Partition 5 does not start on physical sector boundary.
Disk /dev/mapper/vg_nkpdpbn01-lv_root: 69.2 GB, 69247959040 bytes
255 heads, 63 sectors/track, 8418 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_nkpdpbn01-lv_swap: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Additionally:
~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
ââsda1 8:1 0 500M 0 part /boot
ââsda2 8:2 0 49.5G 0 part
â ââvg_nkpdpbn01-lv_root (dm-0) 253:0 0 64.5G 0 lvm /
â ââvg_nkpdpbn01-lv_swap (dm-1) 253:1 0 5G 0 lvm [SWAP]
ââsda3 8:3 0 10G 0 part
â ââvg_nkpdpbn01-lv_root (dm-0) 253:0 0 64.5G 0 lvm /
ââsda4 8:4 0 1K 0 part
ââsda5 8:5 0 10G 0 part
ââvg_nkpdpbn01-lv_root (dm-0) 253:0 0 64.5G 0 lvm /
sr0 11:0 1 1024M 0 rom
~]# pvs
File descriptor 63 (pipe:[355848]) leaked on pvs invocation. Parent PID 20225: -bash
PV VG Fmt Attr PSize PFree
/dev/sda2 vg_nkpdpbn01 lvm2 a-- 49.51g 0
/dev/sda3 vg_nkpdpbn01 lvm2 a-- 9.99g 0
/dev/sda5 vg_nkpdpbn01 lvm2 a-- 9.99g 0
~]# lvs
File descriptor 63 (pipe:[356102]) leaked on lvs invocation. Parent PID 20225: -bash
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_root vg_nkpdpbn01 -wi-ao---- 64.49g
lv_swap vg_nkpdpbn01 -wi-ao---- 5.00g
~]# vgs
File descriptor 63 (pipe:[356125]) leaked on vgs invocation. Parent PID 20225: -bash
VG #PV #LV #SN Attr VSize VFree
vg_nkpdpbn01 3 2 0 wz--n- 69.49g 0
~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_nkpdpbn01-lv_root
64G 44G 17G 73% /
tmpfs 3.9G 4.0K 3.9G 1% /dev/shm
/dev/sda1 477M 115M 337M 26% /boot