• March 28, 2024, 02:15:34 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Pages: 1 ... 3 4 [5] 6 7 8

Author Topic: 4K Physical Sector Performance issue  (Read 99662 times)

lindend

  • Level 1 Member
  • *
  • Posts: 9
Re: 4K Physical Sector Performance issue
« Reply #60 on: March 31, 2010, 05:44:35 PM »

TimeZlicer,

After I format, how can I tell if the drive (WD15EARS) is properly aligned?

This was my parted output prior to formating /dev/sdb

Code: [Select]
Number  Start     End          Size         Type     File system  Flags
 1      64s       1060287s     1060224s     primary  linux-swap
 2      2088450s  2930272064s  2928183615s  primary  ext2

Also.  I tried to create/change the partitions with parted, but it complained that the disk signature was invalid and wouldn't do it so I jumped to the mke2fs steps.  Is this something to be concerned about?
« Last Edit: March 31, 2010, 05:50:46 PM by lindend »
Logged

TimeZlicer

  • Level 2 Member
  • **
  • Posts: 78
    • TimeZlicer
Re: 4K Physical Sector Performance issue
« Reply #61 on: March 31, 2010, 06:32:56 PM »

you can tell before you format, during partition creation

in your case,
partition 1 is ok (64 is divisible by 8 )
partition 2 is not ok (2088450 is not divisible by 8 )

could you post more details on the error message from parted?
have you tried fdisk?
mke2fs only creates the filesystem, alignment is only done during partition creation

reason for divisible by 8 is that the physical sector is 4096, however the drive is reporting 512,
hence partition should start on a number that is divisible by 8 to be aligned (8x512 = 4096)
TimeZlicer,

After I format, how can I tell if the drive (WD15EARS) is properly aligned?

This was my parted output prior to formating /dev/sdb

Code: [Select]
Number  Start     End          Size         Type     File system  Flags
 1      64s       1060287s     1060224s     primary  linux-swap
 2      2088450s  2930272064s  2928183615s  primary  ext2

Also.  I tried to create/change the partitions with parted, but it complained that the disk signature was invalid and wouldn't do it so I jumped to the mke2fs steps.  Is this something to be concerned about?
Logged

lindend

  • Level 1 Member
  • *
  • Posts: 9
Re: 4K Physical Sector Performance issue
« Reply #62 on: March 31, 2010, 07:17:19 PM »

Thanks TimeZlicer.  I figured out the divisible by 8 after googling for a bit.  So I need to solve the parted issue.

These are the errors I see (I forgot to copy the signature error previously):

Code: [Select]
(parted) rm 2
Error: Partition /dev/sdb2 is being used. You must unmount it before you modify it with Parted.
(parted) rm 1
Error: Invalid partition table - recursive partition on /dev/sdb.
parted: invalid token: 1

I tried fdisk, but it crashes.
Logged

lindend

  • Level 1 Member
  • *
  • Posts: 9
Re: 4K Physical Sector Performance issue
« Reply #63 on: March 31, 2010, 07:21:46 PM »

Replicated the signature error again with parted

Code: [Select]
rm 2
Error: Partition /dev/sdb2 is being used. You must unmount it before you modify it with Parted.
(parted) unit s
(parted) print
Model: WDC WD15EARS-00Z5B1 (scsi)
Disk /dev/sdb: 2930277168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start     End          Size         Type     File system  Flags
 2      2088450s  2930272064s  2928183615s  primary

(parted) mkpart primary linux-swap 64 1060287
(parted) print
Model: WDC WD15EARS-00Z5B1 (scsi)
Disk /dev/sdb: 2930277168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start     End          Size         Type     File system  Flags
 2      2088450s  2930272064s  2928183615s  primary

(parted) print
Error: Invalid partition table on /dev/sdb -- wrong signature 0.

Logged

TimeZlicer

  • Level 2 Member
  • **
  • Posts: 78
    • TimeZlicer
Re: 4K Physical Sector Performance issue
« Reply #64 on: March 31, 2010, 07:32:51 PM »

you must umount the partitions before you run parted
Error: Partition /dev/sdb2 is being used. You must unmount it before you modify it with Parted.

Code: [Select]
swapoff /dev/sdb1
umount /dev/sdb2
umount /dev/sdb4

please read my previous post again on minimal fun_plug for telnet
Logged

lindend

  • Level 1 Member
  • *
  • Posts: 9
Re: 4K Physical Sector Performance issue
« Reply #65 on: March 31, 2010, 07:53:51 PM »

I did unmount everything.  And mount reported that nothing was mounted prior to parted running.  At this point, I've given up on parted.  I ran the fdisk executable that you recommended earlier in the thread and this is working.  Each partition begins on a sector divisible by 8.  I'm formatting now and will know shortly if this works.  Will update everyone on my results (hopefully positive).
Logged

lindend

  • Level 1 Member
  • *
  • Posts: 9
Re: 4K Physical Sector Performance issue
« Reply #66 on: March 31, 2010, 08:00:56 PM »

fdisk worked and after reboot my drive (sdb) is properly aligned.  I'm now backing everything up on /dev/sda up and will try the same technique.  Hopefully, everything will unmount from /dev/sda.

Logged

TimeZlicer

  • Level 2 Member
  • **
  • Posts: 78
    • TimeZlicer
Re: 4K Physical Sector Performance issue
« Reply #67 on: March 31, 2010, 08:09:23 PM »

cool! congrats!
fdisk worked and after reboot my drive (sdb) is properly aligned.  I'm now backing everything up on /dev/sda up and will try the same technique.  Hopefully, everything will unmount from /dev/sda.

for me, properly aligned EARS writes marginally faster than EADS
writing speed for non-properly aligned EARS is on the average 20% slower than EADS
EARS is much cooler that EADS, 5-8C in most cases and 10C in rare occasions

BTW, cp is faster than rsync when you try to copy from disk to disk
(i assume you have optware installed, the firmware cp don't have the -u option)
Code: [Select]
cp -auv /mnt/HD_b2/AAAAAAA /mnt/HD_a2/is the same as
Code: [Select]
rsync -av /mnt/HD_b2/AAAAAAA/ /mnt/HD_a2/AAAAAAA/
« Last Edit: March 31, 2010, 08:20:29 PM by TimeZlicer »
Logged

lindend

  • Level 1 Member
  • *
  • Posts: 9
Re: 4K Physical Sector Performance issue
« Reply #68 on: April 01, 2010, 03:26:21 AM »

/mnt/HD_a2 is proving trickier to unmount than /dev/sdb.  Any tips on how I can unmount it cleanly?  lsof doesn't report any files being active on that mount point after I've stopped smb, nfs and turned off swapping.  I suspect its remants of ffp that are still attached to that mount point. 

Is there any way to launch ffp from /dev/sdb and not /mnt/HD_a2?
Logged

lindend

  • Level 1 Member
  • *
  • Posts: 9
Re: 4K Physical Sector Performance issue
« Reply #69 on: April 01, 2010, 03:57:16 AM »

Solved my problem.  Updated funplug to use /mnt/HD_b2 and was able to unmount /dev/sda and reformat on aligned partitions.

Thanks for the cp tip.  Will use it for my nightly backups.



Logged

lindend

  • Level 1 Member
  • *
  • Posts: 9
Re: 4K Physical Sector Performance issue
« Reply #70 on: April 01, 2010, 06:58:18 PM »

(i assume you have optware installed, the firmware cp don't have the -u option)

Actually, I don't have optware installed right now.  What package is it part of in optware?

Logged

TimeZlicer

  • Level 2 Member
  • **
  • Posts: 78
    • TimeZlicer
Re: 4K Physical Sector Performance issue
« Reply #71 on: April 01, 2010, 07:01:29 PM »

Package: coreutils
Version: 8.4-1
Section: core
Architecture: arm
Maintainer: NSLU2 Linux <nslu2-linux@yahoogroups.com>
MD5Sum: b3efb1df534aaf86228ba255c9ab3dc8
Size: 1985358
Filename: coreutils_8.4-1_arm.ipk
Source: http://ftp.gnu.org/pub/gnu/coreutils/coreutils-8.4.tar.gz
Description: Bunch of heavyweight *nix core utilities
Actually, I don't have optware installed right now.  What package is it part of in optware?
Logged

dP21

  • Level 1 Member
  • *
  • Posts: 10
Re: 4K Physical Sector Performance issue
« Reply #72 on: April 02, 2010, 11:32:21 PM »

TimeZlicer,

I was able to successfully unmount /dev/sda2 and ran fdisk.  Everything worked until I got to the mke2fs command.  I still tried hd_verify and rebooted but drive is coming up with pink again and will need to format.  Any idea what's going on? I'm using ext2.

Code: [Select]
Command (m for help): p

Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              64     1060289      530113   82  Linux swap / Solaris
/dev/sda2         3164808  3907029167  1951932180   83  Linux
/dev/sda4         1060290     2088449      514080   83  Linux

Partition table entries are not in disk order

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
# mkswap /dev/sda1
Setting up swapspace version 1, size = 542830592 bytes
# mke2fs -m 0 /dev/sda2
*** Device name for mke2fs: /dev/sda2
mke2fs 1.41.2 (02-Oct-2008)
/dev/sda2: Memory allocation failed while setting up superblock
exit status 1
# ^[[A                : not found
# in/busybox3.dir/sh:
# mke2fs -m 0 /dev/sda2
*** Device name for mke2fs: /dev/sda2
mke2fs 1.41.2 (02-Oct-2008)
/dev/sda2: Memory allocation failed while setting up superblock
exit status 1
#
Logged

TimeZlicer

  • Level 2 Member
  • **
  • Posts: 78
    • TimeZlicer
Re: 4K Physical Sector Performance issue
« Reply #73 on: April 03, 2010, 07:04:48 AM »

maybe you ran out of memory, try
Code: [Select]
swapon /dev/sda1before running mke2fs
TimeZlicer,

I was able to successfully unmount /dev/sda2 and ran fdisk.  Everything worked until I got to the mke2fs command.  I still tried hd_verify and rebooted but drive is coming up with pink again and will need to format.  Any idea what's going on? I'm using ext2.

Code: [Select]
Command (m for help): p

Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              64     1060289      530113   82  Linux swap / Solaris
/dev/sda2         3164808  3907029167  1951932180   83  Linux
/dev/sda4         1060290     2088449      514080   83  Linux

Partition table entries are not in disk order

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
# mkswap /dev/sda1
Setting up swapspace version 1, size = 542830592 bytes
# mke2fs -m 0 /dev/sda2
*** Device name for mke2fs: /dev/sda2
mke2fs 1.41.2 (02-Oct-2008)
/dev/sda2: Memory allocation failed while setting up superblock
exit status 1
# ^[[A                : not found
# in/busybox3.dir/sh:
# mke2fs -m 0 /dev/sda2
*** Device name for mke2fs: /dev/sda2
mke2fs 1.41.2 (02-Oct-2008)
/dev/sda2: Memory allocation failed while setting up superblock
exit status 1
#
Logged

rozsalyib

  • Level 1 Member
  • *
  • Posts: 2
Re: 4K Physical Sector Performance issue
« Reply #74 on: April 07, 2010, 07:48:32 AM »

Hello,
Maybe I'm asking too much but could somebody who successfully managed to re-align and format (RAID 1) write a short summary or step by step of what needs to be done from the very beginning when you install fun_plug up to the end. 
What kind of fun_plug do you install? I couldn't unumount with the regular fun_plug. I went through all the 5 pages at least 3 times but I'm still missing something.

Just by searching on google I found a lot of other guys out there struggling with the same issue. Even from Dlink tech team would be nice if somebody would write a step by step or a summary for a beginner linux user.

Regards,
Albert
Logged
Pages: 1 ... 3 4 [5] 6 7 8