LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-28-2014, 02:35 PM   #1
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 295
Blog Entries: 3

Rep: Reputation: Disabled
Western Digital My Book 3TB on CentOS 5.4


Hey all.

The goal: I'd like to be able to use this My Book 3TB external USB drive hung off the back of an existing CentOS 5.4 machine to offload some data. I realize 5.4 is buggy and prone to issues, but, for now, this is what I'm faced with and it can't be upgraded until the data can be offloaded.

What I've tried: First, I know some of this has been covered in the past, but I can't seem to locate the website/resource. I've tried using gparted and gdisk to create first a gpt, then tried ext3 as two partitions, 1.4 and 1.2 TB each, trying to avoid that 2.2TB issue. I checked the /boot/config-2.6.18-164.9.1.el5 - CONFIG_EFI_PARTITION and it's set to "y"

Has anyone with a 3TB+ external drive been able to get it to work with CentOS 5? If so, what were your steps?

Many thanks.
loadedmind aka John
 
Old 07-28-2014, 02:44 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,488

Rep: Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090
Just use parted to switch to gpt and then make one big ext3 partition, where's the issue? The 2TB limit is avoided by using gpt in the first place.

Code:
parted /dev/sdx
mklabel gpt
mkpart primary ext3 2048s -1
quit
mkfs.ext3 /dev/sdx1
Of course replacing sdx with your actual device name.

I have a 9 year old Fedora Core 4 machine next to me with a 3 TB ext3 raid array, not an issue.

Last edited by suicidaleggroll; 07-28-2014 at 02:45 PM.
 
Old 07-28-2014, 02:45 PM   #3
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
http://www.cyberciti.biz/tips/fdisk-...eater-2tb.html

https://www.centos.org/forums/viewtopic.php?t=18480

there are a few examples on how to deal with a larger then 2.2T drive.
 
Old 07-28-2014, 03:34 PM   #4
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 295
Blog Entries: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the replies. I used gparted to apply GPT to the drive, then formatted as ext3. All of this was done on a CentOS 6 machine, btw. After gparted finished formatting the drive ext3, I took the drive back over to the CentOS 5 machine and it won't mount the drive. Here's the info from dmesg:

Code:
usb 1-8: new high speed USB device using ehci_hcd and address 10
usb 1-8: configuration #1 chosen from 1 choice
scsi9 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 10
usb-storage: waiting for device to settle before scanning
  Vendor: WD        Model: My Book 1230      Rev: 1050
  Type:   Direct-Access                      ANSI SCSI revision: 06
sdf: Spinning up disk........ready
SCSI device sdf: 732558336 4096-byte hdwr sectors (3000559 MB)
sdf: Write Protect is off
sdf: Mode Sense: 53 00 10 08
sdf: assuming drive cache: write through
SCSI device sdf: 732558336 4096-byte hdwr sectors (3000559 MB)
sdf: Write Protect is off
sdf: Mode Sense: 53 00 10 08
sdf: assuming drive cache: write through
 sdf: unknown partition table
sd 9:0:0:0: Attached scsi disk sdf
sd 9:0:0:0: Attached scsi generic sg5 type 0
  Vendor: WD        Model: SES Device        Rev: 1050
  Type:   Enclosure                          ANSI SCSI revision: 06
scsi 9:0:0:1: Attached scsi generic sg6 type 13
usb-storage: device scan complete
hfs: unable to find HFS+ superblock
VFS: Can't find ext3 filesystem on dev sdf.
And the attempt to mount:

Code:
mount /dev/sdf1 2TB/
mount: special device /dev/sdf1 does not exist
Code:
mount -t ext3 /dev/sdf 2TB/
mount: wrong fs type, bad option, bad superblock on /dev/sdf,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
GParted won't even recognize that /dev/sdf* exists.

parted:
Code:
parted /dev/sdf
Warning: Device /dev/sdf has a logical sector size of 4096.  Not all parts of GNU Parted support this at the moment, and the working code is HIGHLY
EXPERIMENTAL.

GNU Parted 1.8.1
Using /dev/sdf


(parted) print 
Error: Unable to open /dev/sdf - unrecognised disk label.                 
(parted) mklabel gpt                                                      
Error: Invalid argument during write on /dev/sdf                          
Retry/Ignore/Cancel? Cancel                                               
(parted) quit                                                             
Information: Don't forget to update /etc/fstab, if necessary.             

[root@sinister mnt]# parted /dev/sdf1
Error: Could not stat device /dev/sdf1 - No such file or directory.       
Retry/Cancel? Cancel
 
Old 07-28-2014, 04:30 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,093

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
well you WILL have SE issues if you try to make a mount point directly on "/"

se will stop you
instead of
" mount -t ext3 /dev/sdf 2TB/"
use
Code:
su -
mkdir /mnt/bigdrive
mount -t ext3 /dev/sdf /mnt/bigdrive
and did you really remove all traces of the MS Windows "recovery" partition and tools
and did you really replace the dos table with gpt

in the live cd "Gparted"
it is a few menus down to change the table

normally i would just use dd to zero out the first part of the drive ( let it run for 5 min. will be long enough )

ALSO 5.4 is so old it might not support ext3

format to ext2

as i recall there WAS ( now fixed in 5.5,5.6.. and 5.10) a issue with NTFS
it was read only and a very experimental write in 5.4

Last edited by John VV; 07-28-2014 at 04:38 PM.
 
Old 07-28-2014, 05:48 PM   #6
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 295
Blog Entries: 3

