Community

Unable to image although disk is only 1.7Gb

Avatar marsorbits 1 week, 2 days ago

Hey guys,

I'm trying to take an image of my disk. It has nothing but Nginx and Certbot installed on ubuntu 18.

Linode Image fails and says the drive is 2.6GB which is larger than the allowed 2GB .

Command below shows total size of 1.7G. Any ideas where it's getting 2.6GB from and how I can reduce the size somehow?

sudo du -h --max-depth=1 / | sort -h
0 /dev
0 /proc
0 /sys
4.0K /lib64
4.0K /mnt
4.0K /opt
4.0K /srv
8.0K /media
8.0K /snap
16K /lost+found
28K /root
40K /tmp
152K /home
4.9M /run
5.7M /etc
15M /bin
15M /sbin
73M /boot
341M /var
542M /lib
715M /usr
1.7G / <--- Am I missing something?

Thanks
M

2 Replies

Hello,

Because a disk image is a bit-for-bit copy of the drive, the entire filesystem is included in the image, resulting in a file that is the size of the entire partition/drive being copied, rather than just the size of the data living on it. Based on this, my guess is that you likely just need to resize your disk below 2GB prior to creating the image. If you follow the instructions in our guide on Resizing Your Disk, I'm confident you'll be able to create that image.

As an alternative, or if you still have issues but want to get a copy of your setup made in the meantime, you can follow our guide on Copying a Disk Over SSH, which will guide you through the process of using SSH and the 'dd' command to make an image to your local computer.

Regards,
Tom D.
Linode Support Team

First, check to see if the output of df -h yields a different result. The commands df and du report disk usage in different ways, so du may not be giving you a complete picture. You can review their man pages for more info or check out these links:

df: Report file system disk space usage
du: Estimate file space usage

If df -h still reports under 2GB used, at that point I'd recommend reaching out to Linode's Support Team to try to resolve the issue.

Reply

Please enter an answer
Tip:

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct