I want to create one large LVM volume on the 2.5TB device. I seem to be able to create an LVM physical volume on the whole device, but I've read that it's better to create a single large partition for LVM as the existence of the partition informs other apps that the disk is in use which prevents accidental corruption of the LVM volume.
Creating a large partition of this size under Centos is proving to be surprisingly difficult. I am unable to get fdisk to see more that 513GB on the whole unit, and once I create one 513GB partition, I can't create any additional partitions ("no sectors available"). I've read that fdisk has trouble with large partitions and that the GNU parted program should be used instead. Problem here is that GNU parted doesn't know about many file systems and doesn't know anything about LVM. So, following some steps on the LVM Howto, I used parted to create a large ext2 partition, then used fdisk to change the type to 8e for LVM. Once I do this, I see that the partition is now 2TB in size -- close, but .5 TB short.
Why is this so difficult? How should large partitions be created under Centos?
Any help is appreciated.
Tom
Once upon a time Sunday 04 February 2007 10:04 pm, t m wrote:
I want to create one large LVM volume on the 2.5TB device. I seem to be able to create an LVM physical volume on the whole device, but I've read that it's better to create a single large partition for LVM as the existence of the partition informs other apps that the disk is in use which prevents accidental corruption of the LVM volume.
Why is this so difficult? How should large partitions be created under Centos?
msdos disk labels are capable of supporting only 2tb so you need to use gpt or split your disks up in 2tb chunks. parted will let you create what you need as far as got labels goes .
One big issue to note is that you can not boot from a disk labeled with gpt labels.
Dennis
Thanks Dennis. I think you pointed me in the right direction.
The solution seems to have been to not worry about setting the partition ID to 8e (LVM). I used GNU parted to create one big 2.5TB partition of type GPT. I then just used the LVM commands to create the physical, virtual, and logical volumes which went without a hitch. Finally, I formatted the 2.5TB LVM partition with mkfs.ext3 which seems to have worked.
Here's roughly what I did in case anyone needs a cheat sheet:
# parted /dev/sdb (parted) mklabel gpt (parted) mkpart primary 0 2.5T (parted) quit
# pvcreate /dev/sdb1 # vgcreate myvolume /dev/sdb1 # lvcreate -L 2.5TB myvolume
# mkfs.ext3 /dev/mapper/myvolume-lvol0
Thanks again, Tom
On 2/4/07, Dennis Gilmore dennis@ausil.us wrote:
Once upon a time Sunday 04 February 2007 10:04 pm, t m wrote:
I want to create one large LVM volume on the 2.5TB device. I seem to be able to create an LVM physical volume on the whole device, but I've read that it's better to create a single large partition for LVM as the existence of the partition informs other apps that the disk is in use which prevents accidental corruption of the LVM volume.
Why is this so difficult? How should large partitions be created under Centos?
msdos disk labels are capable of supporting only 2tb so you need to use gpt or split your disks up in 2tb chunks. parted will let you create what you need as far as got labels goes .
One big issue to note is that you can not boot from a disk labeled with gpt labels.
Dennis _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
# parted /dev/sdb (parted) mklabel gpt (parted) mkpart primary 0 2.5T (parted) quit
# pvcreate /dev/sdb1
You can also skip the first part and do:
# pvcreate /dev/sdb
You don't really need partitions. If you will use the entire disk for one single VG, then just use the entire disk :)
Good point, but I did this do to a section in the LVM Howto indicating that a whole disk PV (as apposed to a partition spanning a whole disk) was not recommended. The reasoning seems to be that other OS applications that aren't LVM aware will see the disk as unused and will potentially corrupt the LVM data.
On 2/5/07, Morten Torstensen morten@mortent.org wrote:
# parted /dev/sdb (parted) mklabel gpt (parted) mkpart primary 0 2.5T (parted) quit
# pvcreate /dev/sdb1
You can also skip the first part and do:
# pvcreate /dev/sdb
You don't really need partitions. If you will use the entire disk for one single VG, then just use the entire disk :)
--
//Morten Torstensen //Email: morten@mortent.org //IM: Cartoon@jabber.no morten.torstensen@gmail.com
And if it turns out that there is a God, I don't believe that he is evil. The worst that can be said is that he's an underachiever. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos