On Sun, Nov 13, 2022 at 09:24:53AM +0100, Otto Moerbeek wrote: > On Sat, Nov 12, 2022 at 09:59:00PM +0100, Patrick Wildt wrote: > > > Am Sat, Nov 05, 2022 at 04:03:50PM +0100 schrieb Joel Carnat: > > > Hi, > > > > > > I have installed OpenBSD 7.2 on a 14TB SATA disk using my ODROID HC4. > > > > > > During installation, I was not able to use the whole disk size > > > although I selected "whole" and "auto partionning". The installer seemed > > > to recognized only about 2TB. > > > > > > dmesg says: > > > sd0 at scsibus0 targ 0 lun 0: <ATA, WDC WD140EFGX-68, 85.0> > > > naa.5000cca28fd7d301 > > > sd0: 13351936MB, 512 bytes/sector, 27344764928 sectors > > > > > > but after rebooting on the installed system, the disk layout was the > > > following: > > > > > > # fdisk sd0 > > > Disk: sd0 geometry: 32960/511/255 [4294852800 Sectors] > > > Offset: 0 Signature: 0xAA55 > > > Starting Ending LBA Info: > > > #: id C H S - C H S [ start: size ] > > > ------------------------------------------------------------------------------- > > > *0: 0C 0 128 129 - 0 257 1 [ 32768: 32768 ] > > > Win95 FAT32L > > > 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > > > 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > > > 3: A6 0 257 2 - 32959 510 255 [ 65536: 4294787264 ] > > > OpenBSD > > > > > > Using disklabel, I could "correct" the disk usage and reformat the last > > > partition to get full disk space. > > > sd0> l > > > # /dev/rsd0c: > > > type: SCSI > > > disk: SCSI disk > > > label: WDC WD140EFGX-68 > > > duid: b9ce90e6ba9fedcd > > > flags: > > > bytes/sector: 512 > > > sectors/track: 255 > > > tracks/cylinder: 511 > > > sectors/cylinder: 130305 > > > cylinders: 209852 > > > total sectors: 27344764928 > > > boundstart: 65536 > > > boundend: 4294852800 > > > > > > sd0> b > > > Starting sector: [65536] > > > Size ('*' for entire disk): [4294787264] * > > > > > > sd0*> l > > > # /dev/rsd0c: > > > type: SCSI > > > disk: SCSI disk > > > label: WDC WD140EFGX-68 > > > duid: b9ce90e6ba9fedcd > > > flags: > > > bytes/sector: 512 > > > sectors/track: 255 > > > tracks/cylinder: 511 > > > sectors/cylinder: 130305 > > > cylinders: 209852 > > > total sectors: 27344764928 > > > boundstart: 65536 > > > boundend: 27344764928 > > > > > > sd0> p g > > > OpenBSD area: 65536-27344764928; size: 13039.0G; free: 10991.1G > > > # size offset fstype [fsize bsize cpg] > > > a: 1.0G 65536 4.2BSD 2048 16384 12960 # / > > > b: 4.0G 2162688 swap # none > > > c: 13039.0G 0 unused > > > d: 4.0G 10540448 4.2BSD 2048 16384 12960 # /tmp > > > e: 11.5G 18929024 4.2BSD 2048 16384 12960 # /var > > > f: 30.0G 43024544 4.2BSD 2048 16384 12960 # /usr > > > g: 1.0G 105939104 4.2BSD 2048 16384 12960 # > > > /usr/X11R6 > > > h: 20.0G 108036256 4.2BSD 2048 16384 12960 # > > > /usr/local > > > i: 0.0G 32768 MSDOS > > > j: 300.0G 149979328 4.2BSD 4096 32768 26062 # /home > > > k: 4.0G 779223872 4.2BSD 2048 16384 12960 # > > > /var/www > > > l: 1672.3G 787693696 4.2BSD 8192 65536 52270 # /data > > > sd0> c l > > > Partition l is currently 3507159040 sectors in size, and can have a > > > maximum > > > size of 26557071232 sectors. > > > size: [3507159040] * > > > sd0*> p g > > > OpenBSD area: 65536-27344764928; size: 13039.0G; free: 0.0G > > > # size offset fstype [fsize bsize cpg] > > > a: 1.0G 65536 4.2BSD 2048 16384 12960 # / > > > b: 4.0G 2162688 swap # none > > > c: 13039.0G 0 unused > > > d: 4.0G 10540448 4.2BSD 2048 16384 12960 # /tmp > > > e: 11.5G 18929024 4.2BSD 2048 16384 12960 # /var > > > f: 30.0G 43024544 4.2BSD 2048 16384 12960 # /usr > > > g: 1.0G 105939104 4.2BSD 2048 16384 12960 # > > > /usr/X11R6 > > > h: 20.0G 108036256 4.2BSD 2048 16384 12960 # > > > /usr/local > > > i: 0.0G 32768 MSDOS > > > j: 300.0G 149979328 4.2BSD 4096 32768 26062 # /home > > > k: 4.0G 779223872 4.2BSD 2048 16384 12960 # > > > /var/www > > > l: 12663.4G 787693696 4.2BSD 8192 65536 52270 # /data > > > sd0*> > > > > > > The questions are : > > > - is this an expected behaviour from the installer? > > > - shall the disklabel correction rather be done during installation? > > > - is this a issue when fdisk and disklabel disagree about the number of > > > sectors? > > > > > > Thank you, > > > Joel C. > > > > > > > I'm not certain, but I believe the installer is using MBR partition > > table, and my guess is that an MBR partition table can't cover that > > space? It's just a guess though. > > > > MBRs cannot cover more thann 2TB indeed, and you can use the b command > in disklabel to extend the OpenSBD part of the disk, as demonstrated. > > For autolayout that does not matter much, as the max sizes of the > partitions fit well in 2TB.
And if needed, you can do it during install by choosing to edit the default layout, and use the b command and then the R command to resize any partition you want. Especially the R command is nice, as it will move the remaining partitions to avoid gaps if you shrink one in the middle or shrink the last one if you extend one and there is no room left. -Otto