[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug during print

From: Jim Meyering
Subject: Re: bug during print
Date: Fri, 10 Dec 2010 22:17:02 +0100

[best to keep the list Cc'd, so others can follow along]
Grgur Tokic wrote:
> Hi Jim,
> Thanks a lot for your reply! It finally shed some light on otherwise totally
> confusing situation for me.
> I was doubting that the old version of parted might be an issue but I had
> troubles with linking the libraries with newer versions of parted so I gave
> up on that. I have now managed to install parted 2.2, will that be enough?

It's probably ok.
However, there were several bug fixes between 2.2 and 2.3,
so depending on what you do, ymmv.

> I will try to do the steps you suggested, just to clarify few things. So, if
> I run
> $ parted -s -- /dev/sdd mkpart slop 34s 255s
> $ parted -s -- /dev/sdd mkpart big 256s -34s u MiB p free
> $ env time mkfs.xfs /dev/sdd2
> that will create one big partition close to 3TB, regardless of the slight
> differences in disk sizes between your test disk and my disk? I guess the
> question boils down to my lack of understanding of command line script, and
> I couldn't find similar examples in the documentation.

Yes, the documentation is languishing.  Patches to improve
it would be most welcome.
I learned about the possibility of using "MiB" only recently.

> From what I
> understand "slop" and "big" and merely the names of these partitions, 34s,
> 255s... etc. are the sectors, and -34s means it goes to 34 sectors before
> the end of the disk?


> What about the rest: --, u, Mib, p, free? Print the
> partitions in MB?

The "u MiB p free" command is an idiom telling parted to display
the partition table (and "free" space) in units ("u") of Mebibytes ("MiB").

> Since I have some bad partitions on the disk, I guess I have to first delete
> the partition tables. I was previously doing

I was presuming you had no useful data on the disk.
If that is true, then you can tell parted to lay down
an empty GPT partition table like this:

    parted -s /dev/sdd mklabel

Then run the other parted commands listed above.

> $ dd if=/dev/zero bs=512 count=512 of=/dev/sdd
> And to delete the secondary gpt header (5858969760 = 16065*364704)
> $ dd if=/dev/zero bs=512 seek=5858969760 of=/dev/sdd
> but does that change now that you remarked that the buffer size is probably

I don't know your disk's logical sector size.
The commands I gave were calculated assuming it's 4096B, like mine:
To find out, look at the output from your "print" (aka "p") command.

>     Sector size (logical/physical): 4096B/4096B

The logical sector size is that first number.

> 4096B? Did I damage the disk somehow by using the above command previously?
> Is that the reason for reporting bad blocks?

You say "bad partitions" above, and here you say "bad blocks".
If you have seen diagnostics, please include them verbatim,
so we'll know what you're talking about.

> Is there any drawback of using xfs compared to ext3? The reason I was using

Sure.  There are always pros and cons and "it depends" qualifications.
For some workloads, XFS will be a little slower.

> ext3 is just my lack of knowledge, I didn't even know xfs existed.
> I am sorry for troubling you with so many questions, it's just that my
> frustration with this is boiling for months and you have now given me some
> light at the end of the tunnel. I really appreciate your help!
> Best regards,
> Grgur

reply via email to

[Prev in Thread] Current Thread [Next in Thread]