0

I have an issue on my CentOS machine with hard drive space on root.

df -h returns

Filesystem           Size  Used Avail Use% Mounted on
devtmpfs             126G     0  126G   0% /dev
tmpfs                126G  352M  126G   1% /dev/shm
tmpfs                126G   59M  126G   1% /run
tmpfs                126G     0  126G   0% /sys/fs/cgroup
/dev/mapper/cl-root   50G   50G  255M 100% /
/dev/mapper/cl-home  898G  887G   11G  99% /home
/dev/nvme0n1p2       976M  360M  550M  40% /boot
/dev/nvme0n1p1       599M  7.3M  592M   2% /boot/efi
tmpfs                 26G   72K   26G   1% /run/user/1001

However a screenshot of the Disks application shows I have additional (unmounted?) drives: enter image description here

When I try to format the 8.0 TB Hard Disk in an attempt to mount it CentOS warns me that all data on the volume will be lost - I do not want to lose any of the files on my system so am unsure about this.

How do I increase the size of root and how can I get access to the 1TB and 8TB storage shown in the Disk GUI without any risk of losing files?

EDIT: vgs returns:

  VG #PV #LV #SN Attr   VSize   VFree
  cl   1   3   0 wz--n- 952.28g    0 

pvs returns:

  PV             VG Fmt  Attr PSize   PFree
  /dev/nvme0n1p3 cl lvm2 a--  952.28g    0 

fdisk -l returns:

Disk /dev/nvme0n1: 953.9 GiB, 1024209543168 bytes, 2000409264 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
Disklabel type: gpt
Disk identifier: 6C8024F1-6066-44CF-955B-F9869E79A4A9

Device           Start        End    Sectors   Size Type
/dev/nvme0n1p1    2048    1230847    1228800   600M EFI System
/dev/nvme0n1p2 1230848    3327999    2097152     1G Linux filesystem
/dev/nvme0n1p3 3328000 2000408575 1997080576 952.3G Linux LVM


Disk /dev/sda: 7.3 TiB, 8001563222016 bytes, 15628053168 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
Disklabel type: gpt
Disk identifier: 08429B71-E4F8-4794-9128-733FDAD3C5EF

Device       Start         End     Sectors  Size Type
/dev/sda1     2048     1230847     1228800  600M EFI System
/dev/sda2  1230848     3327999     2097152    1G Linux filesystem
/dev/sda3  3328000 15628052479 15624724480  7.3T Linux LVM


Disk /dev/mapper/cl-root: 50 GiB, 53687091200 bytes, 104857600 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


Disk /dev/mapper/cl-swap: 4 GiB, 4294967296 bytes, 8388608 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


Disk /dev/mapper/cl-home: 898.3 GiB, 964522147840 bytes, 1883832320 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
7
  • what are the results of vgs and pvs? Mar 7, 2022 at 13:03
  • @RomeoNinov Thank you for your reply. I have edited the question to include the results of vgs and pvs.
    – Tom Waits
    Mar 7, 2022 at 13:04
  • Tom, your 1TB disk is used for root and home filesystems. About 8TB maybe fdisk -l can give you a answer. Mar 7, 2022 at 13:08
  • Tom, check line which start with /dev/sda3 Your disk is already partitioned and this is the reason for the error. However this specific partition have PV and I do not know if you have any info there Mar 7, 2022 at 13:12
  • @RomeoNinov I have updated my question again with fdisk -l. Perhaps I should be moving the /home/ filesystem to the 8TB disk or I should increase the amount of space allocated to /root/ above 50GB. How do I check /dev/sda3 ? df -h does not show it unfortunately
    – Tom Waits
    Mar 7, 2022 at 13:16

1 Answer 1

2

Based on comments it seems you have another PV which (if no information there) you can add to the VG:

vgextend cl /dev/sda3

After this you can extend the LVs:

lvextend -L+2GB /dev/mapper/cl-root

(this add 2GB to root filesystem)

and then extend root filesystem. The command depend of the filesystem you use

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .