You are not logged in.

#1 2012-07-30 19:11:54

msx
Member
From: solar.system/earth/ar/bue/mdp
Registered: 2010-08-08
Posts: 184
Website

How to make current partition be an 8 multiple for use with WD 4K HDs

Folks:

I just discovered I incorrectly created the partitions on my HD without following the 8-multiple rule to have the logic sector size match the physical one (4096) - seems my laptop sports the new Western Digital's new 4K-based hard disks.
Alongside, some unrecoverable bad sectors showed up during my usual root ( / ) backup so I will move the partition -everything's in there except for /home- to another region of the HD until I have the time to figure out why fsck can't repair or mark the bad sectors properly so the system stop trying to put data on them >:(
So far I've deleted everything but /home:

The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.

Command (m for help): p

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x40c486bc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda2        39315456  1407764479   684224512   83  Linux

Command (m for help):

The space before /dev/sda2 is about 18gb, /dev/sda2 itself weights ~660gb and the remaining space is ~30gb.

My problem is: I can calculate where next partitions ( / and swap ) should start so they're 512*8-based (4096 bytes), what I have no clear is if that will be of any help -most probably not since there's already at least one partition using a 512 bytes logical sector scheme- because fdisk is reporting I'm already using a logical sector size of 512 bytes, probably thanks to my /home partition (/dev/sda2).
So: is there any way to resize the /dev/sda2 so it fits a 4096 bytes sector scheme, or my only chance is to delete the partition and start a new partition scheme from scratch?
As I said above /dev/sda2 is my home partition and I have a lot of data there I have not yet replicated so nuking it up it's not a real option :( Also, I'm running a fsck.ext4 -ccDfpv from SysRescCD right now to ensure data integrity and so far everything's ok.

By the way: my current partition setup uses MBR, can I switch to GPT without touching the standing partition?

Cheers,
Martin

Last edited by msx (2012-07-30 23:18:06)


Enjoying i3wm w/ lifebar + j4-dmenu-desktop + tab_windows / fish shell / Emacs / tmux / Konsole / KDE apps
Arch + Linux-libre kernel: ParabolaGNULinux.org

Offline

#2 2012-07-31 12:35:49

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,353

Re: How to make current partition be an 8 multiple for use with WD 4K HDs

Convert_from_MBR_to_GPT suggests the standing partition should stay intact.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2012-07-31 15:55:02

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How to make current partition be an 8 multiple for use with WD 4K HDs

If you don't use -c=dos then fdisk should align all partitions correctly. Parted should also be able to do it correctly.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2012-07-31 18:25:55

msx
Member
From: solar.system/earth/ar/bue/mdp
Registered: 2010-08-08
Posts: 184
Website

Re: How to make current partition be an 8 multiple for use with WD 4K HDs

Hi guys, thank you for reading my post smile

@Lone_Wolf: That definitely slipped under my radar, tnx for pointing it.
@R00KIE: I don't use that switch -indeed nondos is the default option-, any other idea!?


Enjoying i3wm w/ lifebar + j4-dmenu-desktop + tab_windows / fish shell / Emacs / tmux / Konsole / KDE apps
Arch + Linux-libre kernel: ParabolaGNULinux.org

Offline

#5 2012-08-01 12:17:10

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How to make current partition be an 8 multiple for use with WD 4K HDs

Like I said, fdisk will align partitions correctly, in case of doubt do a test run, create the partitions with fdisk but don't write the modifications to disk and check where the partitions start, it will most probably be a sector that is am integer multiple of 8.

On another note, for that disk you will always address 512B logical sectors because that is what the disk reports and allows as the smallest addressable unit.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB