[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] I broke a disk using parted, so now parted crashes when using
From: |
Jim Meyering |
Subject: |
Re: [BUG] I broke a disk using parted, so now parted crashes when using the disk |
Date: |
Wed, 31 Oct 2012 11:07:16 +0100 |
Peter Maloney wrote:
> Forgot to include version.
>
> peter:/mnt # parted -v
> parted (GNU parted) 2.4
Thanks.
As suspected, the bug you reported has been fixed since that release.
With 3.1, you should be fine.
> Copyright (C) 2011 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> Written by
> <http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.
>
>
> And just to prove my disk works fine:
>
> peter:/mnt # dd if=/dev/zero of=/dev/sdb bs=1M count=200
> 200+0 records in
> 200+0 records out
> 209715200 bytes (210 MB) copied, 1.43544 s, 146 MB/s
> peter:/mnt # parted /dev/sdb mktable gpt
> Information: You may need to update /etc/fstab.
>
> peter:/mnt # parted /dev/sdb unit s mkpart empty3TB 2048
> $((2048+500*1000*1000*1000/512))
...
> Is there a parted syntax for what I did there in the $((...))? It is
> very annoying to have to calculate it every time.
> In FreeBSD, you can simply write in your alignment and size, and it does
> the rest for you: gpart create -a 2048 -s 500g -t $fstype $device
Yes.
In parted-3.1, you can specify partition start/end sectors more sensibly:
(from the NEWS file):
* Noteworthy changes in release 3.1 (2012-03-02) [stable]
...
** Changes in behavior
parted: the mkpart command has changed semantics with regard to specifying
the end of the partition. If the end is specified using units of MiB,
GiB,
etc., parted subtracts one sector from the specified value. With this
change, it is now possible to create partitions like 1MiB-2MiB, 2MiB-3MiB
and so on.