Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > 3rd Party Projects > Projects > Mythbuntu
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Mythbuntu
Discussions for the Mythbuntu project.

 
Thread Tools Display Modes
Old April 16th, 2010   #1
purduephotog
5 Cups of Ubuntu
 
Join Date: Mar 2008
Beans: 24
WD20EARS 4096 fdisk options

Could someone kindly point me to the documented command line option for the new 4096 drives? I've searched and, while finding lots of fruitful discussions, have not seen a documented 'enter this' command.

I did see the GUI apparently works fine, but unfortunately due to my VNC issues (and poor quality TV) I can't run the gui.

Thanks-

Jason
purduephotog is offline   Reply With Quote
Old April 17th, 2010   #2
movieman
Dipped in Ubuntu
 
Join Date: Feb 2008
Beans: 580
Ubuntu 11.04 Natty Narwhal
Re: WD20EARS 4096 fdisk options

You should be able to use parted to ensure that all but the first partition are 4k aligned: that's what I used to get the partitions aligned for my SSD. Parted does suffer from '1MB is a million bytes' silliness though, which makes alignment to power of two sectors excessively painful... AFAIR you can switch it to use real megabytes instead.
movieman is offline   Reply With Quote
Old April 17th, 2010   #3
ian dobson
Chocolate-Covered Ubuntu Beans
 
Join Date: May 2007
Beans: 2,261
Re: WD20EARS 4096 fdisk options

Hi,

I've just added 2 to my backend (now that sounds abit strange), just format them using fdisk from a terminal window using the -u (sector number entry) and set the start partition to a multiple of 4Kb (start at sector number 64 and not 63).

so just use fdisk -u /dev/your-harddisk and create a new primary partition starting a sector 64, thats it.

Code:
fdisk -u /dev/sde

The number of cylinders for this disk is set to 243201.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): p

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1              64  3907029167  1953514552   fd  Linux raid autodetect
Regards
Ian Dobson
__________________
Walking on water and writing software to specification is easy if they're frozen.

My corner of the internet http://www.planet-ian.com
ian dobson is offline   Reply With Quote
Old April 17th, 2010   #4
movieman
Dipped in Ubuntu
 
Join Date: Feb 2008
Beans: 580
Ubuntu 11.04 Natty Narwhal
Re: WD20EARS 4096 fdisk options

That sounds easier .
movieman is offline   Reply With Quote
Old April 17th, 2010   #5
ian dobson
Chocolate-Covered Ubuntu Beans
 
Join Date: May 2007
Beans: 2,261
Re: WD20EARS 4096 fdisk options

Hi,

Everything is easy when you know how to do it.

Regards
Ian Dobson
__________________
Walking on water and writing software to specification is easy if they're frozen.

My corner of the internet http://www.planet-ian.com
ian dobson is offline   Reply With Quote
Old April 17th, 2010   #6
purduephotog
5 Cups of Ubuntu
 
Join Date: Mar 2008
Beans: 24
Re: WD20EARS 4096 fdisk options

So these are the commands I ran through:

Code:
user@mythbox:~$ sudo fdisk -u  
[sudo] password for user: 
 
Usage:
 fdisk [options] <disk>    change partition table
 fdisk [options] -l <disk> list partition table(s)
 fdisk -s <partition>      give partition size(s) in blocks
 
Options:
 -b <size>                 sector size (512, 1024, 2048 or 4096)
 -c                        switch off DOS-compatible mode
 -h                        print help
 -u <size>                 give sizes in sectors instead of cylinders
 -v                        print version
 -C <number>               specify the number of cylinders
 -H <number>               specify the number of heads
 -S <number>               specify the number of sectors per track
 
user@mythbox:~$ sudo fdisk -l
 
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
 
Disk /dev/sda doesn't contain a valid partition table
 
Disk /dev/sdb: 8002 MB, 8002732032 bytes
247 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c1264
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         971     7427072   83  Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 32, 33) logical=(0, 33, 3)
Partition 1 has different physical/logical endings:
     phys=(924, 192, 36) logical=(970, 25, 62)
Partition 1 does not end on cylinder boundary.
/dev/sdb2             971        1021      385025    5  Extended
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(924, 225, 4) logical=(970, 59, 1)
Partition 2 has different physical/logical endings:
     phys=(972, 208, 4) logical=(1020, 129, 10)
Partition 2 does not end on cylinder boundary.
/dev/sdb5             971        1021      385024   82  Linux swap / Solaris

user@mythbox:~$ sudo fdisk -u /dev/sda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x962f53fb.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
 
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
 
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c').
 
Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p

Partition number (1-4): 1

First sector (63-3907029167, default 63): 64
Last sector, +sectors or +size{K,M,G} (64-3907029167, default 3907029167): 

Using default value 3907029167
 
Command (m for help): w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
Syncing disks.
user@mythbox:~$
Sound about right?
purduephotog is offline   Reply With Quote
Old April 17th, 2010   #7
ian dobson
Chocolate-Covered Ubuntu Beans
 
Join Date: May 2007
Beans: 2,261
Re: WD20EARS 4096 fdisk options

Hi,

I can't hear anything from my monitor but your partition starts at number 64 so it's aligned to a sector boundry so everything should be OK.

If you do a fdisk -l -u you'll see that on your new drive the partition starts at sector 64 and your old drives start as 63.

Regards
Ian Dobson
__________________
Walking on water and writing software to specification is easy if they're frozen.

My corner of the internet http://www.planet-ian.com
ian dobson is offline   Reply With Quote
Old April 17th, 2010   #8
purduephotog
5 Cups of Ubuntu
 
Join Date: Mar 2008
Beans: 24
Re: WD20EARS 4096 fdisk options

Quote:
Originally Posted by ian dobson View Post
Hi,

I can't hear anything from my monitor but your partition starts at number 64 so it's aligned to a sector boundry so everything should be OK.

If you do a fdisk -l -u you'll see that on your new drive the partition starts at sector 64 and your old drives start as 63.

Regards
Ian Dobson

Thanks Ian. You've got to put your head REALLY REALLY close... closer... closer... not that close.

Indeed that is what it says. I'm not sure if I got the formatting to use 4096 correct or not, will have to review that later.

And now to figure out why VNC won't work.
purduephotog is offline   Reply With Quote
Old July 1st, 2010   #9
HankB
Ubuntu Extra Shot
 
Join Date: Dec 2004
Beans: 353
Re: WD20EARS 4096 fdisk options

I plan to use one of these drives in a Raid-1 (mirrored) with another brand drive. The other drive will not feature the larger sectors.

Should I expect this to work OK or is mixing different drives like this a Bad Idea(tm)

thanks,
hank
HankB is offline   Reply With Quote
Old July 1st, 2010   #10
ian dobson
Chocolate-Covered Ubuntu Beans
 
Join Date: May 2007
Beans: 2,261
Re: WD20EARS 4096 fdisk options

Hi,

Just make sure you partition the 4K drive so that the partition starts on a sector divisble by 8 (4K / 512 byte). So 64 is good.

I have 2 of these drives in a RAID0 array and haven't seen any performace problems.

Regards
Ian Dobson
__________________
Walking on water and writing software to specification is easy if they're frozen.

My corner of the internet http://www.planet-ian.com
ian dobson is offline   Reply With Quote

Bookmarks

Tags
wd20ears

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:37 AM.


vBulletin ©2000 - 2012, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry