No space left on device while trying to resize
I set my Ubuntu 8.04 LTS Disk Image to 24000MB, and then migrated the downgrade. Now MySQL won't start saying " /etc/init.d/mysql: ERROR: The partition with is too full!"
I tried to reduce the Ubuntu 8.04 LTS Disk Image size. It failed:
…resize failed
resize2fs: No space left on device while trying to resize /dev/vg1/***
Resizing the filesystem on /dev/vg1/*** to 5888000 (4k) blocks.
I bought 4GB more storage. But it was the same. What should I do now?
8 Replies
The linode resize tools dont support any other fs type that isnt ext3..
@whatness:
I set my Ubuntu 8.04 LTS Disk Image to 24000MB, and then migrated the downgrade. Now MySQL won't start saying " /etc/init.d/mysql: ERROR: The partition with is too full!"
How full is your new LTS disk image? (E.g., what does a "df" in the running system show as free). It's possible that the new size does not have enough room for MySQL to create whatever working space it needs for its database.
> I tried to reduce the Ubuntu 8.04 LTS Disk Image size. It failed:
…resize failed
resize2fs: No space left on device while trying to resize /dev/vg1/***
Resizing the filesystem on /dev/vg1/*** to 5888000 (4k) blocks.
It sounds like the error is saying that the actual contents of the filesystem on the disk image is too large for the size you are trying to shrink it to, so it was picking a new size that was at least large enough to hold your current data. This would seem to jive with the MySQL error about the disk being pretty full. (Since MySQL already complained about free space, I'm not entirely sure why you were trying to resize down).
I'm not positive if the 4k blocks and Linode Manager "MB" are in typical disk sizes (k=1000, MB=1000000) or memory (k=1024, MB=1048576), but either way it would seem to indicate that you're likely using 96-98% of the 24000MB you initially resized to, which is a pretty full filesystem. And even if you have free space, unless its on the partition where /var/lib/mysql resides (which by default will hold the databases) it might not be helpful for mysql's needs.
BTW, is that the exact mysql error message you get? I believe it ought to have a filesystem path (like /var/lib/mysql) in there somewhere, which should help point you at the partition where you have to be sure to have the available space.
Have you tried freeing up space within the filesystem itself (e.g., in the running system, as opposed to the Linode disk image)?
> I bought 4GB more storage. But it was the same. What should I do now?
Did you resize your disk disk image after obtaining more storage? What's the free space like in your filesystem now?
– David
Filesystem Size Used Avail Use% Mounted on
varrun 271M 100K 271M 1% /var/run
varlock 271M 0 271M 0% /var/lock
devshm 271M 0 271M 0% /dev/shm
This is the way I do it
1. Boot into lish
2. create a mount point in /mnt, like /mnt/distro
3. Mount the drives to /mnt/distro (or what ever you called it)
4. Create a tarball
5. sftp the tarball somewhere safe
6. shut down Lish, delete and recreate the disk/disks to the appropriate size.
7. Boot into Lish, mount the new drives and extract the tarball
@whatness:
Filesystem Size Used Avail Use% Mounted on varrun 271M 100K 271M 1% /var/run varlock 271M 0 271M 0% /var/lock devshm 271M 0 271M 0% /dev/shm
Can you include the full output - or at least your root partition? By default mysql is going to want to put stuff in /var/lib/mysql, which isn't covered by any of the above filesystems (which are probably tmpfs filesystems in memory), so assuming you don't have another specific partition created for /var/lib the important entry will be your / partition. Probably /dev/xvda.
– David
@marcus0263:
You've created them as raw devices, resizing won't work. You're going to need to back up the disk, delete the disks and re-create them.
I haven't seen anything posted so far that would seem to explicitly show that anything is a raw device - what makes you think so?
I agree that should the filesystems be non-ext2/3 that manual steps are needed, but I haven't had any problems myself to date resizing ext3 filesystems through Linode Manager.
– David
@db3l:
@marcus0263:You've created them as raw devices, resizing won't work. You're going to need to back up the disk, delete the disks and re-create them.
I haven't seen anything posted so far that would seem to explicitly show that anything is a raw device - what makes you think so?I agree that should the filesystems be non-ext2/3 that manual steps are needed, but I haven't had any problems myself to date resizing ext3 filesystems through Linode Manager.
– David
I'm going blind in my old age, I saw "resize2fs" and it registered in my brain housing group as reiserfs:?