[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
Re: [BUG] I broke a disk using parted, so now parted crashes when using the disk
Wed, 31 Oct 2012 11:07:16 +0100
Peter Maloney wrote:
> Forgot to include version.
> peter:/mnt # parted -v
> parted (GNU parted) 2.4
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
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Written by
> 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
> 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
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,
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.