0

Newbie question - our sysadmin added a virtual disk to our Linux server using something called ESXi of which I am not familiar. When I do fdisk -l I can see the new disk:

Disk /dev/sdb: 300 GiB, 322122547200 bytes, 629145600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

But when I do df -h /dev/sdb the size is not right:

Filesystem      Size  Used Avail Use% Mounted on
udev            4.9G     0  4.9G   0% /dev

Any idea how to fix?

1 Answers1

0

Newbie indeed. df -h /dev/sdb does not show stats for sdb but rather to /dev. If

I want to see df stats for the new disk I need to:

  1. Create a partition.
  2. Create file-system.
  3. Mount the partion.
sudo parted /dev/sdb ext4 0% 100%
mkfs.ext4 /dev/sdb1
sudo mount -t ext4 /dev/sdb1 /mnt/sdb1
  1. https://linuxhint.com/how-to-mount-drive-in-ubuntu/
  2. https://unix.stackexchange.com/questions/315063/mount-wrong-fs-type-bad-option-bad-superblock
  3. https://unix.stackexchange.com/questions/18925/how-to-mount-a-device-in-linux