Newbie - Need to increase disk space.

General support questions
Post Reply
Minus_Human
Posts: 3
Joined: 2021/08/04 13:29:16

Newbie - Need to increase disk space.

Post by Minus_Human » 2021/08/04 13:51:19

Hello everyone,
i'm a newbie to CentOS/Linux etc and would be grateful for some help.
i have a server that is CentOS7 - Virtual, running out of disk space. Its running on proxmox.
in proxmox i have one hard drive attached via iscsi but cannot see much more then that.
when running df -h i see way more drives on the server then just what is visible in proxmox.

what i've done:
i've traced the the drives in my purestorage device attached to the host as ISCSI drives.
ran the command df -h and can see total size matches what is assigned in my purestorage.

then:
power down the VM
increase the space in purestorage
power up the VM.
run df -h

as you may have guessed additional space is not seen as available.
my question:
how do i extend the volume into the available space i have just made available?
how do i see the unallocated space available to confirm its available?

Thank you!

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Newbie - Need to increase disk space.

Post by jlehtone » 2021/08/04 14:59:22

A volume has "sectors". Volume might have have a partition table. A partition is a consecutive block of "sectors".

A filesystem has data within consecutive block of sectors. There are both file contents and metadata (i.e. bookkeeping, where the files are, etc).

You have added sectors to volume. The filesystem's need to be told that there are more sectors that they can use.

The exact details of "how" depend on what you have (because there are more than one way to set up things).

You can start with:

Code: Select all

lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT
df -h
Please show at least the output of first command.

Minus_Human
Posts: 3
Joined: 2021/08/04 13:29:16

Re: Newbie - Need to increase disk space.

Post by Minus_Human » 2021/08/05 07:36:32

Morning jlehtone,
Output for
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT


NAME SIZE TYPE FSTYPE MOUNTPOINT
sda 32G disk
├─sda1 500M part xfs /boot
└─sda2 31.5G part LVM2_member
├─vg_sclsnl01--015-lv_root 28.3G lvm xfs /
└─vg_sclsnl01--015-lv_swap 3.2G lvm swap [SWAP]
sdb 2.1T disk mpath_member
└─iscsi_workspace 2.1T mpath ext4 /mnt/workspace
sdc 2.1T disk mpath_member
└─iscsi_workspace 2.1T mpath ext4 /mnt/workspace
sdd 2.1T disk mpath_member
└─iscsi_workspace 2.1T mpath ext4 /mnt/workspace
sde 2.1T disk mpath_member
└─iscsi_workspace 2.1T mpath ext4 /mnt/workspace
sdf 1.2T disk mpath_member
└─iscsi_software 1.2T mpath ext4 /mnt/software
sdg 1.2T disk mpath_member
└─iscsi_software 1.2T mpath ext4 /mnt/software
sdh 1.2T disk mpath_member
└─iscsi_software 1.2T mpath ext4 /mnt/software
sdi 1.2T disk mpath_member
└─iscsi_software 1.2T mpath ext4 /mnt/software
sdj 5G disk mpath_member
└─iscsi_htcondor 5G mpath ext4 /mnt/htcondor
sdk 5G disk mpath_member
└─iscsi_htcondor 5G mpath ext4 /mnt/htcondor
sdl 5G disk mpath_member
└─iscsi_htcondor 5G mpath ext4 /mnt/htcondor
sdm 5G disk mpath_member
└─iscsi_htcondor 5G mpath ext4 /mnt/htcondor
sdn 5G disk mpath_member
└─iscsi_results 5G mpath ext4 /mnt/results
sdo 5G disk mpath_member
└─iscsi_results 5G mpath ext4 /mnt/results
sdp 5G disk mpath_member
└─iscsi_results 5G mpath ext4 /mnt/results
sdq 5G disk mpath_member
└─iscsi_results 5G mpath ext4 /mnt/results
sdr 250G disk mpath_member
└─iscsi_backup 250G mpath ext4 /mnt/backup
sds 250G disk mpath_member
└─iscsi_backup 250G mpath ext4 /mnt/backup
sdt 250G disk mpath_member
└─iscsi_backup 250G mpath ext4 /mnt/backup
sdu 250G disk mpath_member
└─iscsi_backup 250G mpath ext4 /mnt/backup
sdv 225G disk mpath_member
└─iscsi_home 225G mpath ext4 /mnt/home
sdw 225G disk mpath_member
└─iscsi_home 225G mpath ext4 /mnt/home
sdx 225G disk mpath_member
└─iscsi_home 225G mpath ext4 /mnt/home
sdy 225G disk mpath_member
└─iscsi_home 225G mpath ext4 /mnt/home
sdz 20G disk mpath_member
└─iscsi_releases 20G mpath ext4 /mnt/releases
sr0 1024M rom
sdaa 20G disk mpath_member
└─iscsi_releases 20G mpath ext4 /mnt/releases
sdab 20G disk mpath_member
└─iscsi_releases 20G mpath ext4 /mnt/releases
sdac 20G disk mpath_member
└─iscsi_releases 20G mpath ext4 /mnt/releases
sdad 2.9T disk mpath_member
└─iscsi_share 2.9T mpath ext4 /mnt/share
sdae 2.9T disk mpath_member
└─iscsi_share 2.9T mpath ext4 /mnt/share
sdaf 2.9T disk mpath_member
└─iscsi_share 2.9T mpath ext4 /mnt/share
sdag 2.9T disk mpath_member
└─iscsi_share 2.9T mpath ext4 /mnt/share

