1gig -> 2gig troubles

Sorry to post again, but even after following the link in the previous post, I don't think I have the answer to my question–which is briefly: How do I go from 1gig to 2gigs so that when I'm in my account it seems that I have 2 gigs continuously, even though they may be separated into various disk images?

Or, alternatively, how could I get my data off so that I could "reformat" with the full 2 gigs…and then put my data back on again?

Thanks for any advice.

11 Replies

@rhunter007:

Sorry to post again, but even after following the link in the previous post, I don't think I have the answer to my question–which is briefly: How do I go from 1gig to 2gigs so that when I'm in my account it seems that I have 2 gigs continuously, even though they may be separated into various disk images?

Or, alternatively, how could I get my data off so that I could "reformat" with the full 2 gigs…and then put my data back on again?

Thanks for any advice.

My best guess, though you'd have to check on linode.com's policies is this:

1) Add another gig to your account

2) Create an empty 2G filesystem with the new space

3) Add that partition as a device available to the 1G configuration

4) Boot the 1G configuration in single user mode

5) Log in and mount the 2G partition somewhere (I'd create a new directory like /2G at the root and mount it there)

6) cd to /2G and copy all of the files over using tar (If you have it mounted at /2G the commands would be something like:

 cd /2G
tar --create --exclude /2G / | tar --extract -p

In theory, you could now create a configuration to boot off of the 2G partition and it should work. Once you've verified everything is working and all the files got copied, delete the 1G partition and open a support ticket to have it removed from your account. You now have a single 2G partition and you're ready to rock and roll.

–James

Disclaimer: I haven't tested this and I haven't migrated a system to a new drive in years, but in theory it should work. If you want to try it safely first, download user mode linux at home and try it that way. It should be fairly similar.

If you want one disk that's 2GB, you'll have to delete and start over with the distro wizard.

If you're in too deep with your current setup, then the method I would use is copy your /usr or /home directory to another disk image, then delete it from the first disk image to free the space. Make sure you've edited /etc/fstab to mount the disk on boot.

The alternative is to add an additional gig to your account and use the method James outlined above…

This is a pain, isn't it?

-Chris

> This is a pain, isn't it?

Yeah, a little bit. I've never used LVM under Linux, but wouldn't it be perfect in this situation? Maybe you could offer LVM as an option in the distribution wizard. People who've deployed that would have a much easier time growing their installations.

http://tldp.org/HOWTO/LVM-HOWTO/

@golliher:

Yeah, a little bit. I've never used LVM under Linux, but wouldn't it be perfect in this situation? Maybe you could offer LVM as an option in the distribution wizard. People who've deployed that would have a much easier time growing their installations.
You read my mind. LVM is supported inside the Linode kernels, so you already can do it post-install.

I think the ultimate solution is to provide a resize facility. There already exists tools to do this (resize2fs and ext2resize). I've actually performed it manually with good results. I want to test it more before putting it out there.

-Chris

I played around with LVM in my linode today and had a lot of success. However when it comes to converting the root file system as talked about here:

http://tldp.org/HOWTO/LVM-HOWTO/upgraderoottolvm.html

I'm stumped when it gets to the part about using an initrd. I'm not sure how that would be applied to a linode.

@golliher:

I played around with LVM in my linode today and had a lot of success.
Cool! I'll take a look at the tutorial, too – and see if an LVM supported Distro Wizard would be easy to implement.

@golliher:

I'm stumped when it gets to the part about using an initrd. I'm not sure how that would be applied to a linode.
You can ignore the initrd stuff, since the Linode kernels have everything compiled in already.

-Chris

@caker:

@golliher:

I think the ultimate solution is to provide a resize facility. There already exists tools to do this (resize2fs and ext2resize). I've actually performed it manually with good results. I want to test it more before putting it out there.

-Chris

I'm trying to decide which path to take. How long do you estimate will it be before you have a resize facility?

Thanks.

@rhunter007:

I'm trying to decide which path to take. How long do you estimate will it be before you have a resize facility?

Thanks.
I'd say one to two weeks before it would be available…

-Chris

Ok - feature released. You can now resize your disk images (bigger only).

http://www.linode.com/forums/viewtopic.php?t=246

Who's going to try it first? :twisted:

-Chris

@caker:

Ok - feature released. You can now resize your disk…(bigger only).
About time, I'm getting email for this sorta thing everyday. So.. what we talking? Pills? Cream?

@caker:

Who's going to try it first?
"Linode must be shutdown before resize". Chris, what happened to you man? You use to be cool (I just had to try it).

Anyways… took a 512 to 576 (had to use my software raid space) and everything seems to have worked fine. However, just a thought: perhaps a "you should backup first" warning.. just incase the nasty did happen it could save you some trouble.

Kenny

I did a resize from 1gig -> 3gigs and all seems to have worked.

Thanks Chris!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

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