Public bug reported:

Hi,

In preseeding lvm configurations with recipe files, I've found that you cannot 
specify:
method{ keep } on a partition when installing.  When using this specification, 
all it does is go into a loop on the "Starting up the Partitioner" screen.

Interestingly enough, I've found that during this loop, if I chvt 2 and
run fsck.ext3 /dev/mapper/vg00-local it fixes some errors and is then
able to continue with setting up the VG while keeping the data.

Output from fsck:
fsck.ext3 -y /dev/mapper/vg00-local
e2fsck 1.41.4 (27-Jan-2009)
fsck.ext3: Superblock invalid, trying backup blocks...
/dev/mapper/vg00-local was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #30 (32254, counted=16194).
Fix? yes

Free blocks count wrong for group #924 (32254, counted=32253).
Fix? yes

Free blocks count wrong (31901196, counted=31885135).
Fix? yes

Free inodes count wrong for group #30 (8192, counted=8048).
Fix? yes

Directories count wrong for group #30 (0, counted=4).
Fix? yes

Free inodes count wrong for group #924 (8192, counted=8191).
Fix? yes

Directories count wrong for group #924 (0, counted=1).
Fix? yes

Free inodes count wrong (8118261, counted=8118116).
Fix? yes

/dev/mapper/vg00-local: ***** FILE SYSTEM WAS MODIFIED *****
/dev/mapper/vg00-local: 156/8118272 files (0.6% non-contiguous), 
573617/32458752 blocks

Same behavior in Jaunty and Intrepid, have not tried Karmic yet.

This happens every time.  I've found that by putting a script into
/lib/partman/finish.d/15fsck-local to fsck the drive when using this
recipe works just fine with keeping the data.

Recipe used to configure the drive initially:
1000 1000 1000 ext3                                
      $primary{ }                                  
      $bootable{ }                                 
      $defaultignore{ }                            
      method{ format }                             
      format{ }                                    
      use_filesystem{ }                            
      filesystem{ ext3 }                           
      mountpoint{ /boot } .

5000 100000 -1 lvm
      $defaultignore{ }
      device{ /dev/sda }
      vg_name{ vg00 }
      method{ lvm } .

5000 10000 10000 ext3
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ root }
      method{ format }
      format{ }
      use_filesystem{ }
      filesystem{ ext3 }
      mountpoint{ / } .

3000 10000 4000 ext3
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ var }
      method{ format }
      format{ }
      use_filesystem{ }
      filesystem{ ext3 }
      mountpoint{ /var } .

2048 10000 2048 linux-swap
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ swap }
      method{ swap }
      format{ } .

1000 10000 -1 ext3
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ local }
      method{ format }
      format{ }
      use_filesystem{ }
      filesystem{ ext3 }
      mountpoint{ /local } .

5000 10000 10000 ext3
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ cache }
      method{ format }
      format{ }
      use_filesystem{ }
      filesystem{ ext3 }
      mountpoint{ /usr/vice/cache } .

Recipe to keep the /local partition:
1000 1000 1000 ext3                                
      $primary{ }                                  
      $bootable{ }                                 
      $defaultignore{ }                            
      method{ format }                             
      format{ }                                    
      use_filesystem{ }                            
      filesystem{ ext3 }
      mountpoint{ /boot } .

5000 100000 -1 lvm
      $defaultignore{ }
      device{ /dev/sda }
      vg_name{ vg00 }
      method{ lvm } .

5000 10000 10000 ext3
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ root }
      method{ format }
      format{ }
      use_filesystem{ }
      filesystem{ ext3 }
      mountpoint{ / } .

3000 10000 4000 ext3
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ var }
      method{ format }
      format{ }
      use_filesystem{ }
      filesystem{ ext3 }
      mountpoint{ /var } .

2048 10000 2048 linux-swap
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ swap }
      method{ swap }
      format{ } .

1000 10000 -1 ext3
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ local }
      method{ keep }
      use_filesystem{ }
      filesystem{ ext3 }
      mountpoint{ /local } .

5000 10000 10000 ext3
      $lvmok{ }
      in_vg{ vg00 }
      lv_name{ cache }
      method{ format }
      format{ }
      use_filesystem{ }
      filesystem{ ext3 }
      mountpoint{ /usr/vice/cache } .


I also get prompted each time by a dialog about whether or not I want to write 
the changes to disks.  I have not found a value yet that I can pressed this 
away with.

** Affects: ubuntu
     Importance: Undecided
         Status: New

** Description changed:

  Hi,
  
  In preseeding lvm configurations with recipe files, I've found that you 
