Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Wikipedia:Reference desk/Archives/Computing/2013 March 24

From Wikipedia, the free encyclopedia
Computing desk
< March 23 << Feb | March | Apr >> March 25 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


March 24

[edit]

File system type (Linux) displayed differently by various programs

[edit]
Resolved

I'm adding a 3 Tb disk to my Linux box. Doing so by using the GNOME Disks utility (aka Palimpsest), resulted in the following error message: "The partition is misaligned by 512 bytes. This may result in very poor performance. Repartitioning is suggested.", without any obvious hints as to how to fix the error. Googling the message produced lots of hits, but no solutions that worked. After spending some hours fiddling with the disk utility + parted + gparted, I moved the disk to my Win7 box, created a 3Tb ntfs partition with diskmgmt.msc, and put the disk back into my Linux box. It now showed up fine in the disk utility, no complaints about errors. I was also able to mount it, without errors.

I then wanted to "convert" (destructively, I know) the /dev/sdb1 partition into an ext4 partition, by entering

sudo mkfs.ext4 /dev/sdb1

No errors in the disk utility. I can mount the disk, it the contents being as expected (only the lost+found directory). However, when I look at the disk setup with blkid, it shows up like so:

myname@mymachine:/mnt$ blkid
/dev/sda1: LABEL="Disk 1 (old Ub)" UUID="9b68bb9e-5cc4-4ab0-a21f-a607466cc2ee" TYPE="ext4" 
/dev/sda3: LABEL="Disk1 - xtra sp." UUID="f2327d30-3e90-4755-9149-7554f669c122" TYPE="ext4" 
/dev/sda4: LABEL="Disk 1 - Lubuntu" UUID="11c896f5-3e0b-44ea-ba20-6f67259e5b86" TYPE="ext4" 
/dev/sda5: UUID="f1b8a66f-916f-4bce-b674-243134373005" TYPE="swap" 
/dev/sdb1: LABEL="DiskWD1" UUID="9C44BB8444BB5FA6" TYPE="ntfs" 
/dev/sdc1: LABEL="Disk3 - 1.5 TB" UUID="4bbff5cb-3cfb-498a-a94b-46b75e36ba8c" TYPE="ext4" 
/dev/sdd1: LABEL="Disk2 - 1.5 TB" UUID="39588a06-9896-41b7-bba4-9c1e1beffdfc" TYPE="ext4" 

The problem is that /dev/sdb1 shows up as ntfs even though it actually is an ext4 partition. I'm not sure whether this is just an annoyance or a disaster waiting to happen. In either case I'd like to fix it before starting to use the disk. I know that cfdisk lets you set a "file system type identifying byte". I suspect this byte is the cause of the discrepancy, but cfdisk won't recognize the disk, which has a GUID Partition Table. Any suggestions on how to proceed? Thanks, --NorwegianBlue talk 11:42, 24 March 2013 (UTC)reply

Addendum: Here are the "file system type identifying bytes" as listed by cfdisk:

They're also listed in our article Partition type. --NorwegianBlue talk 12:22, 24 March 2013 (UTC)reply

