Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun May 31, 2009 7:58 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
While my Linode 360 has been running, I created a disk image using extra space that wasn't allocated, I then realized I wanted to make it bigger and can't without shutting down my Linode.

The disk isn't part of my currently running profile, the profile was already running when the disk image was created. Why can't I resize it? Can someone explain in simple terms? Or is it just hard coded into the Linode Manager that you can't resize an image while your Linode is running, no matter what?

Yeah, I've already found and read this:
http://www.linode.com/forums/viewtopic.php?t=4141
'cat /proc/partitions' wrote:
major minor #blocks name

202 0 5505024 xvda
202 16 262144 xvdb


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 3:06 am 
Offline
Senior Member

Joined: Sun Nov 30, 2008 3:40 pm
Posts: 109
I was just about to suggest reading my thread, then I realized you already have.

The thing is, your linode is "aware" of that unmounted disk (as suggested by /proc/partitions). And, as long as the disk shows in /proc/partitions, you can't dynamically resize it.


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 6:03 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
I don't know - I seem to see the same thing.

It's easy enough to test - as an experiment, I created a brand new 100MB disk image. I did absolutely nothing other than the create disk image option, so there's no way any of my configuration profiles reference that disk. It's certainly unavailable in my currently running system.

I verified that my /proc/partitions matches exactly what I have configured in my running configuration profile, but nothing more. There's no change after I've created the image.

Attempting a resize submits a job, and then the job fails saying the Linode has to be stopped. Certainly seems like it ought to be able to work.

Maybe the system is structured so that the resize operation executes within the same set of resources as the Linode itself or something like that. Although if they can create an unrelated disk image while the Linode is running, you'd think it could be resized.

But I suspect is really is just an overzealous safety check.

-- David

PS: While I can't resize, I can delete the image, which I don't think I'd be able to do if it were associated with a running system.


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 8:39 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Quote:
The thing is, your linode is "aware" of that unmounted disk (as suggested by /proc/partitions). And, as long as the disk shows in /proc/partitions, you can't dynamically resize it.


In short, prove it :)

Right now, I have 5 disk images. One 5GB for the OS that I'm booted into, one 256MB for swap and three other 1GB disks that are not used or mounted anywhere. Debian knows nothing about those 1GB disks as far as I can tell. These three disks were also created after the OS was booted.

As you can see from what I posted previously from /proc/partitions it doesn't know anything about the other three disks, one of which I'm trying to resize. I have a Linode 360, which has a total of 20GB of space available. In Windows this would be easy, just check under disk management and Windows sees all space on the drives in the machine it's installed on, whether it's been allocated or not. But I don't see anything like that on Linux. As far as I can tell it's not under /proc/partitions, unless, which is quite possible, I'm not reading those numbers correctly.


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 9:14 am 
Offline
Senior Member

Joined: Sun Nov 30, 2008 3:40 pm
Posts: 109
waldo wrote:
As far as I can tell it's not under /proc/partitions, unless, which is quite possible, I'm not reading those numbers correctly.


I'm not sure how to read those numbers either, someone else can enlighten both of us on this one.

Still, your /proc/partitions shows 2 images, whereas you have 5. This might happen because they are created after boot time. If that's the case, if you reboot you should be able to see those in /proc/partitions as well.


Last edited by dcelasun on Mon Jun 01, 2009 9:16 am, edited 2 times in total.

Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 9:15 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
This is how the Linode manager behaves. It requires that your Linode be shut down to resize any partition, whether or not it is in the active profile, but it allows the deletion of partitions that are not in the active profile. There might be a reason for this, or it might just be the way that the resize mechanism is coded. Perhaps someone from Linode can tell us why this is?

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 9:19 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Code:
# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvda              5461616   1727704   3733912  32% /
tmpfs                   184428         0    184428   0% /lib/init/rw
tmpfs                   184428         4    184424   1% /dev/shm


I don't know how what that 2nd tmpfs is, nor do I know why either are mounted where they are. But I'm a Linux n00b and don't know much about swap.


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 9:36 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
dcelasun wrote:
This might happen because they are created after boot time. If that's the case, if you reboot you should be able to see those in /proc/partitions as well.


Just rebooted, no change:
'cat /proc/partitions' wrote:
major minor #blocks name

202 0 5505024 xvda
202 16 262144 xvdb


I've not added these disks to any profile, they are just disk images sitting under my Linode, not setup for any profile to be able to see or mount them yet.

I'm really just looking for an explanation I guess. Is it coded this way on purpose? Is it an oversight? More importantly, is it a bug in the Linode Manager?

In the "real world" you probably wouldn't run into this at all because you'd create an image, edit your profile to attach that image to the profile, reboot and mount the image. If you want/need to resize at that point you would need to shutdown anyway.

Well actually you might, you might do just as I did and realize you didn't create the disk the size you wanted and want to make it the right size before rebooting to be able to mount it.

But if Linode wants to err on the side of caution and safety I have no problems with that.


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 10:04 am 
Offline
Linode Staff
User avatar

Joined: Fri Oct 17, 2003 12:38 am
Posts: 287
Location: Dr Wierd's Lab, South Jersey Shore
We err on the side of caution only allowing images to be resized when the Linode is shutdown regardless of wether the currently running Linode has access to them. This is something that may change in the not to distant future as some new code for another feature makes which images are currently attached to a running Linode known.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group