[parted-devel] Parted and usage with larger sector sizes

John Quigley jquigley+parted at jquigley.com
Mon Jun 2 20:26:12 UTC 2008


Hey Folks:

I hope this is going to the proper list, excuse me if not.  I'm working on an open source project that provides durable storage on a distributed network.  Our primary interface into this facility is via an iSCSI target, that works as expected on various operating systems.

Due to the distributed nature of the system, it's much more efficient if our iSCSI/SCSI implementation is configured to use sector sizes greater than 512 (our current default is 4096).  We've been successfully testing in this configuration for months using fdisk.  We've recently embarked on testing larger capacities (greater than 2TB), which necessitates our usage of parted, as fdisk, cfdisk, et. al. do not support such sizes.

According to your FAQ [1], parted supports sector sizes other than 512:

Does GNU Parted support physical sector sizes not equal to 512?
Starting from 1.7, GNU Parted will automatically align partitions to the physical sector size reported by an ATAPI-compliant drive.

We appear to be having troubles, however.  Running traces at the SCSI command level seems to indicate that it isn't our software acting up.  I include an example parted session below, using first a hand compiled version of the recent stable 1.8.8, and then a CentOS-provided packaged version of 1.8.1 [2].

I would appreciate it tremendously if parted developers could lend me some insight as to what I should be expecting?  Has parted undergone thorough testing with devices of non-standard sector size?  Is there another utility that you know of that can support both very large devices and non-standard sector size?  Any thoughts or recommendations would be very much appreciated.  Thanks so much for your consideration =)

- John Quigley
Cleversafe, Inc.

[1] http://www.gnu.org/software/parted/faq.shtml

[2] Example session:

<session>
$ cat /etc/redhat-release
CentOS release 5 (Final)
$ ./parted /dev/sdf
Warning: Device /dev/sdf has a logical sector size of 4096.  Not all parts of GNU Parted support this at the moment,
and the working code is HIGHLY EXPERIMENTAL.

GNU Parted 1.8.8
Using /dev/sdf
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel

You found a bug in GNU Parted! Here's what you have to do:

(snipped text here)

Command History:
mklabel

Error: SEGV_MAPERR (Address not mapped to object)
Aborted
# /sbin/parted /dev/sdf
Warning: Device /dev/sdf has a logical sector size of 4096.  Not all parts of GNU Parted support this at the moment,
and the working code is HIGHLY EXPERIMENTAL.

GNU Parted 1.8.1
Using /dev/sdf
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel
New disk label type?
Error: Expecting a disk label type.
(parted) q
Information: Don't forget to update /etc/fstab, if necessary.

[root at qwchi-lab-pd05 parted]# /sbin/parted /dev/sdf
Warning: Device /dev/sdf has a logical sector size of 4096.  Not all parts of GNU Parted support this at the moment,
and the working code is HIGHLY EXPERIMENTAL.

GNU Parted 1.8.1
Using /dev/sdf
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
Error: Invalid argument during write on /dev/sdf
Retry/Ignore/Cancel? r
Error: Invalid argument during write on /dev/sdf
Retry/Ignore/Cancel? i
Error: Invalid argument during write on /dev/sdf
Retry/Ignore/Cancel? r
Error: Invalid argument during write on /dev/sdf
Retry/Ignore/Cancel? i
Error: Invalid argument during write on /dev/sdf
Retry/Ignore/Cancel? c
(parted)
</session>

I would provide you with the following:

 parted DEVICE unit co print unit s print

However, the software bombs in this case as well.




More information about the parted-devel mailing list