Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-08-2013, 12:56 AM
|
#1
|
Member
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108
Rep:
|
Fdisk shows logical sector size smaller than physical sector size after clonezilla
I bought a new 1tb HD adding it to a 750gb drive. I have a duel boot Windows/Linux Mint Debian setup. I did a clonezilla to copy the 750gb drive to the 1tb drive (it used partclone, I believe).
I did an fdisk /dev/sdb (the newer 1tb drive) to examine the drive. It showed this error:
Quote:
The device presents a logical sector size that is smaller than the physical sector size. Aligning to a physical sector size boundary is recommended or performance may be impacted.
|
Code:
$ /sbin/fdisk -v
fdisk (util-linux 2.20.1)
Is this a real problem, or is this an fdisk version issue? If it is a real issue, how do I deal with it? Esp with copying over the Windows recovery partition and windows partitions?
I am also wondering about design issues. I would prefer Windows os on the original and my Windows data (user data, etc) on the new drive and the reverse for my Linux, but how hard is it to switch a Windows data volume to another disk (it is already copied onto that disk). The easier road I think would just be let /dev/sda be for Windows and /dev/sdb be for linux, but performance would be better the other way. Thoughts?
Thanks,
Narnie
|
|
|
02-08-2013, 05:10 AM
|
#2
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
This is a real problem. Some newer drives (and it will be more in the future) use physical sector sizes of 4KB instead of the older 512B. In order to get full write performance from the disk partitions have to be aligned to those physical sectors. So make sure that the startsector of any partition can be divided by 8.
|
|
1 members found this post helpful.
|
02-08-2013, 03:20 PM
|
#3
|
Member
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108
Original Poster
Rep:
|
Quote:
Originally Posted by TobiSGD
This is a real problem. Some newer drives (and it will be more in the future) use physical sector sizes of 4KB instead of the older 512B. In order to get full write performance from the disk partitions have to be aligned to those physical sectors. So make sure that the startsector of any partition can be divided by 8.
|
OK, I wiped the drive and reformated it with SystemRescueCD using gparted mimicking my old HD's partition scheme/sizes. I checked the first sector of each partition and they are all divisible by 8. However, when I do a fdisk, I still get the fdisk warning. Is that OK or should that warning have gone away if my startsector for each partition is divisible by 8 and everything is ok to copy over and put it into production?
Thanks,
Narnie
|
|
|
02-08-2013, 08:32 PM
|
#4
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828
|
If you would post the output from "fdisk -lu" for that drive, someone could give a definitive answer.
|
|
|
02-09-2013, 06:02 PM
|
#5
|
Member
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108
Original Poster
Rep:
|
Quote:
Originally Posted by rknichols
If you would post the output from "fdisk -lu" for that drive, someone could give a definitive answer.
|
Here 'tis.
Code:
# fdisk -lu /dev/sdb
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x00011318
Device Boot Start End Blocks Id System
/dev/sdb1 2048 86015 41984 6 FAT16
/dev/sdb2 86016 30801919 15357952 7 HPFS/NTFS/exFAT
/dev/sdb3 * 30801920 212738047 90968064 7 HPFS/NTFS/exFAT
/dev/sdb4 212738048 1953523711 870392832 5 Extended
/dev/sdb5 212740096 422453247 104856576 7 HPFS/NTFS/exFAT
/dev/sdb6 422455296 527312895 52428800 83 Linux
/dev/sdb7 527314944 1940940799 706812928 83 Linux
/dev/sdb8 1940942848 1953523711 6290432 82 Linux swap / Solaris
Thank you for any help.
Narnie
|
|
|
02-09-2013, 09:56 PM
|
#6
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828
|
That all looks like it should be just fine.
|
|
|
07-02-2013, 11:47 AM
|
#7
|
LQ Newbie
Registered: Jul 2013
Posts: 3
Rep: 
|
To me, it looks like there's a lot of wasted space in this partitioning scheme. sdb5 starts 2048 sectors past the beginning of sdb4, there's 2048 sectors between the end of sdb5 and the beginning of sdb6, etc. Can anything be done about this?
Right now I'm trying to partition a hard drive with this "issue", and I can't seem to avoid wasting space.
|
|
|
07-02-2013, 01:18 PM
|
#8
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828
|
The 5 sets of 2048 wasted sectors works out to 0.00052% of the 1953525168 sectors on the drive. How much effort do you want to put into reclaiming that?
|
|
|
07-02-2013, 02:58 PM
|
#9
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by rknichols
The 5 sets of 2048 wasted sectors works out to 0.00052% of the 1953525168 sectors on the drive. How much effort do you want to put into reclaiming that?
|
Or to give you some other numbers, 2048 sectors are exactly 1 MB, the the wasted space on this 1TB disk is 5MB.
|
|
|
07-02-2013, 03:49 PM
|
#10
|
LQ Newbie
Registered: Jul 2013
Posts: 3
Rep: 
|
If I was willing to accept sloppiness without question, I would be an MS Windows user.
I would at least like to know the source of the unclaimed space, and if there's anything that can be done about it.
|
|
|
07-03-2013, 04:46 AM
|
#11
|
Member
Registered: Feb 2003
Location: Malaysia
Distribution: Mandrake 9.1, Debian 3.1,Centos 5.x,6.x,Slackware 13.37,14.0,14.1
Posts: 49
Rep:
|
ulatekh,
What tools do you use to create the partitions ?
I am doing partition with my new 1.5TB WD15EARS as well, and I used parted which can let me to assign the exact START and END sector number, which at the end I could make no waste of space of my partitioned harddisk. Do you want to take a try with parted ?
|
|
|
07-03-2013, 11:57 AM
|
#12
|
LQ Newbie
Registered: Jul 2013
Posts: 3
Rep: 
|
I was using the fdisk that came with my Fedora Core 17 install/rescue DVD.
I guess I'll have to take another stab at parted...it's been a while since I tried to use that.
|
|
|
07-03-2013, 09:01 PM
|
#13
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828
|
Quote:
Originally Posted by ulatekh
If I was willing to accept sloppiness without question, I would be an MS Windows user.
I would at least like to know the source of the unclaimed space, and if there's anything that can be done about it.
|
The reason is alignment. Modern disk drives with 4KB physical sectors suffer severe degradation in write performance if the filesystem is not aligned to a 4KB boundary, and the erase blocks in SSDs are even larger, perhaps 128KB or 256KB. Current partitioning tools are built to use a 1MB alignment when using sector units (as opposed to legacy cylinder units).
The first partition is always preceded by the single sector MBR, so space must be wasted there to bring that partition back into alignment. Similarly, every logical drive in the extended partition is preceded by a secondary partition table, which again (assuming that the preceding partition uses an integral number of alignment-sized blocks) would misalign them by 1 sector unless some space is wasted to align them properly.
You can use sfdisk with the --force ("Do what I say even if it is stupid") option to place your partitions wherever you like. You could also avoid the use of extended partitions and logical drives by partitioning your disks with GPT, which would only "waste" 68 sectors for the primary and secondary GPTs (34 512-byte sectors each).
|
|
|
All times are GMT -5. The time now is 05:46 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|