LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to format a 4TB external HDD into ext3 in CentOS? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-format-a-4tb-external-hdd-into-ext3-in-centos-4175473645/)

jollibee 08-16-2013 01:35 PM

How to format a 4TB external HDD into ext3 in CentOS?
 
I got a Seagate 4TB external HDD (Seagate 4TB Black External Hard Drive STBV4000100) for my CentOS linux computer.

I'm trying to follow the formatting instructions on this website for HDD >2TB:
http://www.cyberciti.biz/tips/fdisk-...eater-2tb.html

I was able to do the first two commands:

(1) [root@-lab ~]# fdisk -l /dev/sdd
(2) [root@-lab ~]# parted /dev/sdd

However, when I go to "mklabel gpt", it's giving me an error?

Is there a way I can get around it? Thank you.

Btw, I use "mkfs.ext3" command before this but it only formatted the 2TB. So I have to use the gpt. Thanks.

Before this, I was able to use the instructions to format a 3TB internal HDD and it worked. But not on this 4TB external HDD.

Kindly help. Thank you very much in advance.


**********************************************************************************
[root@-lab ~]# fdisk -l /dev/sdd
WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.
Note: sector size is 4096 (not 512)

WARNING: The size of this disk is 4.0 TB (4000787025920 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/sdd: 4000.7 GB, 4000787025920 bytes
255 heads, 63 sectors/track, 60800 cylinders
Units = cylinders of 16065 * 4096 = 65802240 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 60801 3907018576 ee EFI GPT




[root@-lab ~]# parted /dev/sdd
Warning: Device /dev/sdd 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/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.


(parted) mklabel gpt
Error: Invalid argument during write on /dev/sdd
Retry/Ignore/Cancel? cancel

John VV 08-16-2013 01:53 PM

your best bet over the built in gparted in CentOS
is to use the live CD

current os's automount drives and the 4 tb drive can be auto remounted WHILE using gparted from the running os
-- yes this can be disabled , but it is just easier to use the live cd

You might also want to partition it to 4 1 tb partitions

or use ext4 format
and use a gpt table and NOT the ms dos table
http://en.wikipedia.org/wiki/GUID_Partition_Table

also you might want to zero out the first part of the drive , then make a new table and reformat
you will only need to zero out a small part of the drive
Code:

dd if=/dev/zero of=/dev/The4TB.drive
the bs= part can be left to the default 512 , just omit it for that

just let that run for 5 to 10 min. and the old table will be gone

jollibee 08-16-2013 02:00 PM

Hi John,

So does that mean I have to download gparted from CentOS website?

I haven't tried using a live CD before for formatting. How does this work?

I really appreciate your help.

Thanks.

Quote:

Originally Posted by John VV (Post 5010533)
your best bet over the built in gparted in CentOS
is to use the live CD

current os's automount drives and the 4 tb drive can be auto remounted WHILE using gparted from the running os
-- yes this can be disabled , but it is just easier to use the live cd

You might also want to partition it to 4 1 tb partitions

or use ext4 format
and use a gpt table and NOT the ms dos table
http://en.wikipedia.org/wiki/GUID_Partition_Table


jollibee 08-16-2013 02:05 PM

Partitioning to 4 1TB - what does the command codes look like?

Thank you.

Quote:

Originally Posted by jollibee (Post 5010536)
Hi John,

So does that mean I have to download gparted from CentOS website?

I haven't tried using a live CD before for formatting. How does this work?

I really appreciate your help.

Thanks.


John VV 08-16-2013 02:34 PM

I recommend the live cd over the one installed from yum , because it is normally WAY easier to use than the terminal "parted"
-- unless you are learning to do EVERYTHING without a gui and/or on remote servers

http://gparted.sourceforge.net/

the 64 bit OS version is here
http://sourceforge.net/projects/gpar...able/0.16.1-1/

burn the iso image to a cd
pop it into the drive
and reboot
it will auto boot into the mini os on the cd and from there it is fairly self explanatory
the gui is rather intuitive

now depending on the hardware you might have to manually set the VGA settings and screen size during boot
but the "auto" set up ( the first option) should work for most computers )

and NOTHING will be done to the drive UNTIL you click the green "check" and say "yes" to the warning
so you can undo EVERYTHING very easily up to that point

