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

Re: Preseed partman recipe not allocating free lvm space properly



On Sat, Dec 20, 2014 at 09:45:32AM +0100, Geert Stappers wrote:
> On Thu, Dec 18, 2014 at 09:37:44PM +0000, ryan wrote:
> > Hey list,  I'm trying to get my rematastered debian 7.7 iso to install
> > properly on several different classes of workstation we have.  Same basic
> > hardware,  all machines have 2 disks and the size is anywhere from 160GB
> > up to 1T.  
> > 
> > I created a recipe in my preseed file,  that seems to _almost_ work.  I can
> > get the remastered iso to install on both 160GB machines,  and 1TB machines
> > with the same recipe,  but in the 1TB machines,  partman still uses the
> > minimum values for the partitions,   then throws all the extra space left
> > in the lvm array into a dummy lv (for later removal).  Both software raid
> > arrays appear to get created properly.  At least md1 does seem to get the
> > remainder of the disk after md0 is created.
> > 
> 
> Euh, "Error: Missing information".
> * RAID0 or RAID1?

	Raid 1

> * If you care about LVM, why bother about mdX ( md0, md1) ?

I was trying to get the whole lvm array on md0,  but was having issues.
Got this working and really aren't worried about 2 software raid devices.

> * What is wrong with "throws extra space on the 1TB machine in dummy LV" ?

Perhaps I wasn't as clear as I could have been.  But in my preseed, the
defined partitions are always getting created using the minimum allowable
space.  The remainder of space ends up getting added to the dummy lvm
volume.  I thought the remainder of space would get distributed between the
defined partitions based on their priorities,  with any remaining going to
the dummy partition.



> And what result did you get?

The partitions created were sized at their minimum values,  and the dummy
lvm volume was many hundreds of GB.

> What is the expected result?

Max sized defined partitions with whatever is left over in the dummy lvm
volume

> 
> 
> In other words: I don't understand 
>   Subject: Preseed partman recipe not allocating free lvm space properly

Probably could have chosen a better subject.

I read on a blog somewhere that the priorities were actually from low
numbers to high.  First I had read that,  but adjusted preseed to the
following.

d-i partman-auto/expert_recipe string                      \
      raid-lvm ::                                          \
        512 10 512 raid                                    \
          $primary{ } $lvmignore{ } $bootable{ }           \
          method{ raid }                                   \
        .                                                  \
        155000  50000 -1 raid                                 \
          $primary{ } $lvmignore{ }                        \
          method{ raid }                                   \
        .                                                  \
        10000 10 20000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv00 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ / }                                  \
        .                                                  \
        20000 100 100000 ext4                                \
          $defaultignore $lvmok{ } lv_name{ lv01 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /home }                              \
        .                                                  \
        10000 20 20000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv02 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /var }                               \
        .                                                  \
        10000 20 20000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv03 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /usr }                               \
        .                                                  \
        10000 10000 10000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv04 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /tmp }                               \
        .                                                  \
        16000 50 32000 linux-swap                           \
          $defaultignore $lvmok{ } lv_name{ lv05 }         \
          method{ swap } format{ }                         \
        .                                                  \
        25000 30 50000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv06 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /opt }                               \
        .                                                  \
        50000 100 500000 ext4                                 \
          $defaultignore $lvmok{ } lv_name{ lv07 }         \
          method{ format } format{ }                       \
          use_filesystem{ } filesystem{ ext4 }             \
          mountpoint{ /var/opt }                           \
        .                                                  \
        512 10000 -1 ext4                                   \
          $defaultignore $lvmok{ } lv_name{ deleteme }     \
          method{ lvm }                                    \
        .


Resulting in the following

--- Logical volume ---
  LV Path                /dev/vg00/deleteme
  LV Name                deleteme
  VG Name                vg00
  LV UUID                F5DarE-qHW6-lQRI-91o7-rMGI-RYG4-HnSHTZ
  LV Write Access        read/write
  LV Creation host, time xxxxxxx, 2014-12-20 20:10:48 +0000
  LV Status              available
  # open                 0
  LV Size                858.78 GiB
  Current LE             219847
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:8

Filesystem             Size  Used Avail Use% Mounted on
rootfs                 9.2G  314M  8.4G   4% /
udev                    10M     0   10M   0% /dev
tmpfs                  397M  260K  397M   1% /run
/dev/mapper/vg00-lv00  9.2G  314M  8.4G   4% /
tmpfs                  5.0M     0  5.0M   0% /run/lock
tmpfs                  794M     0  794M   0% /run/shm
/dev/md0               472M   29M  419M   7% /boot
/dev/mapper/vg00-lv01   19G  172M   18G   1% /home
/dev/mapper/vg00-lv06   23G  452M   22G   3% /opt
/dev/mapper/vg00-lv04  9.2G  149M  8.6G   2% /tmp
/dev/mapper/vg00-lv03  9.2G  2.9G  5.9G  33% /usr
/dev/mapper/vg00-lv02  9.2G  320M  8.4G   4% /var
/dev/mapper/vg00-lv07   46G  293M   44G   1% /var/opt


Thanks for your time.



-- 
Ryan Braun
Defence Weather Services
Chief Information Officer Branch, Environment Canada
CIV: 204-833-2500x2824 CSN: 257-2824 FAX: 204-833-2558
E-Mail: Ryan.Braun@ec.gc.ca


Reply to: