Re: Kickstart, partitioning, differing disk space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If we're gonna be showing our work...

Here's how I partition my drives.  This grabs the driveinfo from the python libs, and apportions the drive as

/backup is 15%
/var/log is 5%, with a min of 1G. and a max of 5G.
/boot is 128M

/ is whatever's left.

See Chip's entry for how to detect vmware.  Hyper-V identifies as Microsoft Corp as the system-manufacturer.

This will *probably* not work for FC12 and RHEL-6, whenever that comes out, as they've entirely re-written the storage layer, but it works for redhat 5 based -distros.

drive = isys.hardDriveDict().keys()[0]
dev = parted.PedDevice.get("/dev/%s" % drive)
sizeMB = (float(dev.heads * dev.cylinders * dev.sectors) / (1024 * 1024) * dev.sector_size)
sizeMB_i = int(math.floor(sizeMB))
backup_size = int(math.floor(float(sizeMB * .15)))

if int(math.floor(float(sizeMB * .05))) < 1000:
        log_size = 1000
elif int(math.floor(float(sizeMB * .05))) > 5000:
        log_size = 5000
else:
        log_size = int(math.floor(float(sizeMB * .05)))


print "/var/log size is %i " % log_size
print "/backup size is %i " % backup_size
root_size = (sizeMB_i - backup_size - log_size - 128 - iutil.swapSuggestion()[1] )
print "/ size is %i " % root_size

Matt

Shabazian, Chip wrote:
# Default value for disks (27G layout)
BOOTSIZE=256
ROOTSIZE=8192
VARSIZE=8192
SWAPSIZE=2048
BANKTOOLSIZE=8192
GRIDSIZE=0

# check for small disk sizes < default 27G layout:
if [ ${DISKSIZE} -lt 27648 ]
then
        # create small disk (16G layout)
        ROOTSIZE=5120
        VARSIZE=5120
        SWAPSIZE=2048
        BANKTOOLSIZE=3072
fi

# force it if it's a VMware system with more than 20G of space
dmidecode | grep Manufacturer | head -1 | grep -q VMware
if [ $? = "0" ]
then
        # create small disk xen/vmware (16G layout)
        ROOTSIZE=5120
        VARSIZE=5120
        SWAPSIZE=2048
        BANKTOOLSIZE=3072
fi



-----Original Message-----
From: kickstart-list-bounces@xxxxxxxxxx
[mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of John Oliver
Sent: Monday, November 09, 2009 11:33 AM
To: Discussion list about Kickstart
Subject: Re: Kickstart, partitioning, differing disk space

On Mon, Nov 09, 2009 at 11:04:22AM -0800, Shabazian, Chip wrote:
  
We have three  different partitioning schemes.  The kickstart figures
out how big the disk is, then uses one of three different schemes
    
based
  
on the size.  However, if it's a VM, we automatically select the
smallest partitioning scheme
    

What are these "three schemes"?  How do they know when they're on a VM?
Could you include a copy of the relevant section of your ks file?

Thanks...

--
***********************************************************************
* John Oliver                             http://www.john-oliver.net/ *
*                                                                     *
***********************************************************************

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list
  
_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux