PDA

View Full Version : Advanced format (4k hard sector size) drive usage in tivos.



crashHD
06-18-2012, 09:09 AM
Will an advanced format drive used in a tivo suffer the same misaligned writes as when used with windows XP?

There's a good illustration here. (http://hothardware.com/Articles/WDs-1TB-Caviar-Green-w-Advanced-Format-Windows-XP-Users-Pay-Attention/).

It says XP has that problem because the first partition begins on (512k) sector 63, whereas if it began on sector 64 they would be aligned. I'm presuming that means the sectors are numbered beginning at 0, correct?

pdisk output for the first two partitions looks like this:

Partition Maps
#: type name length base ( size )
1 Apple_partition_map Apple 63@1 ( 31.5K)
2 Image Bootstrap 1 8@485364800 ( 4.0K)

In this instance, the second partition begins on sector 64. If the sector numbering scheme is the same (i.e. first sector is sector # 0), then this partitioning scheme should not suffer from misaligned writes. What's odd to me is the length of partition 1 (63 blocks), 31.5kb. If the partitions are aligned, there should be exactly 32.0kb of the disk used before the beginning of /dev/hda2.

Is the first sector #1, and /dev/hda1 starts at the very beginning of the disk (and accordingly, the rest of the partitions on the disk are going to be write misaligned), or is the first sector #0, and /dev/hda1 begins on the second block of the disk (and thusly the rest of the partitions are write aligned)?

Jamie
06-18-2012, 05:58 PM
Will an advanced format drive used in a tivo suffer the same misaligned writes as when used with windows XP?

...

... or is the first sector #0, and /dev/hda1 begins on the second block of the disk ...?This.

Sector #0 is the boot sector. The Apple Partition Map starts at sector 1.

It may still be true that other partitions will not be aligned properly for 4K sectors. I'm looking at my Series 3 and see this:

#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1 ( 31.5K)
2: Image Bootstrap 1 1 @ 485364800
3: Image Kernel 1 8192 @ 485364801 ( 4.0M)
4: Ext2 Root 1 524288 @ 485372993 ( 256.0M)
...Note that partitions 3 and 4 do not begin on a 4K boundary. Could be an artifact of mfstools, as this isn't a virgin tivo drive.

crashHD
06-23-2012, 07:51 AM
I just got my first Series3. It was a broken, lifetimed unit from ebay. After replacing the blown caps to get it running, and finding an image (seller had wiped the hard drive (I can understand data privacy concerns to a point, but wiping a dvr drive...SRSLY?)) I found it to have bootstrap partitions of single sector (1 block, 512 byte) size, which will give me misaligned writes if I expand to a 4k sector based disk.

I don't yet know if this issue was created when I restored the backup image, or if this issue was created when the backup image was created. Any ideas if I will be able to fix this when expanding to a new drive, or if I need to start off with a different source image?

unitron
06-25-2012, 04:15 PM
I just got my first Series3. It was a broken, lifetimed unit from ebay. After replacing the blown caps to get it running, and finding an image (seller had wiped the hard drive (I can understand data privacy concerns to a point, but wiping a dvr drive...SRSLY?)) I found it to have bootstrap partitions of single sector (1 block, 512 byte) size, which will give me misaligned writes if I expand to a 4k sector based disk.

I don't yet know if this issue was created when I restored the backup image, or if this issue was created when the backup image was created. Any ideas if I will be able to fix this when expanding to a new drive, or if I need to start off with a different source image?

Assuming you mean an original S3 (TCD648250), you should probably look for a non-AF 1TB or 1.5TB drive.

crashHD
06-25-2012, 05:55 PM
I have both an advanced format 2TB WD20EURS and a traditional 512-byte sectors 2TB WD20EVDS. I am considering trying both of them out, in addition to working on a workaround to let me use a full 2TB drive (prepared to prom it and hack it if need be).

I don't anticipate problems running the AF drive *IF* I can keep the partitions aligned. The only time it should ever be an issue is in the event of 512-byte length bootstrap partitions as shown in the partition table Jamie posted. My S3 came to me with a wiped drive, so I had to install from an image I found online. The image I downloaded from teh intartubes has 512-byte bootstrap partitons, but I have an idea about how to fix that, too. I think a factory, virgin image has a 4.0kB bootstrap partition, which should keep everything aligned. I'll post back when I get a chance to work on it, although it's going to be a while.

unitron
07-01-2012, 09:32 PM
I have both an advanced format 2TB WD20EURS and a traditional 512-byte sectors 2TB WD20EVDS. I am considering trying both of them out, in addition to working on a workaround to let me use a full 2TB drive (prepared to prom it and hack it if need be).

I don't anticipate problems running the AF drive *IF* I can keep the partitions aligned. The only time it should ever be an issue is in the event of 512-byte length bootstrap partitions as shown in the partition table Jamie posted. My S3 came to me with a wiped drive, so I had to install from an image I found online. The image I downloaded from teh intartubes has 512-byte bootstrap partitons, but I have an idea about how to fix that, too. I think a factory, virgin image has a 4.0kB bootstrap partition, which should keep everything aligned. I'll post back when I get a chance to work on it, although it's going to be a while.

I look forward to finding out what you discover, so I'm posting this to make sure I get an email alerting me to new posts in this thread.

crashHD
07-02-2012, 03:23 AM
It will be a little while. I only have one s3, and it's lifetimed. My soldering skills are not good enough to risk a LT box, but fair enough I would take a shot at a non-lifetimed S3. So, I either have to get another(cheapie) one on ebay, or bite the bullet and pay Omikron to prom it for me. I'm wanting to attempt to build a Series3 MFS from scratch as has been done for S2's. The resulting image won't require a prom to run, but the process of building it will need a prommed unit.

What may happen sooner is the aforementioned comparison, on a Series2, instead. I'm currently testing a 2.0TB drive with 1800GB of usable MFS space on a Series2. When it gets full enough, I'm going to copy it to the AF drive and swap them. This is what that partition map looks like:

Partition map (with 512 byte blocks) on '/dev/sdb'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Image Bootstrap 1 262144 @ 64 (128.0M)
3: Image Kernel 1 8192 @ 262208 ( 4.0M)
4: Ext2 Root 1 524288 @ 270400 (256.0M)
5: Image Bootstrap 2 262144 @ 794688 (128.0M)
6: Image Kernel 2 8192 @ 1056832 ( 4.0M)
7: Ext2 Root 2 524288 @ 1065024 (256.0M)
8: Swap Linux swap 4194304 @ 1589312 ( 2.0G)
9: Ext2 /var 2097152 @ 5783616 ( 1.0G)
10: MFS MFS application region 1048576 @ 7880768 (512.0M)
11: MFS MFS media region 2097152 @ 8929344 ( 1.0G)
12: MFS MFS app region by MFSLive 1048576 @ 11026496 (512.0M)
13: MFS MFS media by MFSLive 2147450880 @ 12075072 (1024.0G)
14: MFS 3rd MFS app region 1048576 @ 2159525952 (512.0M)
15: MFS 3rd MFS region 1677721600 @ 2160574528 (800.0G)
16: Apple_Free Extra 68733040 @ 3838296128 ( 32.8G)

Device block size=512, Number of Blocks=3907029168 (1.8T)
DeviceType=0x0, DeviceId=0x0



If I'm reading that table right, those partitions should already be aligned for use on an AF drive. the boot sector plus the first partition equals 4.0kB, and everything past that is in multiples of 4kB.

crashHD
07-06-2012, 09:37 PM
I've been running this WD20EURS drive for 24 hours now, on an old RCA dvr39. No issues as yet, no unscheduled, unexplained reboots. The system is a little sluggish, but not bad. No more so than it was before I copied the system over from the WD20EVDS. All things considered, a 2.0TB MFS may be a lot to ask of Series2 hardware. There are over 700 recordings on this drive, and it's continuing to fill via tyftpd. If I get around to it tomorrow, I may move this drive to the HR10, and finish filling it via OTA HD.

Presently, I have no reason to suspect any issues relating to the advanced format drive. I am open to suggested test scenarios.