cannot specify:
  method{ keep } on a partition when installing.  When using this 
specification, all it does is go into a loop on the "Starting up the 
Partitioner" screen.
  
  Interestingly enough, I've found that during this loop, if I chvt 2 and
  run fsck.ext3 /dev/mapper/vg00-local it fixes some errors and is then
  able to continue with setting up the VG while keeping the data.
  
  Output from fsck:
  fsck.ext3 -y /dev/mapper/vg00-local
  e2fsck 1.41.4 (27-Jan-2009)
  fsck.ext3: Superblock invalid, trying backup blocks...
  /dev/mapper/vg00-local was not cleanly unmounted, check forced.
  Pass 1: Checking inodes, blocks, and sizes
  Pass 2: Checking directory structure
  Pass 3: Checking directory connectivity
  Pass 4: Checking reference counts
  Pass 5: Checking group summary information
  Free blocks count wrong for group #30 (32254, counted=16194).
  Fix? yes
  
  Free blocks count wrong for group #924 (32254, counted=32253).
  Fix? yes
  
  Free blocks count wrong (31901196, counted=31885135).
  Fix? yes
  
  Free inodes count wrong for group #30 (8192, counted=8048).
  Fix? yes
  
  Directories count wrong for group #30 (0, counted=4).
  Fix? yes
  
  Free inodes count wrong for group #924 (8192, counted=8191).
  Fix? yes
  
  Directories count wrong for group #924 (0, counted=1).
  Fix? yes
  
  Free inodes count wrong (8118261, counted=8118116).
  Fix? yes
  
  /dev/mapper/vg00-local: ***** FILE SYSTEM WAS MODIFIED *****
  /dev/mapper/vg00-local: 156/8118272 files (0.6% non-contiguous), 
573617/32458752 blocks
  
  Same behavior in Jaunty and Intrepid, have not tried Karmic yet.
  
  This happens every time.  I've found that by putting a script into
  /lib/partman/finish.d/15fsck-local to fsck the drive when using this
  recipe works just fine with keeping the data.
  
  Recipe used to configure the drive initially:
  1000 1000 1000 ext3                                
        $primary{ }                                  
        $bootable{ }                                 
        $defaultignore{ }                            
        method{ format }                             
        format{ }                                    
        use_filesystem{ }                            
        filesystem{ ext3 }                           
        mountpoint{ /boot } .
  
  5000 100000 -1 lvm
        $defaultignore{ }
        device{ /dev/sda }
        vg_name{ vg00 }
        method{ lvm } .
  
  5000 10000 10000 ext3
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ root }
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext3 }
        mountpoint{ / } .
  
  3000 10000 4000 ext3
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ var }
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext3 }
        mountpoint{ /var } .
  
- 2049 10000 2049 linux-swap
+ 2048 10000 2048 linux-swap
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ swap }
        method{ swap }
        format{ } .
  
  1000 10000 -1 ext3
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ local }
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext3 }
        mountpoint{ /local } .
  
  5000 10000 10000 ext3
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ cache }
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext3 }
        mountpoint{ /usr/vice/cache } .
  
  Recipe to keep the /local partition:
  1000 1000 1000 ext3                                
        $primary{ }                                  
        $bootable{ }                                 
        $defaultignore{ }                            
        method{ format }                             
        format{ }                                    
        use_filesystem{ }                            
        filesystem{ ext3 }
        mountpoint{ /boot } .
  
  5000 100000 -1 lvm
        $defaultignore{ }
        device{ /dev/sda }
        vg_name{ vg00 }
        method{ lvm } .
  
  5000 10000 10000 ext3
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ root }
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext3 }
        mountpoint{ / } .
  
  3000 10000 4000 ext3
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ var }
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext3 }
        mountpoint{ /var } .
  
  2048 10000 2048 linux-swap
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ swap }
        method{ swap }
        format{ } .
  
  1000 10000 -1 ext3
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ local }
        method{ keep }
        use_filesystem{ }
        filesystem{ ext3 }
        mountpoint{ /local } .
  
  5000 10000 10000 ext3
        $lvmok{ }
        in_vg{ vg00 }
        lv_name{ cache }
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext3 }
        mountpoint{ /usr/vice/cache } .
  
  
  I also get prompted each time by a dialog about whether or not I want to 
write the changes to disks.  I have not found a value yet that I can pressed 
this away with.

-- 
Partman lvm doesn't keep data
https://bugs.launchpad.net/bugs/455587
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to