Re: [arch-general] 4k sector drives

2010-04-30 Thread Marti Raudsepp
On Fri, Apr 30, 2010 at 2:37 AM, bardo ilba...@gmail.com wrote:
 Parted automatically warned me about an unoptimal sector alignment
 when I tried to put the first partition at 0 (the first partition
 should start at 2MB), but if you want to be extra-sure just check the
 the '-a optimal' parameter.

Great to hear that this has changed. :)

 About the disk reliability I can't tell
 much, but I already transferred some 100GB to it, and of course I had
 the first RAID5 build, which took a few hours and ran through the
 whole disk. Also, smartctl doesn't have anything bad to say.

I run weekly SMART long tests on all my disks because, in my
experience, that has been the best indication of impending disk
failure. It performs a full surface scan, so on a 2TB disk this can
take 6 hours (maybe more on green disks).

Something like this in smartd.conf:

/dev/sda -a -H -l error -l selftest -f -m ma...@juffo.org -s L/../../3/11

checks for attribute changes and performs a long test every thursday
(3) at 11 o'clock and emails me about problems.

Regards,
Marti


Re: [arch-general] 4k sector drives

2010-04-30 Thread bardo
2010/4/30 Robert Howard rjh0...@ecu.edu:
 How did you get two drives into RAID5 and if so, why?

Just run 'mdadm --create /dev/md0 --level=5 --raid-devices=2 /dev/sda1
/dev/sdb1', it's as simple as that. Why? Because I still have four
free bays on that machine, and someday I'll surely want to expand the
disks with RAID5, so better prepare it early than having to do it
again later.

RAID5 with two disks behaves just like RAID1, if you think about it.
Maybe you have a little performance loss since the solution is
unoptimal, but, this being a NAS, I don't really care.

Corrado


Re: [arch-general] 4k sector drives

2010-04-30 Thread Thomas Bächler
Am 30.04.2010 01:37, schrieb bardo:
 Parted automatically warned me about an unoptimal sector alignment
 when I tried to put the first partition at 0 (the first partition
 should start at 2MB), but if you want to be extra-sure just check the
 the '-a optimal' parameter. About the disk reliability I can't tell
 much, but I already transferred some 100GB to it, and of course I had
 the first RAID5 build, which took a few hours and ran through the
 whole disk. Also, smartctl doesn't have anything bad to say.

I'm still curious about the status of 4k support in the latest
util-linux-ng's (c)fdisk. Did anyone try that?



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] 4k sector drives

2010-04-30 Thread Mauro Santos
On 04/30/2010 10:13 AM, Thomas Bächler wrote:
 Am 30.04.2010 01:37, schrieb bardo:
 Parted automatically warned me about an unoptimal sector alignment
 when I tried to put the first partition at 0 (the first partition
 should start at 2MB), but if you want to be extra-sure just check the
 the '-a optimal' parameter. About the disk reliability I can't tell
 much, but I already transferred some 100GB to it, and of course I had
 the first RAID5 build, which took a few hours and ran through the
 whole disk. Also, smartctl doesn't have anything bad to say.
 
 I'm still curious about the status of 4k support in the latest
 util-linux-ng's (c)fdisk. Did anyone try that?
 

From my tests not too long ago cfdisk does not play well with the
current 4K sector disks, at least when they report a 512B sector size as
is the case with the WD EADS disks. It also seems (to me) that cfdisk
will not play well with partition schemes that are not created in
compatibility mode so unless it gets updated it will soon be a
nonstarter for disk partitioning.

fdisk will align all partitions if you start it with 'fdisk -uc' and
accept the suggested partition start and use +***M to specify the size
of partitions, I didn't try specifying the end in sectors and check what
it would do to the next partition though. I have tried this with an
external WD Elements disk and fdisk. If using the whole disk with one
partition, fdisk will set exactly the same start and end sectors that WD
uses in the partition they define and format in the factory.

I did not try parted but I've read that it will also align the
partitions properly, but it may require some extra switch to disable the
alignment to cylinders.

-- 
Mauro Santos


Re: [arch-general] 4k sector drives