Minus_Human
Posts: 3
Joined: 2021/08/04 13:29:16

Re: Newbie - Need to increase disk space.

Post by Minus_Human » 2021/08/05 07:37:39

Output for df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 784K 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/vg_sclsnl01--015-lv_root 29G 5.0G 24G 18% /
/dev/sda1 497M 249M 249M 50% /boot
/dev/mapper/iscsi_results 4.8G 1.6G 3.0G 35% /mnt/results
/dev/mapper/iscsi_home 182G 166G 7.4G 96% /mnt/home
/dev/mapper/iscsi_backup 246G 23G 212G 10% /mnt/backup
/dev/mapper/iscsi_releases 20G 6.3G 13G 34% /mnt/releases
/dev/mapper/iscsi_htcondor 4.8G 2.8G 1.8G 62% /mnt/htcondor
/dev/mapper/iscsi_software 1.1T 912G 119G 89% /mnt/software
/dev/mapper/iscsi_workspace 1.8T 1.7T 17G 100% /mnt/workspace
/dev/mapper/iscsi_share 2.6T 2.3T 248G 91% /mnt/share
tmpfs 783M 0 783M 0% /run/user/0

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Newbie - Need to increase disk space.

Post by TrevorH » 2021/08/05 09:18:06

Filesystems have mulitple layers that you need to expand in order to expand a filesystem. You have to do those changes in the right order so first you need to resize the device itself and then once that's larger then you need to expand the partition or LVM LV that contains the filesystem and lastly you need to resize the filesystem that sits on that. From the output you have supplied it would appear that you have resized the LV from 1.8TB to 2.1TB but you have not then resized the filesystem that sits on top of that. Since it's an ext4 filesystem you need to read the man page for the resize2fs command and then run it on that filesystem to enlarge it to take up all 2.1TB.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Newbie - Need to increase disk space.

Post by jlehtone » 2021/08/05 17:35:30

Minus_Human wrote:
2021/08/05 07:36:32
Output for
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT

NAME SIZE TYPE FSTYPE MOUNTPOINT
sdb 2.1T disk mpath_member
└─iscsi_workspace 2.1T mpath ext4 /mnt/workspace
sdc 2.1T disk mpath_member
└─iscsi_workspace 2.1T mpath ext4 /mnt/workspace
sdd 2.1T disk mpath_member
└─iscsi_workspace 2.1T mpath ext4 /mnt/workspace
sde 2.1T disk mpath_member
└─iscsi_workspace 2.1T mpath ext4 /mnt/workspace
Minus_Human wrote:
2021/08/05 07:37:39
Output for df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/iscsi_workspace 1.8T 1.7T 17G 100% /mnt/workspace
TrevorH wrote:
2021/08/05 09:18:06
From the output you have supplied it would appear that you have resized the LV from 1.8TB to 2.1TB but you have not then resized the filesystem that sits on top of that. Since it's an ext4 filesystem you need to read the man page for the resize2fs command and then run it on that filesystem to enlarge it to take up all 2.1TB.
I do agree about the resize2fs, but feel a need to clarify the "LV". The term "LV" usually means logical volume of LVM2. However,

The drives /dev/sdb, /dev/sdc, /dev/sdd, and /dev/sde are four separate iSCSI connections between this iSCSI initiator and the iSCSI target (a storage node). All four give access to one volume, LUN, in the storage node. You basically have four network cables/links between your machine and the (proxmox?) storage device. The connection is redundant. There is no LVM2 involved in these.

Your machine runs multipathd, that recognizes that these four connections are views of same LUN (mpath_members, mpath) and creates "fifth disk", the /dev/mapper/iscsi_workspace. The /dev/mapper/iscsi_workspace is the volume from which you mount an ext4 filesystem to /mnt/workspace. It is that filesystem that you have to expand.

The proxmox shows you the LUNs. Your machine essentially lists each LUN five times. Hence, "much more".

Post Reply