# this sets the size of the root logical volume,
 # after the root and swap has been created, remaining
 # goes to the vserver partition
-ROOT_SIZE=14G
+ROOT_SIZE=70G
 
 
 # override the swap size
 
 # total minimum disk size in GB if all usable disks are below this
 # size, the node cannot be installed
-TOTAL_MINIMUM_DISK_SIZE=50
+TOTAL_MINIMUM_DISK_SIZE=120
 
 
 # set of langugase for install (used in /etc/rpm/macros)
 
                     SYSIMG_PATH + "/usr/boot/cacert.pem")
         file(SYSIMG_PATH + "/usr/boot/boot_server", "w").write(boot_server)
         shutil.copy("/usr/bootme/pubring.gpg", SYSIMG_PATH + "/usr/boot/pubring.gpg")
-        
+    
+    # Creating /cgroup directory
+    if not os.path.exists(SYSIMG_PATH + "/cgroup")
+        utils.makedirs(SYSIMG_PATH + "/cgroup")
+
     # For backward compatibility
     if os.path.exists("/usr/bootme"):
         utils.makedirs(SYSIMG_PATH + "/mnt/cdrom")
 
     # filesystems partitions names and their corresponding
     # reserved-blocks-percentages
     filesystems = {"root":5,"vservers":0}
-
-    # make the file systems
-    for fs in filesystems.keys():
-        # get the reserved blocks percentage
-        rbp = filesystems[fs]
-        devname = PARTITIONS[fs]
-        log.write("formatting %s partition (%s)%s.\n" % (fs,devname,txt))
-        utils.sysexec( "mkfs.ext2 -q %s -m %d -j %s" % (option,rbp,devname), log )
+    
+    # ROOT filesystem with ext2
+    fs = 'root'
+    rbp = filesystems[fs]
+    devname = PARTITIONS[fs]
+    log.write("formatting %s partition (%s)%s.\n" % (fs,devname,txt))
+    utils.sysexec( "mkfs.ext2 -q %s -m %d -j %s" % (option,rbp,devname), log )
+
+    # VSERVER filesystem with btrfs to support snapshoting and stuff
+    fs = 'vservers'
+    rbp = filesystems[fs]
+    devname = PARTITIONS[fs]
+    log.write("formatting %s partition (%s)%s.\n" % (fs,devname,txt))
+    utils.sysexec( "mkfs.btrfs %s" % (devname), log )
 
     # disable time/count based filesystems checks
-    for filesystem in ("root","vservers"):
+    for filesystem in ("root"):
         utils.sysexec_noerr( "tune2fs -c -1 -i 0 %s" % PARTITIONS[filesystem], log)
 
     # save the list of block devices in the log
 
                  PARTITIONS["mapper-swap"] )
     fstab.write( "%s           /           ext3      defaults  1 1\n" % \
                  PARTITIONS["mapper-root"] )
-    fstab.write( "%s           /vservers   ext3      tagxid,defaults  1 2\n" % \
+    fstab.write( "%s           /vservers   btrfs     defaults  1 2\n" % \
                  PARTITIONS["mapper-vservers"] )
     fstab.write( "none         /proc       proc      defaults  0 0\n" )
     fstab.write( "none         /dev/shm    tmpfs     defaults  0 0\n" )
     fstab.write( "none         /dev/pts    devpts    defaults  0 0\n" )
+    fstab.write( "none         /cgroup     cgroup    defaults  0 0\n" )
     fstab.close()
 
     log.write( "Writing system /etc/issue\n" )
 
             
         utils.makedirs( SYSIMG_PATH )
 
-        for filesystem in ("root","vservers"):
+        for filesystem in ("root"):
             try:
                 # first run fsck to prevent fs corruption from hanging mount...
                 log.write( "fsck %s file system\n" % filesystem )
             else:
                 # disable time/count based filesystems checks
                 utils.sysexec_noerr( "tune2fs -c -1 -i 0 %s" % PARTITIONS[filesystem], log)
+        
+        # TODO: add fschk for btrfs vserver volume!! 
 
         try:
             # then attempt to mount them
             VSERVERS_PATH = "%s/vservers" % SYSIMG_PATH
             utils.makedirs(VSERVERS_PATH)
             log.write( "mounting vserver partition in root file system\n" )
-            utils.sysexec("mount -t ext3 %s %s" % (PARTITIONS["vservers"], VSERVERS_PATH), log)
+            utils.sysexec("mount -t btrfs %s %s" % (PARTITIONS["vservers"], VSERVERS_PATH), log)
         except BootManagerException, e:
             log.write( "BootManagerException during mount of /vservers: %s\n" % str(e) )
             return -2