2010-04-29 Thread bardo
2010/4/29 Caleb Cushing xenoterrac...@gmail.com:
 On Mon, Apr 26, 2010 at 9:22 PM, Marti Raudsepp ma...@juffo.org wrote:
 However, this WD disk crashed after barely 3 days of operation and I
 replaced it with a normal 512-byte sector Seagate.

 eek! hope the ones I ordered today don't do that.

Just two days ago I built an Arch NAS/HTPC with two 2TB WD Caviar
Green WD20EARS (the ones with 4k-sectors). I used the latest iso from
build.archlinux.org, the one that Thomas suggested, and everything
went happily fine. I used parted's interactive mode to partition,
followed by mdadm and mkfs.

Parted automatically warned me about an unoptimal sector alignment
when I tried to put the first partition at 0 (the first partition
should start at 2MB), but if you want to be extra-sure just check the
the '-a optimal' parameter. About the disk reliability I can't tell
much, but I already transferred some 100GB to it, and of course I had
the first RAID5 build, which took a few hours and ran through the
whole disk. Also, smartctl doesn't have anything bad to say.

HTH,
Corrado


Re: [arch-general] 4k sector drives

2010-04-29 Thread Robert Howard
How did you get two drives into RAID5 and if so, why?

On Apr 29, 2010 7:38 PM, bardo ilba...@gmail.com wrote:

2010/4/29 Caleb Cushing xenoterrac...@gmail.com:

 On Mon, Apr 26, 2010 at 9:22 PM, Marti Raudsepp ma...@juffo.org wrote:
 However, this WD disk ...
Just two days ago I built an Arch NAS/HTPC with two 2TB WD Caviar
Green WD20EARS (the ones with 4k-sectors). I used the latest iso from
build.archlinux.org, the one that Thomas suggested, and everything
went happily fine. I used parted's interactive mode to partition,
followed by mdadm and mkfs.

Parted automatically warned me about an unoptimal sector alignment
when I tried to put the first partition at 0 (the first partition
should start at 2MB), but if you want to be extra-sure just check the
the '-a optimal' parameter. About the disk reliability I can't tell
much, but I already transferred some 100GB to it, and of course I had
the first RAID5 build, which took a few hours and ran through the
whole disk. Also, smartctl doesn't have anything bad to say.

HTH,
Corrado


Re: [arch-general] 4k sector drives

2010-04-26 Thread Marti Raudsepp
On Wed, Apr 21, 2010 at 3:52 AM, Caleb Cushing xenoterrac...@gmail.com wrote:
 has anyone installed arch on one of these drives? thinking about
 buying a pair and running them mirrored... but not sure if everything
 will be working optimal. note: since I'll have to migrate off an
 existing drive I can use the tools installed on that to partition it
 first. Is there anything I should know first?

I had one of these disks a few months ago and found that the only way
I could get my partitions truly aligned was using parted and
calculating the sector numbers/offsets MANUALLY (WTF!)

Every other Linux partitioning tool aligns partitions to the 63-sector
boundary and there's no way to avoid that.

However, this WD disk crashed after barely 3 days of operation and I
replaced it with a normal 512-byte sector Seagate.

See also: http://lwn.net/Articles/322777/

Regards,
Marti


Re: [arch-general] 4k sector drives

2010-04-24 Thread Caleb Cushing
On Thu, Apr 22, 2010 at 7:12 PM, Thomas Bächler tho...@archlinux.org wrote:
 You should google more to see if 4k sectors are really well-supported now.

I've actually done quite a bit of research. But most if it came back
upstream. So I thought I'd better ask in an arch specific context.
According to one of the latest upcoming kernel developments there will
be more 4k improvements in 2.6.34 what I was unable to determine is if
that was something that would require me to do something after the
kernel is released. In fact some of this stuff I was confused as to
whether... do I have to run fdisk in a certain way? is cfdisk
supported? how can I check to make sure it is working? and the obvious
even if the kernel and tools are now ready will an arch disk be ready
(obviously I already asked and has been answered)...


-- 
Caleb Cushing

http://xenoterracide.blogspot.com


Re: [arch-general] 4k sector drives

