Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On my Ubuntu Trusty AMD64, KDE desktop build I have 2 LVM2 PVs, each with a single VG. Each VG contains 2 or more LVs. On boot (a) none of the LVs are "available" so cannot be mounted from fstab they generate error s at boot time (b) once KDE is started none of the LVs is available (c) the LVs can easily be made available with "vgchange -ay" and all is well until the next reboot. In addition, none of the LVs report any free space information

Background - during a test install of another distro the LVM meta-data was all deleted. I managed to recover the LVM volumes using the saved metadata BUT this problem of boot not activating LVs emerged. I have installed other distros to test, and other Ubuntu installs - all have the same problem. This suggests there's something in the lvm data / metadata There are no apparently relevant messages in dmesg I cant see any issues with /etc/lvm/lvm.conf pvscan / vgscan / lvscan all complete ok without finding any errors All the data is located on a single HDD, in one single extent

lvs
  LV                    VG        Attr      LSize   Pool Origin        Data%  Move Log Copy%  Convert
  lvwin-data            virt-test -wi-a----  20.00g                                                  
  lvwin7_kvm            virt-test -wi-a---- 260.00g                                                  
  lvwin7_kvm_copy       virt-test -wi-a---- 260.00g                                                  
  lvwin7a               virt-test -wi-a---- 512.00g                                                  
  lvwin7ub              virt-test -wn-a----  40.00g                                                  
  lvwin7ub-pre-catalyst virt-test -wi-a----  40.00g                                                  
  lxc_images            virt-test -wn-a---- 100.00g                                                  
  programming_data      virt-test -wi-a----  50.00g                                                  
  xen-test-snap         virt-test swi-a-s--  30.00g      xen-test-win7  38.57                        
  xen-test-win7         virt-test owi-a-s-- 150.00g

/etc/lvm/lvm.conf

devices {
    dir = "/dev"
    scan = [ "/dev" ]
    obtain_device_list_from_udev = 1
    preferred_names = [ ]
    filter = [ "a/.*/" ]
    cache_dir = "/run/lvm"
    cache_file_prefix = ""
    write_cache_state = 1
    sysfs_scan = 1
    multipath_component_detection = 1
    md_component_detection = 1
    md_chunk_alignment = 1
    data_alignment_detection = 1
    data_alignment = 0
    data_alignment_offset_detection = 1
    ignore_suspended_devices = 0
    disable_after_error_count = 0
    require_restorefile_with_uuid = 1
    pv_min_size = 2048
    issue_discards = 1
}

allocation {
    maximise_cling = 1
    mirror_logs_require_separate_pvs = 0
    thin_pool_metadata_require_separate_pvs = 0
}

log {
    verbose = 0
    silent = 0
    syslog = 1
    overwrite = 0
    level = 0
    indent = 1
    command_names = 0
    prefix = "  "
}

backup {
    backup = 1
    backup_dir = "/etc/lvm/backup"
    archive = 1
    archive_dir = "/etc/lvm/archive"
    retain_min = 10
    retain_days = 30
}

shell {
    history_size = 100
}


global {
    umask = 077
    test = 0
    units = "h"
    si_unit_consistency = 1
    activation = 1
    proc = "/proc"
    locking_type = 1
    wait_for_locks = 1
    fallback_to_clustered_locking = 1
    fallback_to_local_locking = 1
    locking_dir = "/run/lock/lvm"
    prioritise_write_locks = 1
    abort_on_internal_errors = 0
    metadata_read_only = 0
    mirror_segtype_default = "mirror"
    use_lvmetad = 0
    thin_check_executable = "/usr/sbin/thin_check"
    thin_check_options = [ "-q" ]
}

activation {
    checks = 0
    udev_sync = 1
    udev_rules = 1
    verify_udev_operations = 0
    retry_deactivation = 1
    missing_stripe_filler = "error"
    use_linear_target = 1
    reserved_stack = 64
    reserved_memory = 8192
    process_priority = -18
    mirror_region_size = 512
    readahead = "auto"
    raid_fault_policy = "warn"
    mirror_log_fault_policy = "allocate"
    mirror_image_fault_policy = "remove"
    snapshot_autoextend_threshold = 100
    snapshot_autoextend_percent = 20
    thin_pool_autoextend_threshold = 100
    thin_pool_autoextend_percent = 20
    use_mlockall = 0
    monitoring = 0
    polling_interval = 15
}


####################
# Advanced section #
####################
dmeventd {
    mirror_library = "libdevmapper-event-lvm2mirror.so"
    snapshot_library = "libdevmapper-event-lvm2snapshot.so"
    thin_library = "libdevmapper-event-lvm2thin.so"
}

Any debugging suggestions are welcome

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.