Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Partitioning?
PostPosted: Sun Apr 27, 2008 4:01 pm 
Offline
Senior Newbie

Joined: Sun Apr 27, 2008 3:49 pm
Posts: 8
I am running opensuse on my linode and I purposely created the disk image smaller so I could create a separate partition for some other stuff. Then I realized that that sets the size of the "disk", not a root partition (So I can't access the free space). So, how do I create a disk image with free space inside for additional partitions?


Top
   
 Post subject:
PostPosted: Sun Apr 27, 2008 4:18 pm 
Offline
Senior Newbie

Joined: Sun Apr 27, 2008 3:49 pm
Posts: 8
Update: I tried creating a larger disk image, and then resizing the root partition. Unfortunately, there doesn't seem to be one. So I tried creating a /home partition from /dev/xvda, but yast says it can't be mounted because it's already in use by the system. So, now I have two "drives" (/dev/xvda and /dev/xvdb) and one partition (xvda1) that can't be mounted but is already in use? I am a little confused.


Top
   
 Post subject:
PostPosted: Sun Apr 27, 2008 4:20 pm 
Offline
Senior Newbie

Joined: Sun Apr 27, 2008 3:49 pm
Posts: 8
I am getting a more confused. How does partitioning, lvms, etc work on virtual machines? I am rather new at this...


Top
   
 Post subject:
PostPosted: Sun Apr 27, 2008 11:47 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
After a little investigation, it looks like it's best to think of the "disk images" as partitions. But, one of the disk image file system types is "raw", which might let you work with it using fdisk/cfdisk/sfdisk inside the linode. But I didn't try that...

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
 Post subject:
PostPosted: Mon Apr 28, 2008 7:15 pm 
Offline
Senior Member

Joined: Tue Jan 22, 2008 2:10 am
Posts: 103
It's probably easiest to just treat each disk image in the linode panel as a partition. If you want to use lvm from within your linode, you'll need either an initrd or a small root filesystem image to set up lvm, and a raw image to act as the actual LVM PV. I wouldn't recommend trying to use traditional fdisk - LVM is more featureful.


Top
   
 Post subject:
PostPosted: Tue Apr 29, 2008 12:36 am 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
I can't think of a good reason (although there may be one) to worry about partitioning within a Linode. Manipulating disk images at the "machine" (Web interface) level gives you all the advantages of LVM, and you have all the simplicity of basic file systems within the Linode.

I'd create all my filesystems via the Web interface. Okay, there's one exception: I've created one raw so that I could use reiserfs for a maildb store (a lot of small files). But still didn't bother to LVM-ize it, because all that's done outside the system.


Top
   
 Post subject:
PostPosted: Wed Jan 14, 2009 3:21 pm 
Offline
Newbie

Joined: Thu Oct 02, 2008 5:40 pm
Posts: 3
Location: Bellevue, WA
How about this reason:

I want to have a Linode dual boot for comparison testing purposes. One image has CentOS, the other has Ubuntu -- or different kernel versions, or whatever.

(I found this thread looking for my specific scenario, so it's not hypothetical)

I create an image for each OS and then a third image for a shared /home (or /opt) partition image where user data such as web pages, email, and deployments are kept, so they can be accessible from either OS image.

I haven't tried it yet, but my guess is that I can create an ext3 disk image and mount it on both profiles as /dev/xvdc (where /dev/xvdca is the OS and /dev/xvdb is the Swap). Does this make sense.?

I'd assume an /etc/fstab entry referencing /dev/xvdc needs created as well.


Top
   
 Post subject:
PostPosted: Wed Jan 14, 2009 3:47 pm 
Offline
Senior Member
User avatar

Joined: Mon Dec 10, 2007 4:30 pm
Posts: 341
Website: http://markwalling.org
fijiaaron wrote:
I haven't tried it yet, but my guess is that I can create an ext3 disk image and mount it on both profiles as /dev/xvdc (where /dev/xvdca is the OS and /dev/xvdb is the Swap). Does this make sense.?

Yup. It works too.
fijiaaron wrote:
I'd assume an /etc/fstab entry referencing /dev/xvdc needs created as well.

Yup, just like you would if you just had a /home split off.


Top
   
 Post subject:
PostPosted: Wed Jan 14, 2009 3:55 pm 
Offline
Senior Member
User avatar

Joined: Mon Jul 21, 2008 1:26 pm
Posts: 171
Website: http://www.rejecttheherd.net
Location: Seattle
Xan wrote:
I can't think of a good reason (although there may be one) to worry about partitioning within a Linode. Manipulating disk images at the "machine" (Web interface) level gives you all the advantages of LVM, and you have all the simplicity of basic file systems within the Linode.

I'd create all my filesystems via the Web interface. Okay, there's one exception: I've created one raw so that I could use reiserfs for a maildb store (a lot of small files). But still didn't bother to LVM-ize it, because all that's done outside the system.

MMM something askew and your log's grow huge pretty good reason to have a /var/log

Web server, /var/www keeps web sources on their own slice, security for one

Database, /var/lib/mysql

There are a number of reasons for both security and stability. Keeping everying on one slice especially for a server is foolish.

_________________
Image
Where "Thought Crime" is commited
http://www.rejecttheherd.net


Top
   
 Post subject:
PostPosted: Wed Jan 14, 2009 4:44 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
Marcus: those are all good reasons to have separate disk images, but with linodes that's the easiest way to handle it: disk images in the CP, and I can't think of why trying to partition a disk image would be better.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.

-- seen on the net


Top
   
 Post subject:
PostPosted: Wed Jan 14, 2009 4:49 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
SteveG wrote:
Marcus: those are all good reasons to have separate disk images, but with linodes that's the easiest way to handle it: disk images in the CP, and I can't think of why trying to partition a disk image would be better.

You can change partitions live and utilise them without needing a reboot; disk images require rebooting to make active.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Wed Jan 14, 2009 4:53 pm 
Offline
Newbie

Joined: Thu Oct 02, 2008 5:40 pm
Posts: 3
Location: Bellevue, WA
I tried it and it worked, with one snag related to my particular issue: with a shared home directory between Ubuntu and CentOS, the users have different UIDs and GIDs (starting with 500 on CentOS/Fedora and 1000 on Ubuntu) so I needed to change the UID to 1000 on Fedora, and will need to maintain /etc/passwd and /etc/groups for additional shared users.


Top
   
 Post subject:
PostPosted: Thu Jan 15, 2009 6:04 am 
Offline
Senior Newbie

Joined: Wed Dec 10, 2008 10:35 am
Posts: 14
sweh wrote:
You can change partitions live and utilise them without needing a reboot; disk images require rebooting to make active.


Only if none of the partitions on the disk are in use at the time you change the partitioning - if they are, you'll get a message saying that the kernel still uses the old partition table and that you'll need to reboot it to use the new one.

(Of course, if you LVM-ise it, you don't have this problem, so you can ignore this post in that case.)


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


Who is online

Users browsing this forum: No registered users and 0 guests


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