Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
What OS are you using? –  wolfgangsz May 21 '11 at 10:46
    
RedHat 5.4 , 64 bit –  Arunjith May 21 '11 at 11:23

3 Answers 3

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer
    
Thanks wolfgangsz –  Arunjith May 23 '11 at 7:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.