View previous topic :: View next topic |
Author |
Message |
bulliver n00b
Joined: 31 Aug 2010 Posts: 26 Location: BC, Canada
|
Posted: Wed Sep 17, 2014 1:14 am Post subject: New HDD partitioning issues with ext4 [SOLVED] |
|
|
Hello,
Bought a brand new 3TB SATA hard drive and installed it into my box. Running into many issues simply trying to partition and create a file system on it, something that has always been easy before. The disk is for photos, and I simply want to use the entire drive for one partition. It does not need to be bootable, or anything like that.
As soon as I opened it with fdisk there is a message stating:
Code: | The size of this disk is 2.7 TiB (3000592982016 bytes). DOS partition table format can not be used on drives for volumes larger than (2199023255040 bytes) for 512-byte sectors. Use GUID partition table format (GPT). |
OK then, so I use 'g' to create a GPT partition table. I then add a single partition using the defaults (start sector 2048, end sector 5860533134). Write it, then run mkfs.ext4, however:
Code: |
mke2fs 1.42.10 (18-May-2014)
/dev/sde1 alignment is offset by 3584 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Creating filesystem with 536870911 4k blocks and 134217728 inodes
Filesystem UUID: a2e0972d-6bf8-4bc6-9c9c-8b09ec5a5f31
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
|
OK then, 512b sectors, 3584 / 512 = 7, so I fire up fdisk again and this time make 2055 the start sector.
Try mkfs.ext4 again and get the EXACT same error. So this alignment has nothing to do with sectors?
I do a bit of googling, and everyone who has this alignment warning seems to be setting up RAID. One thing I do see is to use parted to check alignment. So I do so:
Code: |
(parted) align-check minimal
Partition number? 1
1 aligned
(parted) align-check optimal 1
1 aligned
|
So parted seems to think the alignment is OK...
So I think whatever, and just mount the partition.
df -h gives me this:
Code: | /dev/sde1 2.0T 71M 2.0T 1% /root/test |
What?
fire up fdisk again:
Code: |
Device Start End Size Type
/dev/sde1 2048 5860533134 2.7T Linux filesystem
|
Where did those 700GB go?
Also, now everytime I open the disk in fdisk I get this:
Code: | The primary GPT table is corrupt, but the backup appears OK, so that will be used. |
...even when I make it from scratch every time. What's going on?
This is a brand new disk, there must be someway to set up a single partition that ext4 likes?
I have fdisk, cfdisk, parted, and even sfdisk installed here. Can someone shine some light on what my problem might be? _________________ "...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
Some codes I hack on: https://github.com/DarrenKirby
Last edited by bulliver on Wed Sep 17, 2014 2:07 am; edited 1 time in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
bulliver n00b
Joined: 31 Aug 2010 Posts: 26 Location: BC, Canada
|
Posted: Wed Sep 17, 2014 1:19 am Post subject: |
|
|
Uhm, good question. I have never used a single disk for one partition/file system before, I guess I thought it was necessary to have a partition before installing the filesystem.
Are you saying I just have to do a 'mkfs.ext4 /dev/sde'? _________________ "...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
Some codes I hack on: https://github.com/DarrenKirby |
|
Back to top |
|
|
bulliver n00b
Joined: 31 Aug 2010 Posts: 26 Location: BC, Canada
|
Posted: Wed Sep 17, 2014 1:25 am Post subject: |
|
|
Code: | /dev/sde 2.7T 73M 2.7T 1% /root/test |
..well there you go. Learn something new everyday. _________________ "...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
Some codes I hack on: https://github.com/DarrenKirby |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Wed Sep 17, 2014 1:56 am Post subject: |
|
|
If you use /dev/sde to make an ext4 filesystem, check at which sector the filesystem start. It can scrap the filesystem if you install a boot loader in the Mbr if the filesystem start before sector 2048.
By default, mkfs do not allow to make a filesystem on an whole disk I think. _________________ Paul |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Wed Sep 17, 2014 2:01 am Post subject: |
|
|
Logicien wrote: | If you use /dev/sde to make an ext4 filesystem, check at which sector the filesystem start. It can scrap the filesystem if you install a boot loader in the Mbr if the filesystem start before sector 2048.
By default, mkfs do not allow to make a filesystem on an whole disk I think. |
OP clearly stated there is no booting from this device.
Your second statement is groundless, too. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Wed Sep 17, 2014 2:09 am Post subject: |
|
|
I have'nt say I was on solid ground. _________________ Paul |
|
Back to top |
|
|
bulliver n00b
Joined: 31 Aug 2010 Posts: 26 Location: BC, Canada
|
Posted: Wed Sep 17, 2014 2:11 am Post subject: |
|
|
Yes, my issue is as good as solved. I honestly didn't know you could do that. Just assumed at least a single partition was necessary to install the file system.
Though, if anyone is bored, I still wouldn't mind knowing why mkfs.ext4 was so upset, and how to fix such an alignment problem in case it crops up some time in the future. _________________ "...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
Some codes I hack on: https://github.com/DarrenKirby |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Wed Sep 17, 2014 2:35 am Post subject: |
|
|
Your disk is new. It can be the fasted you have. In that case, interesting would be to put an operating system on it. You will have to make partitions. You can schrink your whole disk filesystem and put it in a partition that will be smaller than the whole disk. That will free space to create other partitions.
With GPT partition tables, the Mbr is not use because most GPT disks are in an EFI boot mode that use an EFI partition to store bootloaders. The start of the whole disk filesystem is important in DOS/MBR where a bootloader is store starting a the first sector and can use sectors up to 2047 (first sector is in fact sector 0). _________________ Paul
Last edited by Logicien on Wed Sep 17, 2014 2:44 am; edited 2 times in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Wed Sep 17, 2014 2:37 am Post subject: |
|
|
Logicien wrote: | Your disk is new. It can be the fasted you have. In that case, interesting would be to put an operating system on it. You will have to make partitions. You can schrink your whole disk filesystem and put it in a partition that will be smaller than the whole disk. That will free space to create other partitions.
With GPT partition tables, the Mbr is not use because most GPT disks are in an EFI boot mode that use an EFI partition to store bootloaders. The start of the whole disk filesystem is important in DOS/MBR where a bootloader is store in the first sector. |
My hat is off on this one. What is your favorite drink? _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Wed Sep 17, 2014 2:45 am Post subject: |
|
|
If you have something more intelligent than me to say, I am open. It should be easy according to you. _________________ Paul |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|