I wish to increase a Directory in size after upgrading physical disk

Denali007

New Member
Sep 29, 2023
5
0
1
I first had a 1TB SSD and a secondary 1TB hdd in my system. I upgraded the secondary 1TB HDD to a 2TB SSD.
I created the directory on the old 1TB HDD so now i have a 1TB directory and can't seem to resize it to 2TB.

Now the problem is that the partition is 2TB but the directory doesn't change size, it even crashed when filled up.

How would i go about on changing the directory size without losing data?
 

Attachments

  • 1708792238013.png
    1708792238013.png
    27.2 KB · Views: 4
  • 1708792446165.png
    1708792446165.png
    5.2 KB · Views: 4
  • 1708792457120.png
    1708792457120.png
    11.4 KB · Views: 4
lsblk:
Code:
loop0                          7:0    0    50G  0 loop
loop1                          7:1    0     8G  0 loop
loop2                          7:2    0  1000G  0 loop
loop4                          7:4    0    20G  0 loop
sda                            8:0    0   1.8T  0 disk
└─sda1                         8:1    0   1.8T  0 part /mnt/pve/StorageHDD
nvme0n1                      259:0    0 953.9G  0 disk
├─nvme0n1p1                  259:1    0  1007K  0 part
├─nvme0n1p2                  259:2    0     1G  0 part /boot/efi
└─nvme0n1p3                  259:3    0 952.9G  0 part
  ├─pve-swap                 252:0    0     8G  0 lvm  [SWAP]
  ├─pve-root                 252:1    0   112G  0 lvm  /
  ├─pve-data_tmeta           252:2    0   8.3G  0 lvm 
  │ └─pve-data-tpool         252:4    0 816.2G  0 lvm 
  │   ├─pve-data             252:5    0 816.2G  1 lvm 
  │   ├─pve-vm--100--disk--0 252:6    0   320G  0 lvm 
  │   ├─pve-vm--101--disk--0 252:7    0     4G  0 lvm 
  │   ├─pve-vm--104--disk--0 252:8    0    10G  0 lvm 
  │   ├─pve-vm--102--disk--0 252:9    0   128G  0 lvm 
  │   ├─pve-vm--102--disk--1 252:10   0     4M  0 lvm 
  │   ├─pve-vm--102--disk--2 252:11   0     4M  0 lvm 
  │   ├─pve-vm--108--disk--0 252:12   0   200G  0 lvm 
  │   └─pve-vm--111--disk--0 252:13   0     8G  0 lvm 
  └─pve-data_tdata           252:3    0 816.2G  0 lvm 
    └─pve-data-tpool         252:4    0 816.2G  0 lvm 
      ├─pve-data             252:5    0 816.2G  1 lvm 
      ├─pve-vm--100--disk--0 252:6    0   320G  0 lvm 
      ├─pve-vm--101--disk--0 252:7    0     4G  0 lvm 
      ├─pve-vm--104--disk--0 252:8    0    10G  0 lvm 
      ├─pve-vm--102--disk--0 252:9    0   128G  0 lvm 
      ├─pve-vm--102--disk--1 252:10   0     4M  0 lvm 
      ├─pve-vm--102--disk--2 252:11   0     4M  0 lvm 
      ├─pve-vm--108--disk--0 252:12   0   200G  0 lvm 
      └─pve-vm--111--disk--0 252:13   0     8G  0 lvm

mount:
Code:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=16181652k,nr_inodes=4045413,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=3243064k,mode=755,inode64)
/dev/mapper/pve-root on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=30530)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
/dev/nvme0n1p2 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda1 on /mnt/pve/StorageHDD type ext4 (rw,relatime)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
lxcfs on /var/lib/lxcfs type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
/dev/fuse on /etc/pve type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=3243060k,nr_inodes=810765,mode=700,inode64)

cat /etc/pve/storage.cfg;

Code:
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content images,rootdir

dir: StorageHDD
        path /mnt/pve/StorageHDD
        content snippets,backup,rootdir,vztmpl,iso,images
        is_mountpoint 1
        nodes server

fdisk -l /dev/sda;

Code:
Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 870
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: 2D0D1B76-3D91-4F73-A72A-85EAFCCCEB31
 
fdisk -l /dev/sda;

Code:
Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 870
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: 2D0D1B76-3D91-4F73-A72A-85EAFCCCEB31
are you sure you collected entire output from this command? sda1 is present in prior commands, but is absent here. I would expect something like:
fdisk -l /dev/sda
Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors
Disk model: Virtual disk
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: 6FED41DA-4B37-4F25-8789-89FB0D40F988

Device Start End Sectors Size Type
/dev/sda1 34 2047 2014 1007K BIOS boot
/dev/sda2 2048 1050623 1048576 512M EFI System
/dev/sda3 1050624 67108830 66058207 31.5G Linux LVM

Also what is the output of "dh -h"?



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
fdisk -l /dev/sda;

Code:
Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 870
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: 2D0D1B76-3D91-4F73-A72A-85EAFCCCEB31

Device     Start        End    Sectors  Size Type
/dev/sda1   2048 3907029134 3907027087  1.8T Linux filesystem
Now it gives this sorry
dh-h gives
Code:
-bash: dh: command not found
 
Code:
udev                   16G     0   16G   0% /dev
tmpfs                 3.1G  1.7M  3.1G   1% /run
/dev/mapper/pve-root   94G   22G   68G  25% /
tmpfs                  16G   46M   16G   1% /dev/shm
tmpfs                 5.0M     0  5.0M   0% /run/lock
efivarfs              192K  108K   80K  58% /sys/firmware/efi/efivars
/dev/nvme0n1p2       1022M  344K 1022M   1% /boot/efi
/dev/sda1             916G  483G  388G  56% /mnt/pve/StorageHDD
/dev/fuse             128M   28K  128M   1% /etc/pve
tmpfs                 3.1G     0  3.1G   0% /run/user/0

haha, no problem, here is the output!
 
ok, so you have expected physical disk size:
sda 8:0 0 1.8T 0 disk
You have properly sized partition:
└─sda1 8:1 0 1.8T 0 part /mnt/pve/StorageHDD
yet your filesystem does not see the entire space
/dev/sda1 916G 483G 388G 56% /mnt/pve/StorageHDD

you are at this step: https://www.privex.io/articles/how-...to fit the grown partition,-The command you'd



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!