Setup-storage doesn't properly partition drives when % is used.

Alex Volkov avolkov at gmail.com
Thu Jun 26 21:29:38 CEST 2008


I would like to partition a system that has plenty of free space left in
lvm volume group so I can do online backups of databases. I devised the
following configuration for that:

disk_config sda bootable:1
primary	/boot	128	ext2	rw
primary	-	10240-	-	-

disk_config lvm

vg vgmain	sda2
vgmain-swap	swap		2048		swap	sw
vgmain-root	/		5120-15%	ext3	rw,noatime
vgmain-var	/var		1024-30%	ext3	rw,noatime,data=ordered
vgmain-tmp	/tmp		1024-4096		ext3	rw,noatime,nodev
vgmain-local	/usr/local/	1024		ext3	rw,noatime,nodev,data=ordered

Ideally 45% of the drive would be occupied by root and var partitions,
another 4-8GB would be used by swap, tmp and local, and the rest of the
volume should be available.

I ran this configuration on two systems, with 500GB and 320GB disk
drives, after installation completed, every system had 1% of physical
volume free, the rest was used up by root and var partitions with a
ratio of percentages I set in config file, so var partition became twice
as big as root.

Is this a normal behaviour or am I doing something wrong?

Here is how the disks were partitioned:

500GB Drive:
default-amd64:~# lvs
  LV    VG     Attr   LSize   Origin Snap%  Move Log Copy%
  local vgmain -wi-ao   1.00G
  root  vgmain -wi-ao 146.50G
  swap  vgmain -wi-ao   2.00G
  tmp   vgmain -wi-ao   7.62G
  var   vgmain -wi-ao 303.86G
default-amd64:~# pvs
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda2  vgmain lvm2 a-   465.63G 4.64G
default-amd64:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vgmain-root
                      145G  713M  137G   1% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
udev                   10M   44K   10M   1% /dev
tmpfs                 2.0G  4.0K  2.0G   1% /dev/shm
/dev/sda1             122M   15M  101M  13% /boot
/dev/mapper/vgmain-tmp
                      7.6G  146M  7.0G   2% /tmp
/dev/mapper/vgmain-local
                     1008M   34M  924M   4% /usr/local
/dev/mapper/vgmain-var
                      300G  279M  284G   1% /var
default-amd64:~# 

320GB Drive:
default-i386:~# lvs
  LV    VG     Attr   LSize   Origin Snap%  Move Log Copy%
  local vgmain -wi-ao   1.00G
  root  vgmain -wi-ao  91.21G
  swap  vgmain -wi-ao   2.00G
  tmp   vgmain -wi-ao   7.59G
  var   vgmain -wi-ao 193.19G
default-i386:~# pvs
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda2  vgmain lvm2 a-   297.96G 2.97G
default-i386:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vgmain-root
                       90G  677M   85G   1% /
tmpfs                 1.8G     0  1.8G   0% /lib/init/rw
udev                   10M   44K   10M   1% /dev
tmpfs                 1.8G  4.0K  1.8G   1% /dev/shm
/dev/sda1             122M   14M  103M  12% /boot
/dev/mapper/vgmain-tmp
                      7.5G  146M  7.0G   2% /tmp
/dev/mapper/vgmain-local
                     1008M   34M  924M   4% /usr/local
/dev/mapper/vgmain-var
                      191G  272M  181G   1% /var
default-i386:~#   




More information about the linux-fai mailing list