jollibee 08-16-2013 02:47 PM

Thank you very much.

Btw, I tried the ff. command:
[root@-lab ~]# dd if=/dev/zero of=/dev/sdd1

It's not done yet. How long do I have to wait? I think it's more than 10 mins.

Thank you.







Quote:

Originally Posted by John VV (Post 5010550)
I recommend the live cd over the one installed from yum , because it is normally WAY easier to use than the terminal "parted"
-- unless you are learning to do EVERYTHING without a gui and/or on remote servers

http://gparted.sourceforge.net/

the 64 bit OS version is here
http://sourceforge.net/projects/gpar...able/0.16.1-1/

burn the iso image to a cd
pop it into the drive
and reboot
it will auto boot into the mini os on the cd and from there it is fairly self explanatory
the gui is rather intuitive

now depending on the hardware you might have to manually set the VGA settings and screen size during boot
but the "auto" set up ( the first option) should work for most computers )

and NOTHING will be done to the drive UNTIL you click the green "check" and say "yes" to the warning
so you can undo EVERYTHING very easily up to that point


John VV 08-16-2013 03:18 PM

for a usb2 4 tb drive
2 to 3 weeks
a usb3 4tb drive a few days

but all you need to do is remove the old table and then create a new one

5 to 10 minutes will be fine .

jollibee 08-16-2013 03:43 PM

Thank you. Sorry I have to ask again for the codes.

Do I do this after using the live CD?

Then use the codes: dd if=/dev/zero of=/dev/The4TB.drive?

How can I write that I only need to remove the old table and then create a new one?

Thank you again for your patience.



Quote:

Originally Posted by John VV (Post 5010578)
for a usb2 4 tb drive
2 to 3 weeks
a usb3 4tb drive a few days

but all you need to do is remove the old table and then create a new one

5 to 10 minutes will be fine .


John VV 08-16-2013 03:56 PM

from the live cd you can also just delete the old partition table
but for the terminal command you do that from the os and NOT the cd

in the gparted gui there is a button on the top menu that creates a layout table

jollibee 08-19-2013 09:20 AM

Hello John,

Thank you very much! The GParted cd (iso) is working now. At first, it's giving me a bunch of Greek letters and numbers when I tried to hit something with the "keymap" word. Then I realized that my keyboard is not connected to the USB port.

GParted is working now and is currently creating primary partition in the 4TB HDD.

I am really thankful for your help!


Quote:

Originally Posted by John VV (Post 5010598)
from the live cd you can also just delete the old partition table
but for the terminal command you do that from the os and NOT the cd

in the gparted gui there is a button on the top menu that creates a layout table


lleb 08-19-2013 09:44 AM

i used a combination of these two links when i formatted my 4TB (reality is only 3.5TB thanks to stupid hard drive manufactures not using correct numbers to display their calculations of size.) in my CentOS 6.4 box a month back or so:

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

http://www.newitperson.com/2011/02/c...ger-2tb-linux/

jollibee 08-19-2013 10:44 AM

I was able to partition the 4TB using GParted CD. The problem is I cannot mount it. The fdisk can read that a /dev/sdd1 exists. But the ls /dev is not showing the partitioned drive. Mount command cannot find the /dev/sdd1 drive.

I asked around here and they said it has something to do with CentOS 5.9. But I need CentOS 5 since I have a software that runs with it.






Quote:

Originally Posted by jollibee (Post 5011891)
Hello John,

Thank you very much! The GParted cd (iso) is working now. At first, it's giving me a bunch of Greek letters and numbers when I tried to hit something with the "keymap" word. Then I realized that my keyboard is not connected to the USB port.

GParted is working now and is currently creating primary partition in the 4TB HDD.

I am really thankful for your help!


jollibee 08-19-2013 10:45 AM

I used the first website in partitioning my 3TB and it works. But none of these works with the 4TB. :(


Quote:

Originally Posted by lleb (Post 5011914)
i used a combination of these two links when i formatted my 4TB (reality is only 3.5TB thanks to stupid hard drive manufactures not using correct numbers to display their calculations of size.) in my CentOS 6.4 box a month back or so:

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

http://www.newitperson.com/2011/02/c...ger-2tb-linux/



All times are GMT -5. The time now is 11:37 AM.