LVM spanning over multiple disks: What disk is a file on? Can I lose a drive without total loss?
1) How does the system determine what partition to use first?
Sun May 18 20:29:50 2014 - permalink -
When you create the LVs (when combining PVs into VG (?)) you can specify if the data is striped or mirrored but the default is linear allocation : the system fills from the first disk in the volume group to the last. But you can configure striping with extents.
2) Can I find what disk a file or folder is physically on?
3) If I lose a drive in the LVM, do I lose all data, or just data physically on that disk?
If you lose a PV, you can not get back online any of the LV stored on that PV (whether entirely or partially). In the case of a LV spun across several PVs, the missing data (from the dead HDD) will be seen as 0's (and is definitely LOST!). After replacing the dead HDD with a new one (and giving it the UUID of the previous disk), you _may_ be able to get the LV back and "fsck" it to read data from the part of the LV that's on a "good" disk.