LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Partiotioing a 6TB hadr drive using parted-getting error when running mklabel (https://www.linuxquestions.org/questions/linux-newbie-8/partiotioing-a-6tb-hadr-drive-using-parted-getting-error-when-running-mklabel-4175549393/)

mike_andy52 07-30-2015 04:27 PM

Partiotioing a 6TB hadr drive using parted-getting error when running mklabel
 
Hello all,
I have a 6TB USB drive attached to a redhat server. I am trying to create a 3TB partition on it. I am trying to use parted as with fdisk we cannot create partitions more than 2TB.
When i run parted and execute the command mklabel GPT, i get the below error:

# parted /dev/sdb
Warning: Device /dev/sdb 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/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
Error: Invalid argument during write on /dev/sdb
Retry/Ignore/Cancel? Cancel
(parted) q


Please advice..

PTrenholme 07-30-2015 05:02 PM

That's a rather old version of parted.
Code:

$ parted --version
parted (GNU parted) 3.2
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by <http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.

since you're using a Redhat server, you should update your system from the repositories.

rknichols 07-30-2015 09:39 PM

That parted version 1.8.1 suggests that the server is running RHEL 5, which will go EOL in less than 2 years (March, 2017), and that is the most recent version available for RHEL 5. Looks like you've got hardware that just isn't well supported in RHEL 5. You might be able to work around the problem by connecting the disk to another, newer system for partitioning.

mike_andy52 07-31-2015 10:32 AM

Thank you for the reply. As i see 1.8 version is the latest version for parted on RHEL5.
Can i try to use fdisk instead of parted to create a partition less than 1TB on a 6TB hard drive? When i run fdisk /dev/sdb and create a partition of size 250 GB (256000MB), it is creating a default partition os size 69 GB irrespective of how much size i specify while creating the partition? Please advice.

# fdisk /dev/sdb
Note: sector size is 4096 (not 512)

The number of cylinders for this disk is set to 91199.
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)

WARNING: The size of this disk is 6.0 TB (6001140957184 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).


Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-91199, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-91199, default 91199): +256000M

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


I mounted the partition /dev/sdb1 on /mnt/backups. See below. The space is showing as 69GB.

/dev/sdb1 69G 85M 66G 1% /mnt/backups

rknichols 07-31-2015 01:42 PM

I believe that the RHEL 5 version of fisdk is not GPT-aware and is limited to an MS-DOS partition table. An MS-DOS partition table cannot address any part of the disk beyond 2 TiB, so you would be wasting about 2/3 of that 6 TB disk.

rknichols 07-31-2015 01:49 PM

I just noticed this:
Quote:

Originally Posted by mike_andy52 (Post 5398942)
# fdisk /dev/sdb
Note: sector size is 4096 (not 512)

I read that as 4096 logical / 4096 physical. I'm not sure the kernel in RHEL 5 even supports a 4096-byte logical sector size. You are getting way beyond what that old OS was intended to handle. Since this is RHEL and you presumably have a subscription, I suggest you call Red Hat and ask.


All times are GMT -5. The time now is 12:44 PM.