{"action":"created","issue":{"url":"https://api.github.com/repos/smxi/inxi/issues/135","repository_url":"https://api.github.com/repos/smxi/inxi","labels_url":"https://api.github.com/repos/smxi/inxi/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/smxi/inxi/issues/135/comments","events_url":"https://api.github.com/repos/smxi/inxi/issues/135/events","html_url":"https://github.com/smxi/inxi/issues/135","id":308233502,"number":135,"title":"Partitions encryped, dm, lvm, how to handle","user":{"login":"smxi","id":13527949,"avatar_url":"https://avatars1.githubusercontent.com/u/13527949?v=4","gravatar_id":"","url":"https://api.github.com/users/smxi","html_url":"https://github.com/smxi","followers_url":"https://api.github.com/users/smxi/followers","following_url":"https://api.github.com/users/smxi/following{/other_user}","gists_url":"https://api.github.com/users/smxi/gists{/gist_id}","starred_url":"https://api.github.com/users/smxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smxi/subscriptions","organizations_url":"https://api.github.com/users/smxi/orgs","repos_url":"https://api.github.com/users/smxi/repos","events_url":"https://api.github.com/users/smxi/events{/privacy}","received_events_url":"https://api.github.com/users/smxi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-24T06:23:07Z","updated_at":"2018-03-29T20:20:35Z","closed_at":null,"author_association":"OWNER","body":"A very good but difficult question has come up about how to handle lvm or encryped partitions, re getting their data correct, not showing the default fuseblkfs that df and partitions will give.\r\n\r\nThis is going to require a lot more data from different setups because I realized, the initial issue reported by hydrurga here:\r\nhttps://forums.linuxmint.com/viewtopic.php?f=61&t=265932&p=1446779#p1446779\r\nI believe is actually far more extensive and difficult to resolve than first meets the eye. I've set up some initial data  debugger collectors for lsblk outputs in varying form, but unfortunately I just added them recently and only have one relevant sample from one relevant variation.\r\n\r\nhttps://en.wikipedia.org/wiki/Device_mapper\r\n```\r\nlsblk  -r --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE\r\nNAME PKNAME TYPE RM FSTYPE SIZE\r\nsda  disk 0  931.5G\r\nsda2 sda part 0 ntfs 50G\r\nsda16 sda part 0 ext4 5G\r\nsda14 sda part 0  400G\r\nveracrypt1 sda14 dm 0 ntfs 400G\r\nsda9 sda part 0 ext4 50G\r\nsda12 sda part 0 ext4 20G\r\nsda7 sda part 0 swap 7G\r\nsda10 sda part 0 ext4 60G\r\nsda5 sda part 0 ext4 20G\r\nsda17 sda part 0 ext4 5G\r\nsda1 sda part 0 ntfs 100M\r\nsda15 sda part 0 ntfs 4.9G\r\nsda13 sda part 0 ntfs 40G\r\nsda8 sda part 0 ext4 114.9G\r\nsda11 sda part 0 ext4 50G\r\nsda6 sda part 0 ext4 20G\r\n```\r\n\r\nand with -P pairs, which is probably what pinxi/inxi will use I believe since it's a natural to generate internal hashes of key value pairs.\r\n\r\n```\r\nlsblk  -P --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE\r\nNAME=\"sda\" PKNAME=\"\" TYPE=\"disk\" RM=\"0\" FSTYPE=\"\" SIZE=\"931.5G\"\r\nNAME=\"sda2\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ntfs\" SIZE=\"50G\"\r\nNAME=\"sda16\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ext4\" SIZE=\"5G\"\r\nNAME=\"sda14\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"\" SIZE=\"400G\"\r\nNAME=\"veracrypt1\" PKNAME=\"sda14\" TYPE=\"dm\" RM=\"0\" FSTYPE=\"ntfs\" SIZE=\"400G\"\r\nNAME=\"sda9\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ext4\" SIZE=\"50G\"\r\nNAME=\"sda12\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ext4\" SIZE=\"20G\"\r\nNAME=\"sda7\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"swap\" SIZE=\"7G\"\r\nNAME=\"sda10\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ext4\" SIZE=\"60G\"\r\nNAME=\"sda5\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ext4\" SIZE=\"20G\"\r\nNAME=\"sda17\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ext4\" SIZE=\"5G\"\r\nNAME=\"sda1\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ntfs\" SIZE=\"100M\"\r\nNAME=\"sda15\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ntfs\" SIZE=\"4.9G\"\r\nNAME=\"sda13\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ntfs\" SIZE=\"40G\"\r\nNAME=\"sda8\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ext4\" SIZE=\"114.9G\"\r\nNAME=\"sda11\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ext4\" SIZE=\"50G\"\r\nNAME=\"sda6\" PKNAME=\"sda\" TYPE=\"part\" RM=\"0\" FSTYPE=\"ext4\" SIZE=\"20G\"\r\n```\r\n\r\nand tree view, which is good for humans and bad for machines.\r\n\r\n```\r\nlsblk -f\r\nNAME           FSTYPE LABEL      UUID                                 MOUNTPOINT\r\nsda                                                                   \r\n├─sda2         ntfs   Programs   01F25B81853F9600                     \r\n├─sda16        ext4   ShareLinux 86ff5f1a-02a3-d101-00bc-52320213d101 /media/sharelnx\r\n├─sda14                                                               \r\n│ └─veracrypt1 ntfs              15F150Duuid...                     /media/veracrypt1\r\n├─sda9         ext4   VM10       2094237f-uuid... /media/vm10\r\n├─sda12        ext4   VMMint     e17ae1ae-uuid... /media/vmmint\r\n├─sda7         swap              4966ab37-uuid... [SWAP]\r\n├─sda10        ext4   VM7        bcf77bbf-uuid... /media/vm7\r\n├─sda5         ext4   MintRoot   c6575a7a-uuid... /\r\n├─sda3                                                                \r\n├─sda17        ext4   MintData   9be92a85-uuid... /home/hydrurga/data\r\n├─sda1         ntfs   SYSTEM     3E20uuid...                     \r\n├─sda15        ntfs   ShareWin   01D126uuid...                     /media/share\r\n├─sda13        ntfs   Music      01D1212uuid...                     /media/music\r\n├─sda8         ext4   VMs        de4affe7uuid... /media/vms\r\n├─sda11        ext4   VM8.1      3fef1dae-uuid... /media/vm8.1\r\n└─sda6         ext4   MintHome   d0e9812d-uuid... /home\r\n```\r\n\r\nAfter reading up on this, I realized this is essentially two issues, interrelated, neither of which old inxi could have handled, which is: dm is a encrypted OR lvm volume. An lvm volume can have > 1 partitions. I have no meaningful data samples that show the range, so to solve the encrypted volume, which is as you notice type dm, not part, requires also solving the lvm probllem, so this is a much more complicated problem than I first thought."},"comment":{"url":"https://api.github.com/repos/smxi/inxi/issues/comments/377359847","html_url":"https://github.com/smxi/inxi/issues/135#issuecomment-377359847","issue_url":"https://api.github.com/repos/smxi/inxi/issues/135","id":377359847,"user":{"login":"smxi","id":13527949,"avatar_url":"https://avatars1.githubusercontent.com/u/13527949?v=4","gravatar_id":"","url":"https://api.github.com/users/smxi","html_url":"https://github.com/smxi","followers_url":"https://api.github.com/users/smxi/followers","following_url":"https://api.github.com/users/smxi/following{/other_user}","gists_url":"https://api.github.com/users/smxi/gists{/gist_id}","starred_url":"https://api.github.com/users/smxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smxi/subscriptions","organizations_url":"https://api.github.com/users/smxi/orgs","repos_url":"https://api.github.com/users/smxi/repos","events_url":"https://api.github.com/users/smxi/events{/privacy}","received_events_url":"https://api.github.com/users/smxi/received_events","type":"User","site_admin":false},"created_at":"2018-03-29T20:19:33Z","updated_at":"2018-03-29T20:20:35Z","author_association":"OWNER","body":"Great, just the kind of data I was hoping to see, however, the standard tree output is for eyes, not machines.\r\n```\r\n\r\nlsblk  -Pb --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE\r\nlsblk  -rb --output NAME,PKNAME,TYPE,RM,FSTYPE,SIZE\r\n```\r\n\r\nI had a sneaking suspicion that the original single instance case was just a subset of a much more complicated full set of possible values in lsblk.\r\n\r\ninxi will be reading either the first or second variant, probably the second since it's most machine friendly. (well, json is most machine friendly, but that requires a module not everyone will have)"}}
{"actor":{"display_login":"smxi"}}