can't create partition with specific size at end of disk

John G. Heim jheim at math.wisc.edu
Mon Feb 18 21:49:14 CET 2013


All,

I can't get setup-storage to create a partition at the end of a disk 
with a specific size. It has to be a range or it doesn't work.  The 
config below works on a machine with a 250Gb disk. It creates a 70Gb 
root partition on /dev/sda1 and a 145 Gb partition on /dev/sda6.

disk_config disk1 bootable:1 align-at:4k
primary  /         60G-90G      ext3           rw,relatime 

logical  swap          4G-8G   swap   rw
logical  /export      120G-160G   ext3  rw,relatime

But the following config does not work, erroring out during partitioning 
with the message that /dev/sda1 is too small.

disk_config disk1 bootable:1 align-at:4k
primary  /         60G-90G      ext3           rw,relatime 

logical  swap          4G-8G   swap   rw
logical  /export      140G   ext3  rw,relatime

In other words, by itself, given a range, it will create a 145Gb 
partition as /dev/sda6. But if I ask it to create a smaller, 140Gb 
partition at the end of the disk, it crashes.

I'm trying to use FAI to create a bunch of machines with space for a 
distributed network file system (glusterfs). All the "bricks" have to be 
the same size. So /dev/sda6 has to be the same size on all machines, 
preferably as large as possible. If the disk is 300Gb instead of 250Gb, 
I still want a 140Gb partition at the end. And the reason I want it at 
the end is that I have to be able to explain the partitioning scheme to 
people who are not real knowledgable of linux. For example, I had some 
difficulty explaining to someone that they can't do a dual-boot install 
unless they see an NTFS partition at the beginning of the disk. It 
doesn't matter what is in there but FAI can't preserve a partition that 
doesn't exist.

Well, that example doesn't really apply directly in this case because 
these are linux-only machines. The point is that I'd really like 
thepartitioning to more or less match that of a machine where you did a 
regular debian install. I'd like to be able to say "The first primary 
partition will be the operating system and the second will contain some 
swap space and then space for user files, either /home or /export."


More information about the linux-fai mailing list