Original Poster
Rep: Reputation: Disabled
Windows never factored into the equation, FYI. This machine has never ran Windows. Also, I was in /mnt when I typed the mount command. Yes, I really changed the table to GPT. Then formatted to ext3. It needs to stay ext3, not 2.

I'm waiting on gparted on the centos 5 box (this time with alive cd) to complete, hoping I'll have better results, but I'm not optimistic this will work.
 
Old 07-28-2014, 09:27 PM   #7
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
few things.

1 yes CentOS 5.x can handle ext3 without issues.

2
Quote:
VFS: Can't find ext3 filesystem on dev sdf.
NOTE that their is no filesystem yet on that drive. not only do you have to gpt the drive, but you have to format it as well. until its formatted nothing can mount it.

3. as for the MS windows recovery partitions that is just part of the WD external HDDs.
 
Old 07-29-2014, 09:30 AM   #8
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 295
Blog Entries: 3

Original Poster
Rep: Reputation: Disabled
Ahhh, ok. Didn't know about the WD external drives shipping with some sort of Windows recovery partition.

So GParted finished with the GPT/EXT3 operation and I rebooted. Before rebooting, it showed 2.73TB on the newly-formatted ext3 filesystem.

After the machine came back up, I checked disk details using gdisk:

Code:
Using 1
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: 132D9026-07C1-46C8-BFC4-9E45D717F240
First sector: 256 (at 1024.0 KiB)
Last sector: 732558079 (at 2.7 TiB)
Partition size: 732557824 sectors (2.7 TiB)
Attribute flags: 0000000000000000
Partition name: ''

Command (? for help): p
Disk /dev/sdb: 732558336 sectors, 2.7 TiB
Logical sector size: 4096 bytes
Disk identifier (GUID): 8990EDED-9047-42EA-AE74-552C2D44450D
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 732558330
Partitions will be aligned on 256-sector boundaries
Total free space is 501 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1             256       732558079   2.7 TiB     8300
So, from your perspective, the line that says "First sector: 256 (at 1024 KiB)" - does this mean the possibility exists it's not removing the Windows Recovery partition or is this just a GPT thing? I'm new to GPT, but have read documentation concerning its strengths/weaknesses.

df output confirms the drive wasn't mounted. The mount command fails again:
Code:
mount -t ext3 /dev/sdb /mnt/2TB
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

mount -t ext3 /dev/sdb1 /mnt/2TB
mount: special device /dev/sdb1 does not exist
More information about the disk from fdisk -l:

Code:
fdisk -l

Disk /dev/sda: 146.8 GB, 146815733760 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          65      522081   83  Linux
/dev/sda2              66         326     2096482+  82  Linux swap / Solaris
/dev/sda3             327       17849   140753497+  83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Note: sector size is 4096 (not 512)

WARNING: The size of this disk is 3.0 TB (3000558944256 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID 
partition table format (GPT).


Disk /dev/sdb: 3000.5 GB, 3000558944256 bytes
255 heads, 63 sectors/track, 45599 cylinders
Units = cylinders of 16065 * 4096 = 65802240 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       45600  2930233340   ee  EFI GPT
Thanks for all of your feedback. Perhaps someone down the road can also benefit from this process.

I'm wondering if it might not be a worthwhile test to separate the 2.73TB into something below 2.2TB?
 
Old 07-29-2014, 09:37 AM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,440

Rep: Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508
Quote:
Originally Posted by loadedmind View Post
Code:
parted /dev/sdf
Warning: Device /dev/sdf has a logical sector size of 4096.  Not all parts of GNU Parted support this at the moment, and the working code is HIGHLY
EXPERIMENTAL.
That is going to be a huge problem. Only very recent kernels have support for a 4KB logical sector size (4KB physical / 512B logical is fine), and that does not include your fairly old CentOS 5.4 kernel. You need at least kernel version 2.6.31 for that support.
 
Old 07-29-2014, 09:39 AM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,488

Rep: Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090Reputation: 2090
It looks to me like the problem might be caused by the 4k logical sector size. Most drives, even if they have a 4k physical sector, still present a 512B logical sector size to the OS for backwards compatibility. It doesn't appear that this drive is doing that, and your CentOS 5 system is not happy with it. Maybe you can somehow change the logical sector size of the disk? I've never run into that problem before so I have no experience there.

edit: too slow
 
Old 07-30-2014, 08:08 AM   #11
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 295
Blog Entries: 3

Original Poster
Rep: Reputation: Disabled
I've gone through GParted's menu options and I'm not seeing any options to change the 4k to 512, but I could be missing something. What do you all suggest to change this or is this even feasible?
 
Old 07-30-2014, 08:33 AM   #12
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,440

Rep: Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508
The logical sector size is not something you can change. The firmware either in the enclosure's USB bridge chip or in the drive itself determines that, and it would take a firmware change to alter it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Western Digital RE4 Drives vs Western Digital AV Drives krazybob Linux - Hardware 3 12-08-2013 03:43 AM
Western Digital 1 TB My Book won't stay powered down Ahaaa Linux - Hardware 5 05-12-2012 10:46 PM
Cannot connect to Western Digital World Book Drive via Mionet Software macden Linux - Hardware 7 10-25-2010 07:37 PM
Linux with Western Digital? bdoublegeez Linux - Newbie 6 10-03-2008 10:24 PM
Western Digital My Book Ext3 format reports "Ext3-fs: Journal inode is deleted" ChronusDark Linux - Desktop 3 10-31-2006 03:56 PM


All times are GMT -5. The time now is 04:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration