[Techtalk] xfs repartitioning

James Sutherland j at sutherland.pw
Sat Oct 17 09:38:23 UTC 2015


On 17/10/2015 02:44, Meryll Larkin wrote:
> Requesting guidance from someone with experience in LARGE partitions & xfs
> file systems.

They are two separate issues, remember: you partition the disk, then you 
put some file system on it afterwards. XFS isn't involved in partitioning.

> I would like to reformat the 80T partition into 4 20T partitions - I need
> guidance with this.  Anyone?
...
> I am NOT a novice at all, but I am new at such large drives and xfs.  For
> example, I thought that I could use familiar fdisk (wrong).

Yes. Remember, the original partitioning system (known as MBR) was 
designed when disks were sized in megabytes; anything over, IIRC, 2T it 
just can't cope with, all the clever tricks people came up with to 
stretch capacity finally ran out, and since fdisk only understands MBR 
partitions, the disk is far too big for fdisk to cope.

For that size, you need the new style ("GPT") partition table instead. 
There's a GPT version of fdisk, called gdisk, or you can use one of the 
multi-purpose tools instead, like gparted as A Mani suggested in her reply.

> 1.  Least favorite but most likely to work:  run CentOS 6 installer again
> and reformat that one partition.  I have a vague idea about doing this, but
> if someone has done it, pointers would be appreciated.

The installer will just run something like gparted for you - easier to 
run it directly and avoid reinstalling.

> 2.  Use mkfs.xfs  but I am unsure about the syntax and don't know if I need
> to first do something else like write zeros to the 80 T partition.  Or will
> the -f (force) switch work?

No, bad idea. mkfs.xfs is for formatting partitions, not for creating them.

Apart from the fact you need the newer partition table format, you can 
treat this exactly as if you had an 80 G disk to be split into 4: delete 
the one big partition, create then format the four new ones, job done. 
Because of the size, you need the new GPT tools though: gdisk not fdisk, 
or GPartEd in GPT mode not MBR.


James.



More information about the Techtalk mailing list