Spelling out the details is a good way of solving a problem by oneself. I ran e2fsck. Problem disappeared. --NorwegianBlue talk 12:40, 24 March 2013 (UTC)reply
By default, gparted won't create misaligned partitions (the default is 1 Mib alignment), so I guess it was "helping" by keeping the alignment of whatever was on the disk before. In cases like this I generally nuke the partition table with dd and then run gparted to make a nice fresh one. -- Finlay McWalterTalk 13:25, 24 March 2013 (UTC)reply
Thanks, I'll try it! I still have 4 similar disks to go. I need to increase my storage space by a factor of ten, as I'm getting a ton of super 8 and analog video digitized. According to this link, I have to zero both the beginning and the end of the disk since it uses a GUID partition table. So I'll try it, using the linked howto for accessing the end of the disk. I'll dd-save the parts that I nuke, just to be on the safe side. Doing so has saved me more than once! --NorwegianBlue talk 21:43, 24 March 2013 (UTC)reply
Advanced Format might be relevant here. The default formatting on AF disks can result in a 512 byte misalignment and subsequent poor performance on Linux systems. Astronaut (talk) 23:45, 24 March 2013 (UTC)reply
Ok, here are my conclusions, for the benefit of anyone who might find this thread googling for the error messages:
  • The misaligned disk problem affects both Seagate and Western Digital 3Tb disks. The only difference is that with the Western digital disk, the reported misalignment was 256 bytes. With the Seagate disk, the reported misalignment was 3072 bytes. The WD disk is described by the supplier as Western Digital® Desktop Green 3TB SATA 6Gb/s, (SATA 3.0), RPM = IntelliPower, 64MB Cache, 3.5 in., and has the producer ID WD30EZRX. The Seagate disk is described by the supplier as Seagate Barracuda® 3TB SATA 6Gb/s (SATA 3.0), 64MB Cache, 7200RPM, 3.5 in., and has the producer ID ST3000DM001. Both disks had 5860533168 blocks as reported by sudo cat /sys/block/sdd/size, which fits nicely with 3Tb and a block size of 512 bytes. The OS is Lubuntu 12.04.2 LTS.
  • Zeroing the start and end of the disks, as suggested by Finlay, initially appeared to have no effect. Exactly the same error messages, with the same reported misalignments, were reported (still using palimpsest). I later checked to see whether the zeroing of the starts and ends of the disks had actually worked (by repeating the process, dd-ing the blocks to a file and doing hexdump -C). The supposedly zeroed beginnings and ends of the disk still contained data! I repeated the process, then did partprobe /dev/sdd (to tell the OS that the partition tables were changed) and rebooted. When I then checked whether the sectors were empty, they were. I then used gparted, created a GPT style partition table, and created one 3Tb ext4 partition. Everything went smoothly. When checking the disk with palimpsest, there was no warning of misalignment.
  • Conclusion: Nuking the starts and ends of the disks as suggested by Finlay works, but you have to take care and check that the sectors are actually cleared, and that the OS is aware of it. I'm not sure why my initial attempts failed silently. Maybe I had palimpsest open, while dd-ing, and palimpsest locked the disk. Maybe I had actually succeeded in zeroing the sectors, but failed to tell the OS. I don't know. Anyway, it works now. --NorwegianBlue talk 15:58, 25 March 2013 (UTC)reply
