0

I have configured a 14 TB as RAID 5. How can I make it to two XFS partitions?

Details are as below:

Disk......cciss/c0d1: 14002.5 GB, 14002557116416 bytes 255 heads, 32 sectors/track, 3351561 cylinders Units = cylinders of 8160 * 512 = 4177920 bytes

the-wabbit
  • 40,319
  • 13
  • 105
  • 169
Arunjith
  • 108
  • 1
  • 1
  • 7

3 Answers3

1

First create a single partition (probably c0d1p0) using fdisk /dev/cciss/c0d1:

  • Press n to create a new partition, then select the defaults that span the whole disk.
  • Press t to select the partition type. Use fd - this selects the type "Linux LVM".

Then on to configure LVM:

pvcreate /dev/cciss/c0d1p0 # creates the physical volume - akin to formatting
vgcreate vgname /dev/cciss/c0d1p0 # creates the 'vgname' volume group
lvcreate -L 7000G -n lv1 vgname # creates the first logical volume
lvcreate -L 7000G -n lv2 vgname # creates the second logical volume
mkfs.xfs /dev/vgname/lv1 # creates the first fileystem
mkfs.xfs /dev/vgname/lv2 # creates the second filesystem

You can also create the physical volume directly on top of the raw disk; in that case use c0d1 instead of c1d1p0. It's probably better to partition it first, though, if possible.

If you want to skip LVM you can also just use fdisk to create two partitions (use +7000G when queried about the limit to only span the first half of the disk with the first partition) and create the filesystems on top of them:

mkfs.xfs /dev/cciss/c0d1p0 # creates the first fileystem
mkfs.xfs /dev/cciss/c0d1p1 # creates the second filesystem

Of course you'll lose the LVM flexibility.

Eduardo Ivanec
  • 14,531
  • 1
  • 35
  • 42
1

I would recommend using LVM for this. So, generally you just create 2 logical volumes of required size on your ...cciss/c0d1 device (i.e. pvcreate -> vgcreate -> 2 x lvcreate) and then format each logical volume with XFS. You may also want to align XFS to Raid array dimensions if you care about performance. Please have a look at my other reply for details.

Also, I would not allocate all the available space to these two volumes. This is in case you will need to grow one partition in a future but not the other. Also, you may decide to do snapshot backups. This leaves your options open. Note, that with XFS you will not be able shrink volume, only grow it.

dtoubelis
  • 4,579
  • 1
  • 28
  • 31
0

You should be able to just use any of the standard partition editors, e.g. parted, fdisk, cfdisk, or gparted (if you have a GUI). If they don't recognize the RAID devices, try using LVM. I have found some forum posts suggesting that LVM will recognize these drives.

wolfgangsz
  • 8,767
  • 3
  • 29
  • 34