Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Apr 26, 2009 2:20 pm 
Offline
Senior Newbie

Joined: Sun Apr 26, 2009 2:07 pm
Posts: 13
I am trying to set up a separate partition for /var, /tmp/ /home/ and /opt for a new Debian 5.0 installation. I have searched through the forums and thought I understood what to do, but it is not working. This is what I did:
1. Created 4 disk images for each partition using the raw format.
2. Created a new Debian 5.0 profile
3. Booted the new profile
4. Edited /etc/fstab to read:
Code:
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/xvda       /               ext3    noatime,errors=remount-ro 0       1
/dev/xvdb       none            swap    sw              0       0
/dev/xvdc   /home      ext3   defaults   1   2
/dev/xvdd   /opt      ext3   defaults   1   2
/dev/xvde   /tmp      ext3   defaults   1   2
/dev/xvdf   /var      ext3   defaults   1   2

5. Rebooted
When I look in /home I am seeing what the original Debian 5.0 profile, and not my new partition. When I try mounting a partition manually, I get this error:
Code:
li84-151:/# mount /tmp
mount: /dev/xvde is not a valid block device

Do I need to format the disk images? The instructions on the web interface said to make these disk images raw if they are to be used as a partition -
Quote:
If you plan on partitioning the device, use "unformatted / raw" for the Filesystem Type.

Thanks for any suggestions or a link to the "Linode approve method for creating a new install with separate partitions"!
Mark

[/list]


Top
   
 Post subject:
PostPosted: Sun Apr 26, 2009 3:06 pm 
Offline
Senior Member
User avatar

Joined: Sat Oct 16, 2004 11:13 am
Posts: 176
You should have chosed ext3/ext2 in the Linode Manger. The "raw format" is for when you wish to use a different file system, or to create individual partitions within that image (i.e. the image becomes a "disk")

But now that you have chosen the raw format, you can format using:
Code:
mkfs.ext3 /dev/xvde


Top
   
 Post subject:
PostPosted: Sun Apr 26, 2009 3:25 pm 
Offline
Senior Newbie

Joined: Sun Apr 26, 2009 2:07 pm
Posts: 13
Thanks. I thought that might be the problem. For future reference, were my steps correct except for choosing "raw" vs "ext3"? Since I haven't put any data on the disks, should I just delete all the images except Debian 5 and make them ext3? Then follow the steps I enumerated? I read in a forum post that my partitions would not be backed-up by Libode if I format them outside the web interface.
Thanks again from newbie land!
Mark


Top
   
 Post subject:
PostPosted: Sun Apr 26, 2009 9:08 pm 
Offline
Senior Member

Joined: Mon Feb 28, 2005 7:21 pm
Posts: 76
Hi mark,
Before booting into that profile, you need to link your new partitions to it (by editing that profile). Perhaps you did this, but it wasn't listed in your steps. It's set up this way so you can (for example) share a /home disk image across several different profiles.

Edit: Yes, for backups you'll need to create fresh disk images in a supported format.


Top
   
 Post subject:
PostPosted: Sun Apr 26, 2009 10:30 pm 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
You'll also want to avoid "raw" disks because the filesystems on them can't be resized by the Web interface when you shuffle your disk allocation around.

It can be done, but you have to deal with shrinking/expanding the filesystems yourself, and at the right point in the process. I have a lot of mail stored in Maildir format, so I have a ReiserFS partition. Whenever I have to rearrange it makes me very nervous!


Top
   
 Post subject:
PostPosted: Mon Apr 27, 2009 9:33 am 
Offline
Senior Newbie

Joined: Sun Apr 26, 2009 2:07 pm
Posts: 13
OK, now I get it. I forgot the step where I configure the Debian image for the new partitions.

If I have to grow/shrink a partition, do I have to move the data off that partition, change the size, and then move it back? Or can I just grow/shrink the partition through the web interface and be confident that I will not loose any data in that partition?

Thanks!

Mark


Top
   
 Post subject:
PostPosted: Mon Apr 27, 2009 9:54 am 
Offline
Senior Member
User avatar

Joined: Sat Oct 16, 2004 11:13 am
Posts: 176
mark wrote:
If I have to grow/shrink a partition, do I have to move the data off that partition, change the size, and then move it back? Or can I just grow/shrink the partition through the web interface and be confident that I will not loose any data in that partition?


You will not loose any data - use the online resize tool.


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


Who is online

Users browsing this forum: No registered users and 3 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