It's very unlikely that any manufacturer would ship a drive with misaligned partitions, since it would kill their performance on benchmarks. Furthermore, a misalignment of 256 bytes is actually impossible, since it's not a multiple of the nominal sector size of 512 bytes. (The misalignment here is with the true sector size, which is probably 4096 bytes. These drives report 512-byte sectors for backward compatibility. If the true sector size is 512 bytes, the "misalignment" doesn't matter.) So I think this must be a bug in the software you're using. In any case, it does no harm to wipe the partition table and start over. -- BenRG (talk) 17:40, 25 March 2013 (UTC)reply
And even more unlikely that two manufacturers would. Googling "palimpsest misalignment bug" shows that it is a known bug. As far as I can figure out, it's a combination of an alignment bug and a misleading error message. --NorwegianBlue talk 18:46, 25 March 2013 (UTC)reply
You'd be surprised. I had an Seagate external (but USB3.0 so capable of reasonable performance) drive with misaligned partitions. I've heard of the same problem for people with other Seagate external drives of a similar kind. I'm guessing no one thought to update whatever tool they're using. I suspect WD must have done the same thing at some stage. Internal drives don't normally come formatted when purchased by themselves so no experience there. Nil Einne (talk) 20:54, 25 March 2013 (UTC)reply
There seem to be drives up to at least 3TB that still use 512-byte physical sectors, such as the Hitachi 7K3000. It's possible you had one of those and the tool you used didn't check for it before displaying the warning (perhaps because it was attached over USB). -- BenRG (talk) 03:51, 26 March 2013 (UTC)reply
No, other then the fact it is unlikely Seagate would want to use a drive made by their primary competitor (WD) for their external drives, in at least one case of someone I personally knew the external drive was disassembled to get at the internal drive and yes it was a Seagate drive (one of the newer 7200RPM ones that Seagate only makes now). Also various tool used such as Acronis alignment tool did claim the drive was an advanced format/4k drive although I didn't have a non 4k USB drive to test it worked properly on USB. (Incidentally even those with the offset jumper which AFAIK Seagate never used have a way of reporting this, at least for native ATA drives .) Nil Einne (talk) 20:05, 26 March 2013 (UTC)reply

ONCE AGAIN, Subscription feed layout on YouTube - how do I change it back?

[edit]

The Subscription feed on YouTube changed its layout. I liked the old one better. How do I change it back?

The old layout showed its videos about 5 to a row, with titles under them. Very recently, it changed to show a layout that I don't appreciate as much because I see less previews on the same screenspace than in the old layout. That is why I want the old layout back, so how do I change it back? --70.179.161.230 (talk) 20:52, 24 March 2013 (UTC)reply

In general, you cannot force website publishers to provide the content that you want, in the format that you desire. Some website publishers allow you to configure the user-interface through preferences or settings; Youtube does not have such options. Some other website developers have the goodwill to provide simple, standardized content that makes it easy for you to customize the presentation - for example, you can re-layout an HTML document by applying your own stylesheet using a web browser. In practice, few websites publish their content as simple HTML documents, so it has become prohibitively difficult for end-users to modify the formatting and presentation of web content. Many new websites intentionally (ab)use the capabilities of hypertext, fixing the format so that the document is not even reflowable. This is particularly true for commercial websites whose developers intend to control your viewing experience. If you are unhappy with website publishers' formatting choices, you should contact the publisher directly - in this case, through their form-letter user feedback system, or simply avoid using their website. Nimur (talk) 04:56, 25 March 2013 (UTC)reply

Cell phone vibrations ?

[edit]

I have a cell phone which has a vibrate setting. However, when I have it in my shirt pocket I occasionally feel it vibrate when nobody has called. This vibration seems shorter and less intense than an actual ring vibration.

1) Has anyone else noticed this ?

2) What could cause this ?

3) Could it be some type of sympathetic vibration caused by a noise in the environment ? StuRat (talk) 23:27, 24 March 2013 (UTC)reply

Other events might make your phone do this: An SMS message being received, for example, or maybe your phone detects the changes in signal strength and adjusts something like Facebook status accordingly. Astronaut (talk) 23:39, 24 March 2013 (UTC)reply
We should probably ask what sort of phone this is. Then again, I have two phones (Samsung Galaxy S2 and an iPhone 4 since you ask) and have also noticed this, but just put it down to ringxiety. (We really do HAAOE...) - Cucumber Mike (talk) 00:00, 25 March 2013 (UTC)reply

It's a Samsung S425G. I don't recall any previous phones doing this. StuRat (talk) 05:00, 25 March 2013 (UTC)reply

Sure it is your phone? Might be your heart trying to tell you something. I keep my vibrating phone in my trouser pocket, much more exciting!85.211.138.47 (talk) 11:47, 25 March 2013 (UTC)reply

printer margins

[edit]

Is there a place that tells what the margins are for various printers? Had I known that the HP 1000 has a minimum bottom margin of more than one inch, I would not have purchased it. (Such a large margin really messes things up, especially labels and pdfs.) Thank you.     Michael J    23:51, 24 March 2013 (UTC)reply

You'd probably do best to download the owner's manual for the printer before you buy it. That should include such info under the specs section. StuRat (talk) 05:07, 25 March 2013 (UTC)reply
Most printers that fit on a desk will not print to the edges of paper. ¦ Reisio (talk) 21:40, 29 March 2013 (UTC)reply