=== shardy_afk is now known as shardy [14:10] smoser: I'm looking at switching MBR disk setup to use sectors (rather than MB), because sfdisk in wily has dropped support for units other than sectors. [14:11] yes please. [14:11] smoser: How would you suggest I test this? I've done [33, [66, 82]], which is the canonical example we use. [14:11] But I don't really know what corner cases we might have that I should look at. [14:11] mainly i think you dont have to care. [14:11] CHS is garbage. [14:12] thats waht you're asking about, right? [14:12] what did '33, 66, 82' mean ? [14:13] smoser: No, at the moment we do (essentially) 'cat | sfdisk -uM '. [14:13] smoser: But sfdisk no longer supports megabytes as units, so I'm switching to using sectors as the units. [14:13] smoser: This is https://bugs.launchpad.net/cloud-init/+bug/1460715 [14:14] ah. ok. [14:14] what did you mean 33, 66, 82 ? [14:14] smoser: So I've tested using 'layout: [33, [66, 82]' (i.e. one-third ext4, two-thirds swap), but I don't really know what else to try to check that it works in practice. [14:19] Odd_Bloke, ok. now reading code and understand more. [14:20] well you basically have to turn everything into sectors. [14:20] now, to deal with sfdisk [14:21] smoser: Yeah, it's actually surprisingly painless. [14:21] smoser: I've got a branch prepped, I'm just trying to test it before pushing it up for review. [14:21] i've never really used that code. [14:22] in the future the plan is to support the disk layout settings taht curtin can do. [14:22] smoser: OK, I'll just push this up for review then. [14:22] I've done some basic testing. [14:40] smoser: That's https://code.launchpad.net/~daniel-thewatkins/cloud-init/lp1460715/+merge/274897 [14:41] Odd_Bloke, it'd be good to know if this code runs on old sfdisk [14:42] smoser: Ah, good point. [14:55] smoser: The existing trusty code doesn't work even without my changes. /o\ [14:56] Ah, I'm hitting https://bugs.launchpad.net/cloud-init/+bug/1311463. [14:59] Odd_Bloke, added a review [15:06] smoser: Thanks! Replied to the inline comment. [15:07] i've always been confused by sfdisk also [15:08] lets find the real ansewr. [15:08] but i suspect it is 512 [15:09] smoser: I've been poking around in that code; let me have a dig before you switch to this. [15:09] (As in, I've been poking in the sfdisk code) [15:10] reading http://karelzak.blogspot.com/2014/10/new-sfdisk.html [15:12] smoser: So my code doesn't backport to trusty nicely, because old 'sfdisk -l' output is different. [15:13] yeah. i'm aware of such pain . [15:13] from growpart [15:13] it does support both. but its a pita [15:14] http://bazaar.launchpad.net/~cloud-utils-dev/cloud-utils/trunk/view/head:/bin/growpart [15:14] Odd_Bloke, the thing is that if we update to only supporting new, then anyone who picks this up is busted on old sfdisk [15:15] in growpart, SFDISK_VERSION madness. [15:16] smoser: ;.; [15:19] smoser: So libfdisk definitely supports variable sector sizes; I don't know if we'd ever see them in practice. [15:20] but then its not clear to me if it woudl be used anyway. [15:20] logical sector size versus physical sector size [15:22] smoser: Right. [15:22] smoser: I have a meeting coming up, but I'll pick this up after that. [16:56] Odd_Bloke, so. [16:56] through some experimentation, i can verify that sfdisk uses 512 byte sectors === mfisch` is now known as mfisch [16:59] smoser: You're sure we won't hit funky hardware somewhere where it doesn't? === mfisch is now known as Guest27947 [16:59] i dont think so [16:59] http://paste.ubuntu.com/12863364/ === Guest27947 is now known as mfisch [17:00] Odd_Bloke, ^ that boots a guest with 4096 physical size and 512 logical (interestingly, it wont boot if you set logical to 4096). [17:01] verified that the kernel says my physical size is 4096 [17:01] and that size reported (in your 'sfdisk --list') is in 512 [17:12] Odd_Bloke, http://paste.ubuntu.com/12863544/ [17:16] smoser https://github.com/openstack/cloud-init [17:16] guess now cloud-init == openstack [17:16] lol [17:17] Odd_Bloke ^ claudiupopa [17:17] oh well. it is. as it is. [17:17] :-P [17:17] oh wow [17:17] did they merge the stackforge org into openstack? [17:17] I suppose [17:17] yup [17:17] stackforge gone... [17:18] and/or retired [17:18] fwiw, I report cloud-init hours worked as openstack dev hours [17:18] nice [17:18] well now u can do that without feeling bad, ha [17:19] lol, no bad feelings here :P [17:19] smoser: So looking at the util-linux code; sector size defaults to 512, but it does do an 'ioctl(fd, BLKSSZGET, sector_size)' call to actually query the device (https://git.kernel.org/cgit/utils/util-linux/util-linux.git/tree/lib/blkdev.c#n193). [17:20] smoser: But that does mean that a `blockdev --getss $DEVICE` is definitely going to return the same answer, which would save on parsing sfdisk output. [17:21] Let me check that makes sense on trusty. [17:50] ok. i'm wrong [17:50] http://paste.ubuntu.com/12864078/ [17:51] your'e right about blockdev --getss [17:51] but i think thats the same as woudl be returned by *logical* [17:52] http://paste.ubuntu.com/12864114/ [17:52] ^-- [17:53] so reading logical in sys shoudl give you what sfdisk does. [17:53] i managed to create a device with 4096 logical [17:54] so ... sfdisk uses logical sectors. not physical sectors. === shardy is now known as shardy_afk === Guest3686 is now known as mgagne