Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #187305 > unrolled thread
| Started by | Gene Heskett <gheskett@shentel.net> |
|---|---|
| First post | 2017-09-27 14:50 +0200 |
| Last post | 2017-09-27 19:40 +0200 |
| Articles | 11 — 6 participants |
Back to article view | Back to linux.debian.user
disk partitioners vs disk with 2048 byte phusical sectors Gene Heskett <gheskett@shentel.net> - 2017-09-27 14:50 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-09-27 15:10 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors "Thomas Schmitt" <scdbackup@gmx.net> - 2017-09-27 15:40 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors Gene Heskett <gheskett@shentel.net> - 2017-09-27 17:40 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors "Thomas Schmitt" <scdbackup@gmx.net> - 2017-09-27 18:10 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors Gene Heskett <gheskett@shentel.net> - 2017-09-27 19:30 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors "Thomas Schmitt" <scdbackup@gmx.net> - 2017-09-27 21:20 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors David Wright <deblis@lionunicorn.co.uk> - 2017-09-27 18:40 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors Michael Stone <mstone@debian.org> - 2017-09-27 19:30 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors Gene Heskett <gheskett@shentel.net> - 2017-09-27 19:40 +0200
Re: disk partitioners vs disk with 2048 byte phusical sectors Cousin Stanley <cousinstanley@gmail.com> - 2017-09-27 19:40 +0200
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2017-09-27 14:50 +0200 |
| Subject | disk partitioners vs disk with 2048 byte phusical sectors |
| Message-ID | <uujWO-2Bu-3@gated-at.bofh.it> |
Greetings all; I just bought a 1TB disk, in a usb3 interface format, had a full disk ntfs partition on it. The machine its to be used on is an arm64 rockchip called a rock64. It looks like a pi killer and I intend to replace the 1GB of memory pi-3b with this 4GB of memory card. This disk has a 2048 byte sector. From dmesg: [ 2401.645069] sd 0:0:0:0: [sda] Spinning up disk... [ 2402.650332] ...ready [ 2404.664052] sd 0:0:0:0: [sda] 1953525167 512-byte logical blocks: (1.00 TB/932 GiB) [ 2404.676277] sd 0:0:0:0: [sda] 2048-byte physical blocks But I've now spent several hours trying to put the 1st of 3 partitions on it with figures that satisfy parted's align-check, including calculation of values that result in mod(2048)=0. Nothing seems to satisfy parted. So I've come to the conclusion parted is broken for this size of physical sector. Do we have a disk partitioner that does understand a physical sector size of any power of 2? gparted is out as this machine does not yet have an x server installed, so I need a commandline tool. Suggestions will be investigated, thank you. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2017-09-27 15:10 +0200 |
| Message-ID | <uukga-35a-31@gated-at.bofh.it> |
| In reply to | #187305 |
Le 27/09/2017 à 14:42, Gene Heskett a écrit : > > [ 2404.664052] sd 0:0:0:0: [sda] 1953525167 512-byte logical blocks: > (1.00 TB/932 GiB) > [ 2404.676277] sd 0:0:0:0: [sda] 2048-byte physical blocks > > But I've now spent several hours trying to put the 1st of 3 partitions on > it with figures that satisfy parted's align-check, including calculation > of values that result in mod(2048)=0. Nothing seems to satisfy parted. Can you elaborate ? You description is vague, and we cannot see what's on your screen. Don't bother with alignment. Modern partitioners' default alignement is suitable for all drives.
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2017-09-27 15:40 +0200 |
| Message-ID | <uukJb-3qZ-1@gated-at.bofh.it> |
| In reply to | #187306 |
Hi,
Gene Heskett wrote:
> > [ 2404.664052] sd 0:0:0:0: [sda] 1953525167 512-byte logical blocks: (1.00 TB/932 GiB)
> > [ 2404.676277] sd 0:0:0:0: [sda] 2048-byte physical blocks
Pascal Hambourg wrote:
> Don't bother with alignment.
As far as oldfashioned "cylinder" aligment is concerned: certainly.
But even if only for superstition i'd align everything to the physical
block size, i.e. a multiple of 4 blocks of 512 bytes.
An oldfashioned partition start at logical block 63 would give me the
idea to cause extra i/o. But nowadays one often sees partition 1
start block address 2048. Giving the first MiB to the gods of booting
and being reasonably aligned to 4. Such a broad precaution must work.
Gene Heskett wrote:
> > Nothing seems to satisfy parted.
What is it nagging, exactly ?
For MBR partitions ("msdos", "primary" and "logical") i'd use fdisk.
For GPT there is gdisk, but i never challenged it much.
Have a nice day :)
Thomas
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2017-09-27 17:40 +0200 |
| Message-ID | <uumBj-4YL-5@gated-at.bofh.it> |
| In reply to | #187306 |
On Wednesday 27 September 2017 09:09:26 Pascal Hambourg wrote:
> Le 27/09/2017 à 14:42, Gene Heskett a écrit :
> > [ 2404.664052] sd 0:0:0:0: [sda] 1953525167 512-byte logical blocks:
> > (1.00 TB/932 GiB)
> > [ 2404.676277] sd 0:0:0:0: [sda] 2048-byte physical blocks
> >
> > But I've now spent several hours trying to put the 1st of 3
> > partitions on it with figures that satisfy parted's align-check,
> > including calculation of values that result in mod(2048)=0. Nothing
> > seems to satisfy parted.
>
> Can you elaborate ? You description is vague, and we cannot see what's
> on your screen.
>
> Don't bother with alignment. Modern partitioners' default alignement
> is suitable for all drives.
Oh? The last time I used fdisk I wound up with writes under 15
megs/second, and read of about 21 megs/second. Fixed it so it was
aligned, and its now around 120 megs/second both ways.
You said you can't see, so here's an attempt to use byte values that are
all mod(2048)=0
root@rock64:~# parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Seagate BUP Slim BK (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
(parted) mkpart primary fat32
Start? 163,840B
End? 167,772,160B
Error: The maximum head value is 254.
WTH? I didn't tell it heads, I gave it bytes and each value was a power
of 2 multiple of 2048, which should have made a fat32 partition of
around 167 megabytes.
So what sort of figures does it need to be happy?
The help screen does not define UNITS, but the manpage does, sorta.
unit unit
Set unit as the unit to use when displaying
locations and sizes, and for interpreting those given by the user when
not suffixed with an
explicit unit. unit can be one of "s"
(sectors), "B" (bytes), "kB", "MB", "MiB", "GB", "GiB", "TB", "TiB", "%"
(percentage of device
size), "cyl" (cylinders), "chs" (cylinders, heads,
sectors), or "compact" (megabytes for input, and a human-friendly form
for output).
confusing, ain't it? call it up, attempt to set units gets help screen.
enter units at prompt, accepts MiB.
So next attempt:
(parted) mkpart primary fat32 8MiB 210MiB
Warning: The resulting partition is not properly aligned for best
performance.
Ignore/Cancel? c
(parted) mkpart primary fat32 8MiB 192MiB
Warning: The resulting partition is not properly aligned for best
performance.
Ignore/Cancel? c
(parted) mkpart primary fat32 4MiB 192MiB
Warning: The resulting partition is not properly aligned for best
performance.
Ignore/Cancel? c
(parted) mkpart primary fat32 4MB 192MB
Warning: The resulting partition is not properly aligned for best
performance.
Ignore/Cancel? c
(parted) mkpart primary fat32 2MiB 192MiB
Warning: The resulting partition is not properly aligned for best
performance.
Its an endless loop. How can I make a broken for a 2048 byte sector
partitioner actually work?
Looking at fdisks initial screen, it claims the physical sector is 4096?
Command (m for help): p
Disk /dev/sda: 931.5 GiB, 1000204885504 bytes, 1953525167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x892f63c8
Now I am truly confused. But I see fdisk has grown some more knobs too,
so I'll play a bit.
Applicable hints appreciated, Pascal, thanks.
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2017-09-27 18:10 +0200 |
| Message-ID | <uun4l-5nu-19@gated-at.bofh.it> |
| In reply to | #187317 |
Hi, Gene Heskett's parted wrote: > Sector size (logical/physical): 512B/4096B Wasn't that 2048 bytes per physical sector, last time ? > Start? 163,840B > End? 167,772,160B > Error: The maximum head value is 254. > WTH? I didn't tell it heads, I think it takes the commas for a CHS addrss and the "772" for heads. See in https://www.gnu.org/software/parted/manual/html_node/unit.html the example (parted) unit chs print Disk geometry for /dev/hda: 0,0,0 - 14946,225,62 > So what sort of figures does it need to be happy? Without commas ? > (parted) mkpart primary fat32 8MiB 210MiB > Warning: The resulting partition is not properly aligned for best > performance. Show due human backbone and override the warning. It probably thinks of cylinders or maybe of the 32 MiB which fdisk reports as "optimal". > Looking at fdisks initial screen, it claims the physical sector is 4096? That's what parted says above. > I/O size (minimum/optimal): 4096 bytes / 33553920 bytes 32 MiB ? I wonder what kind of i/o that would be. 1 MiB as partition start is modern tradition and said to be ok for about everything. Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2017-09-27 19:30 +0200 |
| Message-ID | <uuojM-63X-27@gated-at.bofh.it> |
| In reply to | #187320 |
On Wednesday 27 September 2017 12:03:12 Thomas Schmitt wrote: > Hi, > > Gene Heskett's parted wrote: > > Sector size (logical/physical): 512B/4096B > > Wasn't that 2048 bytes per physical sector, last time ? yes, thats the figures quote elsewhere here, which came from the discovery stanza in dmesg when I plugged it into a usb3 port on the rock64. Thats a direct copy/paste from the rock64's screen. One of the reasons I'm getting old & grey, can't be the almost 83 years. ;-) > > > Start? 163,840B > > End? 167,772,160B > > Error: The maximum head value is 254. > > WTH? I didn't tell it heads, > > I think it takes the commas for a CHS addrss and the "772" for heads. I don't recall that from the manpage, must need to up the marigold dose which helps preserve a diabetics eyesight. > See in > https://www.gnu.org/software/parted/manual/html_node/unit.html > the example > (parted) unit chs print > Disk geometry for /dev/hda: 0,0,0 - 14946,225,62 > > > So what sort of figures does it need to be happy? > > Without commas ? > > > (parted) mkpart primary fat32 8MiB 210MiB > > Warning: The resulting partition is not properly aligned for best > > performance. > > Show due human backbone and override the warning. > It probably thinks of cylinders or maybe of the 32 MiB which fdisk > reports as "optimal". > > > Looking at fdisks initial screen, it claims the physical sector is > > 4096? > > That's what parted says above. > > > I/O size (minimum/optimal): 4096 bytes / 33553920 bytes > > 32 MiB ? I wonder what kind of i/o that would be. > > 1 MiB as partition start is modern tradition and said to be ok > for about everything. > > > Have a nice day :) > > Thomas Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2017-09-27 21:20 +0200 |
| Message-ID | <uuq2d-78T-3@gated-at.bofh.it> |
| In reply to | #187328 |
Hi, Gene Heskett's parted wrote: > > > Start? 163,840B > > > End? 167,772,160B > > > Error: The maximum head value is 254. i wrote: > > I think it takes the commas for a CHS addrss and the "772" for heads. > > https://www.gnu.org/software/parted/manual/html_node/unit.html > I don't recall that from the manpage, must need to up the marigold dose > which helps preserve a diabetics eyesight. I do not find this explicitely in the description of parted command "unit". But the printed numbers in the examples have no commas except the ones from the "unit chs print" run. Others look like "120780". Further it says "CHS and cylinder units are not supported as a suffix." So there must be another way to specify them as input numbers. This all surrounds a hole in the shape of two commas. Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2017-09-27 18:40 +0200 |
| Message-ID | <uunxo-5yo-1@gated-at.bofh.it> |
| In reply to | #187317 |
On Wed 27 Sep 2017 at 11:32:31 (-0400), Gene Heskett wrote: > On Wednesday 27 September 2017 09:09:26 Pascal Hambourg wrote: > > > Le 27/09/2017 à 14:42, Gene Heskett a écrit : > > > [ 2404.664052] sd 0:0:0:0: [sda] 1953525167 512-byte logical blocks: > > > (1.00 TB/932 GiB) > > > [ 2404.676277] sd 0:0:0:0: [sda] 2048-byte physical blocks > > > > > > But I've now spent several hours trying to put the 1st of 3 > > > partitions on it with figures that satisfy parted's align-check, > > > including calculation of values that result in mod(2048)=0. Nothing > > > seems to satisfy parted. > > > > Can you elaborate ? You description is vague, and we cannot see what's > > on your screen. > > > > Don't bother with alignment. Modern partitioners' default alignement > > is suitable for all drives. > > Oh? The last time I used fdisk I wound up with writes under 15 > megs/second, and read of about 21 megs/second. Fixed it so it was > aligned, and its now around 120 megs/second both ways. > > You said you can't see, so here's an attempt to use byte values that are > all mod(2048)=0 > > root@rock64:~# parted /dev/sda > GNU Parted 3.2 > Using /dev/sda > Welcome to GNU Parted! Type 'help' to view a list of commands. > (parted) print > Model: Seagate BUP Slim BK (scsi) > Disk /dev/sda: 1000GB > Sector size (logical/physical): 512B/4096B > Partition Table: msdos > Disk Flags: > > Number Start End Size Type File system Flags > > (parted) mkpart primary fat32 > Start? 163,840B > End? 167,772,160B > Error: The maximum head value is 254. > > WTH? I didn't tell it heads, I gave it bytes and each value was a power > of 2 multiple of 2048, which should have made a fat32 partition of > around 167 megabytes. > > > So what sort of figures does it need to be happy? Um, numbers without commas in them (which is locale-sensitive anyway). I've seen (and myself put) commas in output, but never in input. And at the _very_ least use sectors, not bytes. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Michael Stone <mstone@debian.org> |
|---|---|
| Date | 2017-09-27 19:30 +0200 |
| Message-ID | <uuojM-63X-9@gated-at.bofh.it> |
| In reply to | #187317 |
On Wed, Sep 27, 2017 at 11:32:31AM -0400, Gene Heskett wrote: >Oh? The last time I used fdisk I wound up with writes under 15 >megs/second, and read of about 21 megs/second. Fixed it so it was >aligned, and its now around 120 megs/second both ways. And that was presumably a very long time ago. Current tools just start the first partition at a large power of two offset and alignment issues consequently aren't a problem unless you work at it. (This was mainly only an issue with old DOS-style partition tables that started the first partition at 32256 bytes. The 1M first partition offset has been the default in debian I think since wheezy.) Mike Stone
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2017-09-27 19:40 +0200 |
| Message-ID | <uuots-68f-21@gated-at.bofh.it> |
| In reply to | #187327 |
On Wednesday 27 September 2017 13:25:06 Michael Stone wrote: > On Wed, Sep 27, 2017 at 11:32:31AM -0400, Gene Heskett wrote: > >Oh? The last time I used fdisk I wound up with writes under 15 > >megs/second, and read of about 21 megs/second. Fixed it so it was > >aligned, and its now around 120 megs/second both ways. > > And that was presumably a very long time ago. Current tools just start > the first partition at a large power of two offset and alignment > issues consequently aren't a problem unless you work at it. (This was > mainly only an issue with old DOS-style partition tables that started > the first partition at 32256 bytes. The 1M first partition offset has > been the default in debian I think since wheezy.) > > Mike Stone Whatever I did do, seems to have worked, sfdisk to the rescue one could say. Its posted here in a previous post. Now I have to bring at least the swap online. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | Cousin Stanley <cousinstanley@gmail.com> |
|---|---|
| Date | 2017-09-27 19:40 +0200 |
| Message-ID | <uuotr-68f-1@gated-at.bofh.it> |
| In reply to | #187305 |
Gene Heskett wrote:
> ....
> Do we have a disk partitioner that does understand a physical sector size
> of any power of 2 ?
>
> gparted is out as this machine does not yet have an x server installed,
> so I need a commandline tool.
> ....
Gene ....
You might try the cfdisk partition tool ....
# sudo cfdisk /dev/sda
It is available on my rock64/4gb deb stretch minimal install,
and although I've used it successfully on other debian machines
I don't know about the sector size problem you posted about ....
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web