LVM support #6

Closed
andrius wants to merge 109 commits from (deleted):lvm-support-rebase into master

109 Commits

Author SHA1 Message Date
Chantara Tith 5a7574cf38 More documentations. 2016-08-15 13:18:48 +07:00
Chantara Tith f8d23a4b4f Add deactivatable check to deactivate VG operation. 2016-08-15 00:25:06 +07:00
Andrius Štikonas f7ca0df52a Make sure to activate all LVM LVs on start. 2016-08-14 18:13:13 +01:00
Chantara Tith e7492d9271 Add all LVM devices to the bottom of the devices list. 2016-08-14 22:23:17 +07:00
Chantara Tith f26b634f76 Remove device's partitionTable when deactivated. 2016-08-14 22:22:51 +07:00
Andrius Štikonas 871c651d57 Make variable names slightly more consistent thruoght kmpcore.
Add more doxygen comments.
2016-08-12 01:57:34 +01:00
Andrius Štikonas d37d6659c5 Simplify QStringList->QString conversion. 2016-08-12 01:56:50 +01:00
Andrius Štikonas d5cf03745f Simplify construction of PV list. 2016-08-12 01:46:02 +01:00
Chantara Tith 62daee28d4 Remove unused includes. 2016-08-12 05:51:59 +07:00
Chantara Tith 415b5e7942 Remove unused parameters from LvmDevice. 2016-08-12 05:51:59 +07:00
Chantara Tith 2a5bae9f08 API changes, Refactor and Raname to a consistant interface. 2016-08-12 05:51:59 +07:00
Andrius Štikonas 43ffd11e59 Convert some for loops into for ranged based loops. 2016-08-11 18:57:40 +01:00
Andrius Štikonas b455a0e41c Convert most of the remaining foreach cases. 2016-08-11 14:26:54 +01:00
Andrius Štikonas 19d899994e Fix a compilation error in KPM. 2016-08-08 22:33:17 +01:00
Andrius Štikonas be682bb5b3 More work on C++11 for loops. 2016-08-08 22:18:03 +01:00
Andrius Štikonas de729a0641 More work on C++11 for loops. 2016-08-08 20:45:41 +01:00
Andrius Štikonas 23a0eaf26a Make getFreePV const. 2016-08-08 19:38:14 +01:00
Andrius Štikonas 833dde09b8 Convert to C++11 for loop where it is safe (avoid detaching Qt objects). 2016-08-08 18:37:21 +01:00
Andrius Štikonas 5a1ad1cbc0 Fix broken include guard. 2016-08-08 17:32:40 +01:00
Andrius Štikonas 16a8d82d46 Show the describtion of resize LVM VG as one line. 2016-08-08 17:18:01 +01:00
Andrius Štikonas 7f976d3a56 Add --force to lvm pvcreate in case there are some old file system signatures. 2016-08-08 16:12:52 +01:00
Chantara Tith 5005057ec7 A small dirty hack to keep track of all the PVs that to be added to any VG. 2016-08-08 14:03:58 +07:00
Chantara Tith 4e6784c5a3 Add activating LVM LV and VG. 2016-08-08 13:05:52 +07:00
Chantara Tith 4bd1051ce1 Add deactivating VG operation. 2016-08-08 12:53:48 +07:00
Chantara Tith cb7bd2a306 Add deactivating VG and LV jobs. 2016-08-08 12:53:24 +07:00
Chantara Tith 1b41302191 Add deactivating LVM LV and VG. 2016-08-08 12:52:50 +07:00
Chantara Tith 6f6d754d52 Decouple VG scan and system scan. 2016-08-08 10:43:52 +07:00
Chantara Tith b1d5f1fed5 Move LVM deviceNodeList and LvPathList to public. 2016-08-08 10:14:52 +07:00
Chantara Tith 8eac41a7cb Add UUID for LV filesystem. 2016-08-08 09:35:02 +07:00
Chantara Tith 8115d738fe Store device pointer for RemoveVolumeGroupOperation for preview uses. 2016-08-08 07:50:53 +07:00
Chantara Tith 6898ceb52c Resizing Volume Group preview. 2016-08-08 06:40:34 +07:00
Chantara Tith 428116d354 Set partitionTable Last/First sector setter as public. 2016-08-08 04:53:39 +07:00
Chantara Tith 0139092e22 Add internal storage to LVM Device to keep track of its LVs and PVs. 2016-08-08 03:34:41 +07:00
Andrius Štikonas d2ed6a2f09 Improve resizing of LVM PVs. 2016-08-06 22:15:50 +01:00
Chantara Tith 2e2b73e09a Fix ResizeVolumeGroupJob Type. This fixes the build warnings. 2016-08-06 22:20:47 +07:00
Chantara Tith f6a72c05f2 LUKS static cast here should be sufficient. 2016-08-06 21:13:28 +07:00
Chantara Tith f10964fe7e FIX LVM2 PV resize FIXME. 2016-08-06 20:48:02 +07:00
Chantara Tith 15738373e0 Remove hardcoded 4096 payloadOffset. 2016-08-06 17:41:33 +07:00
Chantara Tith 83ec1169a3 Enable smartStatus for Disk Device only. 2016-08-06 17:17:52 +07:00
Chantara Tith 8909fc2ba8 Micro optimization. calling one external function instead of two. 2016-08-05 04:47:18 +07:00
Chantara Tith de5b0b0c23 Add LVM snapshotting functionality. 2016-08-01 20:35:28 +07:00
Chantara Tith 576cc35900 Reduce the calls of external functions to speed up scanning time. 2016-08-01 20:35:28 +07:00
Chantara Tith 6f4de62f4f House-cleaning, removing finished TODO and FIXME tasks. 2016-08-01 20:35:17 +07:00
Andrius Štikonas b915f08862 Revert "Add KAuth helper to detectFileSystem."
This reverts commit 71921cf500.
2016-08-01 20:30:16 +07:00
Andrius Štikonas 617749e3b8 Use more compact syntax for passing and returning kauth helper arguments. 2016-08-01 20:30:16 +07:00
l10n daemon script 201139c2d2 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-08-01 20:30:16 +07:00
Andrius Štikonas 3d7f3968f6 Various small cleanups. 2016-07-31 23:59:18 +01:00
Andrius Štikonas 3df27cb34a Remove unused header. 2016-07-30 21:50:52 +01:00
Andrius Štikonas 2b9c63ffe0 Fix crashes in LVM scanner when external device is unplugged without deactivating LVM partitions.
This commit removes stderror channel from output of external commands.
2016-07-30 21:11:15 +01:00
Andrius Štikonas db836f292b Add support for lvm pvmove before doing pvresize. 2016-07-30 18:48:04 +01:00
Andrius Štikonas b6b0d239f1 Do not limit number of partitions in Volume Manager Devices. 2016-07-30 17:23:17 +01:00
Andrius Štikonas 4f20405dce Get rid of unused LVM flag for LVM LV. 2016-07-29 15:46:00 +01:00
Chantara Tith 67657527d4 Move LVM scanning logic from DeviceScanner to LvmDevice. 2016-07-28 20:21:31 +07:00
Chantara Tith 6c86126cdb Use VG as PV mount point. 2016-07-28 17:41:38 +07:00
Chantara Tith 1476d6a30c Fix Luks over LVM resizing. Hardcode 512 as the sector instead of LVM PE size. 2016-07-28 02:57:49 +07:00
Chantara Tith c9f556672d House-cleaning and removing irrelevant TODO. 2016-07-28 02:57:49 +07:00
Chantara Tith 90e5e9c83e Deactivate VG before removing it. 2016-07-28 02:57:49 +07:00
Chantara Tith cbcfcc770e Hardcode LUKS payload offset return value in byte size instead of sector number. 2016-07-28 02:57:49 +07:00
Chantara Tith a8cf3e0737 Handle LUKS inside LVM. still need to fix incorrect sectorUsed. 2016-07-28 02:57:49 +07:00
Chantara Tith 4a422f8eea Display preview for LV operation. 2016-07-28 02:57:49 +07:00
Chantara Tith 72d2e175b8 Rephrashing comment. 2016-07-28 02:57:49 +07:00
Andrius Štikonas 01ef9cdc5f Fix displaying resize widget with small number of sectors. 2016-07-28 02:57:49 +07:00
Chantara Tith 7642a516c5 Add functionality to specify PE size when creating VG group. 2016-07-28 02:57:49 +07:00
Chantara Tith 10696c87a7 Fix LVM volume showing incorrect preview when creating new LV. 2016-07-28 02:57:49 +07:00
Chantara Tith 89db5b9131 Move LvmDevice member variables from 32 bits to 64 bits. 2016-07-28 02:57:49 +07:00
Chantara Tith 271b59a30b Add optional destination partitions to LVM movePV. This also helps preventing moving data back and forth when resizing. 2016-07-28 02:57:49 +07:00
Andrius Štikonas fcf65fda18 Fix integer overflow. 2016-07-28 02:57:49 +07:00
Chantara Tith 930f936b8c Handle case when the to-be-moved PV is not used. 2016-07-28 02:57:49 +07:00
Chantara Tith 5a36f03632 Initial work on Resize operation and move/resize jobs. 2016-07-28 02:57:49 +07:00
Chantara Tith 6805269dd0 Remove canRemove. 2016-07-28 02:57:49 +07:00
Chantara Tith c791280089 Refactor functions for getting list of PV and LV. 2016-07-28 02:57:49 +07:00
Chantara Tith e46af09523 Overload getPVSize for QStringList. 2016-07-28 02:57:49 +07:00
Chantara Tith 786bf82935 Move lvm2_pv functions to static. 2016-07-28 02:57:49 +07:00
Chantara Tith d216ffaaea It makes more sense to have logic for getting list of used PVs in the LvmDevice. 2016-07-28 02:57:49 +07:00
Chantara Tith d7917936e0 Handle LvmDevice's getField case when VG name is not supplied. 2016-07-28 02:57:49 +07:00
Chantara Tith faa314c87d Add LVM PV move. 2016-07-28 02:57:48 +07:00
Chantara Tith e526786d73 Initial work on removeVolume Operation and Job. 2016-07-28 02:57:48 +07:00
Chantara Tith 3898fec758 Move LVM removeVG parameter to LvmDevice instead of QString of VG name. 2016-07-28 02:57:48 +07:00
Chantara Tith ccd4cd7e4e Move createvolumegroup operation and job parameter to QStringList 2016-07-28 02:57:48 +07:00
Chantara Tith 5b92f1b411 Fix createVG PV list white space problem. 2016-07-28 02:57:48 +07:00
Chantara Tith e5714ced27 Add used and free PV scan for lvm2_pv. 2016-07-28 02:57:48 +07:00
Chantara Tith 016daaa75d Add removeVG lvmdevice. And, Change createVG to accpeting QStringList instead. 2016-07-28 02:57:48 +07:00
Chantara Tith 8b48406200 Initial work on create volume operation and job. 2016-07-28 02:57:48 +07:00
Chantara Tith 2770da7da6 Add LvmDevice createVG. 2016-07-28 02:57:48 +07:00
Chantara Tith 0ab8227d94 Add freeSetors for partitionTable 2016-07-28 02:57:48 +07:00
Chantara Tith 7851d9e93b Remove else clause 2016-07-28 02:57:48 +07:00
Chantara Tith aaa2158dc3 Move LVM totalPE to 64 bits 2016-07-28 02:57:48 +07:00
Chantara Tith 64a48d6e1c Disable createPartitionTable action for LVM device. 2016-07-28 02:57:48 +07:00
Chantara Tith a298800fe2 LVM LV resize Operation 2016-07-28 02:57:48 +07:00
Chantara Tith 503c493daf Fix LV used space. 2016-07-28 02:57:48 +07:00
Chantara Tith c0e3288741 Use partionPath for new LV partition 2016-07-28 02:57:48 +07:00
Chantara Tith cf193d6e66 Better LVM operations report 2016-07-28 02:57:48 +07:00
Chantara Tith 430f56e416 Move from creating unallocated LVM partitio manually to PartitionTable 2016-07-28 02:57:48 +07:00
Chantara Tith 86737c314e Move lvm2_pv from regex to field options. Add read used space to lvm pv 2016-07-28 02:57:48 +07:00
Chantara Tith 34810d3148 Add LVM operations 2016-07-28 02:57:48 +07:00
Chantara Tith b5262262c2 Add Label for LVM partition's filesystem 2016-07-28 02:57:48 +07:00
Chantara Tith 76800ea872 Add LVM delete partition job 2016-07-28 02:57:48 +07:00
Chantara Tith 542db88336 Fix PartitionTable sector representation and used space for LVM partition 2016-07-28 02:57:48 +07:00
Chantara Tith 0f3c4b0a8c Use KMountPoint for LvmDevice's Partition 2016-07-28 02:57:48 +07:00
Chantara Tith 5184935b3f Move scanPartitions to LVM Field 2016-07-28 02:57:48 +07:00
Chantara Tith fcfd6d2335 Move from regex to LVM Field options 2016-07-28 02:57:47 +07:00
Chantara Tith b7902cbdb9 Refactor and add UUID to LvmDevice 2016-07-28 02:57:47 +07:00
Chantara Tith 0bc72a13d4 Construct PartitionTable and Partition in LvmDevice 2016-07-28 02:57:47 +07:00
Chantara Tith b8380c69f8 Initial work on LvmDevice 2016-07-28 02:57:47 +07:00
Chantara Tith b53ab2eceb Initial Device separation 2016-07-28 02:57:47 +07:00
Chantara Tith e15e11a313 Cache lvm2_pv and luks result in finding external tool 2016-07-28 02:57:47 +07:00
Chantara Tith 8c3dbcd146 Add support for reading LVM PV info 2016-07-28 02:57:47 +07:00
Chantara Tith bfa59cdbad Implement lvm PV resizing 2016-07-28 02:57:47 +07:00
Chantara Tith 71212f2bf3 setting VG name as PV mount point 2016-07-28 02:57:47 +07:00