[SOLVED] Failed to Resize LXC: CT File resized but CT OS reports old size

kotakomputer

Renowned Member
May 14, 2012
429
13
83
Jakarta, Indonesia
www.proxmoxindo.com
1. CT is ON
----------------
Resizing CT from 100 GB to 200 GB, Proxmox UI failed message:

Image resized.
resize2fs 1.42.12 (29-Aug-2014)
resize2fs: Permission denied to resize filesystem
Filesystem at /dev/loop0 is mounted on /tmp; on-line resizing required
old_desc_blocks = 7, new_desc_blocks = 13
TASK ERROR: command 'unshare -m -- sh -c 'mount --make-rprivate / && mount /dev/loop0 /tmp && resize2fs /dev/loop0'' failed: exit code 1

2. So, I stopped the CT but failed to Start. But, CT size was 200 GB.

3. CT still Stopped then I resize again the CT from 200 GB to 250 GB, Proxmox says:

Image resized.
e2fsck 1.42.12 (29-Aug-2014)
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 499 has zero dtime. Fix? yes

Inodes that were part of a corrupted orphan linked list found. Fix? yes
Inode 526807 was part of the orphaned inode list. FIXED.
...............
Inode 4726021, i_blocks is 160, should be 80. Fix? yes


Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: +(8126464--8128952) +(8159232--8184413) +(8224768--8243212) +(8245248--8285571) +(8290304--8295650) +(8295664--8295741) -(19245786--19245791) -(19260074--19260083) -(19262408--19262417) +(19267372--19267381) +(19267584--19268125) +(19268127--19268158) +(19268608--19272060) +(19272071--19272559) +(19272570--19276666) +(19276670--19276953) +(19276964--19277617) +(19277624--19282172) +(19282183--19282656) +(19282667--19282868) +(19282879--19284592) +(19284606--19286606) +(19286622--19290358) +(19290360--19291118) +(19291120--19291246) +(19291248--19291478) +(19291480--19292032) +(19292034--19292054) +(19292056--19292112) -(19292180--19292192)
Fix? yes

Free blocks count wrong for group #587 (10, counted=36).
Fix? yes
............

/mnt/sda1/images/36165/vm-36165-disk-1.raw: ***** FILE SYSTEM WAS MODIFIED *****
/mnt/sda1/images/36165/vm-36165-disk-1.raw: 1313732/6553600 files (0.7% non-contiguous), 18367218/26214400 blocks
TASK ERROR: command 'e2fsck -f -y /mnt/sda1/images/36165/vm-36165-disk-1.raw' failed: exit code 1

4. CT is Starting now, but the size still 100 GB:
# pct enter 36165
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 99G 69G 25G 74% /
none 100K 4.0K 96K 4% /dev
cgroup 12K 0 12K 0% /sys/fs/cgroup
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup/cgmanager
none 7.9G 0 7.9G 0% /dev/shm
#
 
Seems the problem is that e2fsck fails. Do you still get errors if you run:

# pct fsck 36165
 
Last edited:
Code:
root@ids-094110:~# pct fsck 36165
cannot run fsck on active container
root@ids-094110:~# pveversion -v
proxmox-ve: 4.1-26 (running kernel: 4.2.6-1-pve)
pve-manager: 4.1-1 (running version: 4.1-1/2f9650d4)
pve-kernel-4.2.6-1-pve: 4.2.6-26
lvm2: 2.02.116-pve2
corosync-pve: 2.3.5-2
libqb0: 0.17.2-1
pve-cluster: 4.0-29
qemu-server: 4.0-41
pve-firmware: 1.1-7
libpve-common-perl: 4.0-41
libpve-access-control: 4.0-10
libpve-storage-perl: 4.0-38
pve-libspice-server1: 0.12.5-2
vncterm: 1.2-1
pve-qemu-kvm: 2.4-17
pve-container: 1.0-32
pve-firewall: 2.0-14
pve-ha-manager: 1.0-14
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u1
lxc-pve: 1.1.5-5
lxcfs: 0.13-pve1
cgmanager: 0.39-pve1
criu: 1.6.0-1
zfsutils: 0.6.5-pve6~jessie
root@ids-094110:~#
 
Code:
# pct fsck 36165
fsck from util-linux 2.25.2
/mnt/sda1/images/36165/vm-36165-disk-1.raw: clean, 369528/6553600 files, 8523021/26214400 blocks
root@ids-094110:~# pct start 36165
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 346 To get more details, run the container in foreground mode.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.
command 'lxc-start -n 36165' failed: exit code 1
root@ids-094110:~#

Then I start the CT using Proxmox UI then fine.

Code:
# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       99G   31G   63G  34% /
none            100K     0  100K   0% /dev
cgroup           12K     0   12K   0% /sys/fs/cgroup
tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup/cgmanager
#

The CT size still 100 GB.
 

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!