View previous topic :: View next topic |
Author |
Message |
KayZee Apprentice


Joined: 15 Oct 2003 Posts: 202 Location: Arlington, VA
|
Posted: Fri Jun 18, 2010 9:55 pm Post subject: [SOLVED] Partitions > 2 TB: GPT and/or fdisk |
|
|
I have a Delll PowerEdge server with PERC4 hardware RAID 5 array. Its is 1.8 TB in size. I used fdisk to create and manage the partitions. Works fine.
I want to add a Dell MD1000 storage device. This uses the PERC6i card for the hardware array. It will give me over 5 TB of storage.
I am not sure how to partition it. I know that fdisk is limited to 2 TB partitions. I know that GPT will provide for much larger partitions.
Can fdisk and GPT co-exist? I would like to leave my existing 1.8 TB array alone and just work with the new storage device. I would need to use GPT to partition it. But I don't want install or use GPT only to find out it hurts my existing partitions created and managed with fdisk.
Or do I have to convert everything to GPT which means pretty much a complete reinstall.
Last edited by KayZee on Sun Jun 20, 2010 11:02 pm; edited 1 time in total |
|
Back to top |
|
 |
BradN Advocate


Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Fri Jun 18, 2010 10:11 pm Post subject: |
|
|
Having one set of devices partitioned with a DOS MBR and some partitioned with GPT shouldn't interfere with each other - the kernel should automatically guess the partitioning scheme (but don't have both on the same drive if such a thing is possible).
Now, even if you had to convert partitions to GPT, it wouldn't mean a complete reinstall, but it would mean you need to find the exact sector numbers for each partition and make sure the GPT partitions are recreated identically. I see no reason why this wouldn't be possible unless GPT adheres to strict larger block sizes (I doubt it). Again you shouldn't need to do this anyway.
Another option is using LVM and never putting a partition table on the thing at all, plus getting the freedom to create/delete/resize volumes within, and if so desired, you could migrate your original 1.8TB to LVM and have the option of pooling all the space together. |
|
Back to top |
|
 |
KayZee Apprentice


Joined: 15 Oct 2003 Posts: 202 Location: Arlington, VA
|
Posted: Sat Jun 19, 2010 12:34 am Post subject: |
|
|
LVM sounds interesting. My MD1000 storage device is 5 TB now but I can add more drives to grow it to about 14 GB.
So with LVM I don't need to do any partitioning? I am asking because on Gentoo Wiki http://en.gentoo-wiki.com the article on LVM says
Quote: | Step 1: Create partitions for PVs
First you have to create a partition on your disk to use as a LVM physical volume (PV). This means using fdisk, cfdisk or some other tool like that. This is done as usual, please see the Gentoo Handbook for details on how you use fdisk. Note that the partition type should be for LVM PV partitions. |
Or do I use fdisk to create partitions under 2 TB and then use LVM make one big space? |
|
Back to top |
|
 |
BradN Advocate


Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Sat Jun 19, 2010 1:22 am Post subject: |
|
|
To answer the last question first, I think you have to use GPT for drives > 2TB, not just individual partitions.
I believe normally they assume you want to use partitions because you may have a root partition that's not part of LVM, or other stuff involved (for example it may be impossible to boot from LVM, I'm not sure). But LVM should work without partitions, since when using it on top of a (software) RAID, the raid (md0) device doesn't use partitions (however the raid slices on the actual hard drives should have partitions of a special type to trigger software raid to assemble them automatically, but this is handled by your card and isn't part of LVM).
However, I did some quick googling on the topic and it seems that partitions are still the way to go in your situation because the RAID array may be expanded in the future, and apparently LVM doesn't have a built in mechanism to expand a physical volume (basically to tell it there is more disk space available on a device than before). The way they say to perform an expansion like this is making another partition in the new space and adding it as another physical volume, which works just as well except for needing another partition. Quick googling suggests that there's probably a workaround for this (the size is apparently just stored as a number in the LVM header), but it requires manual steps that would probably be best avoided on an important system.
LVM is a little awkward to learn at first, but once you understand the concepts of physical volumes, volume groups, and logical volumes it gets easier because almost all the commands start with one of these, like pvscan to instruct LVM to scan all devices for physical volumes. Combined with filesystems that can do online resizing, it makes a great setup for expandability and being able to move your data to a new device while the system is still running, and snapshots may be useful for backup purposes (briefly shut down databases and other services, start a read-only snapshot, restart the services, and create the backup from the snapshot which is in a consistent state and won't change until you're ready to delete it).
Like with software raid, you can always construct a test case out of loopback devices or dummy partitions and test what you're trying to do to make sure it works before doing it on your real data. |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23701
|
Posted: Sat Jun 19, 2010 2:24 am Post subject: |
|
|
BradN wrote: | However, I did some quick googling on the topic and it seems that partitions are still the way to go in your situation because the RAID array may be expanded in the future, and apparently LVM doesn't have a built in mechanism to expand a physical volume (basically to tell it there is more disk space available on a device than before). The way they say to perform an expansion like this is making another partition in the new space and adding it as another physical volume, which works just as well except for needing another partition. Quick googling suggests that there's probably a workaround for this (the size is apparently just stored as a number in the LVM header), but it requires manual steps that would probably be best avoided on an important system. | The LVM command pvresize appears to be able to grow or shrink a PV (physical volume). |
|
Back to top |
|
 |
BradN Advocate


Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Sat Jun 19, 2010 2:28 am Post subject: |
|
|
D'oh, maybe I was seeing old mailing list posts, gotta remember to check the dates on that stuff. You're absolutely right, this is apparently supported now. If I was at one of my gentoo machines I would have just checked locally for the command, but I just googled for pvexpand (the wrong name) and got led to that stuff.
So I guess in that case there's no need for partitions on your RAID device. |
|
Back to top |
|
 |
KayZee Apprentice


Joined: 15 Oct 2003 Posts: 202 Location: Arlington, VA
|
Posted: Sun Jun 20, 2010 11:09 pm Post subject: |
|
|
LVM worked great for me. No partitioning needed. The MD1000 appeared as /dev/sdb. (The original array is /dev/sda.) I have the entire space on the MD1000 setup in one big chuck of 3 TB. In the future I should be able to add disks to the MD1000 to expand the available space. |
|
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
|
|