Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 175326

Shrink boot disk on Ubuntu VM

$
0
0

Been breaking my head all day over this.

 

I have a thin provisioned Ubuntu Server 18 VM with a single EXT4 disk containing a Grub partition and an O.S. partition. The VM is running on ESXi 6.5 and both are managed through vSphere. The VM's disk is rather large and most of the data on the disk needs to be excluded from our backups. Because our backup software is unable to exclude files or partitions on O.S. level, I need to shrink the current disk and with the cleared space, create a new physical disk so the VM has two disks:

- One boot disk which needs to be backupped and which contains the O.S. and some other critical files.

- One data disk which can be excluded in our backup software.

I know thin provisioned disks don't take up unused space in the first place but even though that's the case, I want things to be clean and shrink the boot disk.

 

What I tried:

- Shrink the boot disk using a Gparted live .iso attached to the VM.

- After that I booted the VM and confirmed the O.S. still boots while now having the smaller disk.

- Next I powered off the VM, editted the .VMDK file and entered the new smaller size in the #Extent description section.

- After that, I migrated the VM to another datastore to make the changes to the .VMDK-file go in effect. After the migration the vSphere client  indeed shows the new smaller disk size.

So far so good but now when I power on the VM and boot, it stalls at 'Scanning for Btrfs filesystems', throws a bunch of 'mdadm: No arrays found in config file or automatically' errors and ends with 'Gave up waiting for root file system device' [..] "ALERT! UUID=xxxxxxxxxxxxxx does not exist. Dropping to a shell".

 

What am I doing wrong? Alot of sites mention the method above but I can't seem to make it work. Is it maybe better to use another method? If so which one?

I just need to shrink that one boot disk.


Viewing all articles
Browse latest Browse all 175326

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>