2010-04-22 Thread Caleb Cushing
On Wed, Apr 21, 2010 at 3:40 AM, Thomas Bächler tho...@archlinux.org wrote:
 I think the very very latest util-linux-ng will have fdisk/cfdisk


is that shipping on any of the install disks?

-- 
Caleb Cushing

http://xenoterracide.blogspot.com


Re: [arch-general] 4k sector drives

2010-04-22 Thread Thomas Bächler
Am 22.04.2010 21:43, schrieb Caleb Cushing:
 On Wed, Apr 21, 2010 at 3:40 AM, Thomas Bächler tho...@archlinux.org wrote:
 I think the very very latest util-linux-ng will have fdisk/cfdisk

 
 is that shipping on any of the install disks?
 

http://build.archlinux.org/isos/

The 2010.04.19 images should have the latest util-linux-ng 2.17.2. On a
quick google, I just found this info:
http://old.nabble.com/-ANNOUNCE--util-linux-ng-v2.17.1-td27685302.html

You should google more to see if 4k sectors are really well-supported now.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] 4k sector drives

2010-04-21 Thread Jan de Groot
On Tue, 2010-04-20 at 20:52 -0400, Caleb Cushing wrote:
 has anyone installed arch on one of these drives? thinking about
 buying a pair and running them mirrored... but not sure if everything
 will be working optimal. note: since I'll have to migrate off an
 existing drive I can use the tools installed on that to partition it
 first. Is there anything I should know first?

You will have to align partitions on a 4K boundary, performance will be
miserable without that. I think parted is the best tool to do
partitioning in this case, as parted supports aligning.



Re: [arch-general] 4k sector drives

2010-04-21 Thread Thomas Bächler
Am 21.04.2010 09:34, schrieb Jan de Groot:
 On Tue, 2010-04-20 at 20:52 -0400, Caleb Cushing wrote:
 has anyone installed arch on one of these drives? thinking about
 buying a pair and running them mirrored... but not sure if everything
 will be working optimal. note: since I'll have to migrate off an
 existing drive I can use the tools installed on that to partition it
 first. Is there anything I should know first?
 
 You will have to align partitions on a 4K boundary, performance will be
 miserable without that. I think parted is the best tool to do
 partitioning in this case, as parted supports aligning.
 

I think the very very latest util-linux-ng will have fdisk/cfdisk
that'll handle it just fine.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] 4k sector drives

2010-04-21 Thread Uli Armbruster
* Thomas Bächler tho...@archlinux.org [21.04.2010 09:41]:
 Am 21.04.2010 09:34, schrieb Jan de Groot:
  On Tue, 2010-04-20 at 20:52 -0400, Caleb Cushing wrote:
  has anyone installed arch on one of these drives? thinking about
  buying a pair and running them mirrored... but not sure if everything
  will be working optimal. note: since I'll have to migrate off an
  existing drive I can use the tools installed on that to partition it
  first. Is there anything I should know first?
  
  You will have to align partitions on a 4K boundary, performance will be
  miserable without that. I think parted is the best tool to do
  partitioning in this case, as parted supports aligning.
  
 
 I think the very very latest util-linux-ng will have fdisk/cfdisk
 that'll handle it just fine.
 

I can second that, I don't have Arch installed on a 4k drive but I have an 
external drive, which I partitioned with fdisk -c -u /dev/sdX and there's no 
speed drop at all, so you can use this command line without any worries


Re: [arch-general] 4k sector drives

2010-04-21 Thread Jan de Groot
On Wed, 2010-04-21 at 10:31 +0200, Uli Armbruster wrote:
 I can second that, I don't have Arch installed on a 4k drive but I
 have an external drive, which I partitioned with fdisk -c -u /dev/sdX
 and there's no speed drop at all, so you can use this command line
 without any worries

Some of these 4K drives export their sectors to the OS as 512 byte
sectors. If you happen to align your partition incorrectly then, every
inode read/write will result in 2 sectors being touched.
For drives that export their sectors as 4K units to the OS, there's not
a single issue.
Just be aware of this fact, I don't know how fdisk aligns stuff these
days, but for my SSD I chose to use parted.