RHEL 7.7 fdisk -l not shown boot device

Dear All,

recently I try to extend my vm which is Redhat Enterprise 7.7 after expand the disk space with new size +30GiB but in the partition steps it not showing me the partitions part.

when i run below command it shown as:
[admin@Linuxsrv01~]# fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

info:
Virtualization: microsoft
Operating System: Oracle Linux Server 7.7

thanks,

Hello All,

in fact, Have Redhat linux virtual machine on Hyper-v system have 50GB disk size and i want to expand this disk up to 80GB without remove/delete the current data.
is there safe way to do this type of maintenance without losing our Data?

Thank you.

Hi Ali,

Can you share with us your mounted filesystems on this VM:

# mount

And also your volume layout?

# df -h

Apart from that, your first post mentions RHEL first, but Oracle Linux at the end. What distribution do we dealing with?

# cat /etc/os-release

That part where fdisk -l does not show partitions is rather strange. That single line is all the output?

Hi Sandmann,

Additional to that, this VHDX is fixed size with 50GB and I expanded up to be 80GB capacity… what i found between tow case is before expanding disk size when i run command fdisk -l it shown me that " Disk label type: gpt " and after expanding disk size i found different type which is “Disk label type: dos” ???

Please find below 3 command results,

[admin@Linuxsrv01~]# df -h
Filesystem           Size  Used Avail Use% Mounted on
devtmpfs             7.7G     0  7.7G   0% /dev
tmpfs                7.8G     0  7.8G   0% /dev/shm
tmpfs                7.8G  9.3M  7.7G   1% /run
tmpfs                7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/mapper/ol-root  9.8G  8.8G  451M  96% /
/dev/mapper/ol-home  4.8G   21M  4.6G   1% /home
/dev/mapper/ol-app    33G   49M   31G   1% /app
/dev/sda2           1014M  402M  613M  40% /boot
/dev/sda1            200M  9.9M  190M   5% /boot/efi
tmpfs                1.6G   12K  1.6G   1% /run/user/42
tmpfs                1.6G     0  1.6G   0% /run/user/0


  [admin@Linuxsrv01~]#  fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 54.8 GB, 54760833024 bytes, 106954752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
Disk identifier: C3493A37-2DBE-4FD3-A172-6987F3CE3253


#         Start          End    Size  Type            Name
 1         2048       411647    200M  EFI System      EFI System Partition
 2       411648      2508799      1G  Microsoft basic
 3      2508800    106952703   49.8G  Linux LVM

Disk /dev/mapper/ol-root: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/ol-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/ol-home: 5364 MB, 5364514816 bytes, 10477568 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/ol-app: 35.2 GB, 35219570688 bytes, 68788224 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


[admin@Linuxsrv01~]# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=8061816k,nr_inodes=20154                                                                                                                                                             54,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relat                                                                                                                                                             ime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=62                                                                                                                                                             0,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,se                                                                                                                                                             clabel,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime,seclabel)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,rela                                                                                                                                                             time)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,se                                                                                                                                                             clabel,devices)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatim                                                                                                                                                             e,seclabel,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,se                                                                                                                                                             clabel,freezer)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,se                                                                                                                                                             clabel,hugetlb)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,sec                                                                                                                                                             label,cpuset)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,secl                                                                                                                                                             abel,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,sec                                                                                                                                                             label,memory)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,re                                                                                                                                                             latime,seclabel,net_cls,net_prio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime                                                                                                                                                             ,seclabel,perf_event)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mapper/ol-root on / type ext4 (rw,relatime,seclabel,data=ordered)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=34,pgrp=1,time                                                                                                                                                             out=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
debugfs on /sys/kernel/debug type debugfs (rw,relatime,seclabel)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
/dev/mapper/ol-home on /home type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/ol-app on /app type ext4 (rw,relatime,seclabel,data=ordered)
/dev/sda2 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437                                                                                                                                                             ,iocharset=ascii,shortname=winnt,errors=remount-ro)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/42 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=1615684                                                                                                                                                             k,mode=700,uid=42,gid=42)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=1615684k                                                                                                                                                             ,mode=700)

thank you…

Hi Ali,

Your outputs show that you have an LVM based setup (makes things easier). Also, your /dev/sda still seems to be 50GB in size. Did you reboot the VM after expanding the disk from the Hypervisor? Or is that not an option?

Please also provide the output of the following:

# pvdisplay

So we can see the physical volume that is set up.

Hi Sandmann,
my steps was that VM have 50GB size fixed VHDX then turn off the machine and expand the disk size up to 80GB after that try to run command fdisk /dev/sda
select n for create a new partition as primary and type 8e save the configuration and reboot the system after rebooting the machine i can not found the partition like /dev/sda1 and /dev/sda2 ???
in this point i think the expanding steps have issue with disk type and I said that I can not complete the expanding steps with physical volume and logical volume to resize the disk space>>?!!!

Note: The machine is running now and cannot stop it or expand disk because our vendor they are working in project have deadline to finish it.

Thank you…

Hi Ali,

Your outputs suggest you have a GPT setup, and your fdisk version only give limited functionality on GPT. When you have chance to work on the VM again, you should try gdisk. We have a guide on partitioning that covers fdisk and gdisk both.

Sandmann

Hi Sandmann,

thank you very much,
i will update you with my feedback once work on the VM again.

Regards,