Hi there, I have a system with the following:
# fdisk -l
Disk /dev/sda: 80.0 GB, 80000000000 bytes 255 heads, 63 sectors/track, 9726 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 9471 75971385 83 Linux /dev/sda3 9472 9726 2048287+ 82 Linux swap / Solaris
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sdb1 * 1 121601 976760001 fd Linux raid autodetect
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sdd1 * 1 121601 976760001 fd Linux raid autodetect
Disk /dev/md0: 1000.2 GB, 1000202174464 bytes 2 heads, 4 sectors/track, 244189984 cylinders Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table
Now I just added a new hard drive (sdc).
I was wondering how to go about (if possible) to add this drive to my existing partitions with LVM.
Now I never setup this system (Another person had), and if i am reading the above right, it appears as though they did not use LVM for the raid.
The system has the OS on a standalone drive, the home folder is on the two raided drives. I was hoping to extend my home folder to take advantage of my new drive.
Recommendations?
d
2009/4/25 dnk d.k.emaillists@gmail.com
Hi there, I have a system with the following:
<snip>
Disk /dev/md0: 1000.2 GB, 1000202174464 bytes 2 heads, 4 sectors/track, 244189984 cylinders Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table
Now I just added a new hard drive (sdc).
I was wondering how to go about (if possible) to add this drive to my existing partitions with LVM.
Now I never setup this system (Another person had), and if i am reading the above right, it appears as though they did not use LVM for the raid.
The system has the OS on a standalone drive, the home folder is on the two raided drives. I was hoping to extend my home folder to take advantage of my new drive.
Recommendations?
It should be possible to extend your raid1 to a third drive pretty easily which would give you an extra 500GB of space...
You'll probably want to look at mdadm using grow to take the array up to 3 drives and manage to add the new disk and once you're done extending the array, you'll likely want to look at resize2fs to extend the filesystem to use the extra space...
If you wanted to get a whole extra TB of space rather than just 500GB, it would be a bit more complex, the simplest solution I can think of right now would be something along the lines of backing up the existing home folder to the new drive, destroying the existing array then creating a new degraded raid5 array across the two old disks, restoring the home folder back to the new array before adding the new disk into the array...
Of course... backups recommended before doing this...
d
Hi there,
Just to clarify; You have two 1TB disk that are mirrored (raid 1)?
Normally a mirror can't be extended as the mirror is between block 0 to 1000000 (for example if 1000000 was the end of the drive) on one drive with block 0 to 1000000 on the other (if you have used block level mirror, you could of chosen byte level mirroring?). With RAID 1, mirrors require an even number of disks.
You haven't said how large you knew drive (sdc) is? Is it 500GBs or 1000? If for example it was 1000, you would need to buy another 1000GB drive, and set up a second mirror with the two new drives. So now you have two 1TB mirrors and stripe across them (http://en.wikipedia.org/wiki/Nested_RAID_levels#RAID_10_.28RAID_1.2B0.29) giving you 2TB of space that is mirrored also for redundancy (then you would have the redundancy of mirroring plus the speed of striping, or near there).
You could go the route of turning it into a Raid 5 as mentioned by "D" which would give you a middle man in that its a bit faster than a mirror (but not as fast as a stripe) and you still have some redundancy against a drive failure (but not as much as a RAID 1+0).
How is you RAID set up, is it software or hardware? If hardware, what raid controller/card are you using? How much are you looking to extend the storage capacity by? How much does redundancy matter to you? Do you just want speed (i.e. a stripe, RAID 0)?
A few more details would be great.
James ;)
-----BEGIN GEEK CODE BLOCK----- Version: 3.1 GIT/MU/U dpu s: a--> C++>$ U+> L++> B-> P+> E?> W+++>$ N K W++ O M++>$ V- PS+++ PE++ Y+ PGP t 5 X+ R- tv+ b+> DI D+++ G+ e(+++++) h--(++) r++ z++ ------END GEEK CODE BLOCK------
2009/4/28 James Bensley jwbensley@gmail.com
Hi there,
Just to clarify; You have two 1TB disk that are mirrored (raid 1)?
Normally a mirror can't be extended as the mirror is between block 0 to 1000000 (for example if 1000000 was the end of the drive) on one drive with block 0 to 1000000 on the other (if you have used block level mirror, you could of chosen byte level mirroring?). With RAID 1, mirrors require an even number of disks.
Linux software raid1(e) allows any number of drives to be used such that each block exists on two devices (i.e block 0 on drives a and b, block 1 on drives c and a, block 2 on drives b and c etc...), and it's possible to grow an existing array onto additional drives, though it could take some time as the data gets redistributed across the disks.
How is you RAID set up, is it software or hardware? If hardware, what
raid controller/card are you using? How much are you looking to extend the storage capacity by? How much does redundancy matter to you? Do you just want speed (i.e. a stripe, RAID 0)?
His fdisk output shows that software raid is being used such that the filesystem exists directly on top of the md0 device...
d
Thanks for the clarification,
I have no experience with software raid only hardware which you can probably tell from my response as it was slightly bias to hardware raid options but hey, that's my two pence ;)
James.
-----BEGIN GEEK CODE BLOCK----- Version: 3.1 GIT/MU/U dpu s: a--> C++>$ U+> L++> B-> P+> E?> W+++>$ N K W++ O M++>$ V- PS+++ PE++ Y+ PGP t 5 X+ R- tv+ b+> DI D+++ G+ e(+++++) h--(++) r++ z++ ------END GEEK CODE BLOCK------
On 28-Apr-09, at 2:48 AM, James Bensley wrote:
You haven't said how large you knew drive (sdc) is? Is it 500GBs or 1000? If for example it was 1000, you would need to buy another 1000GB drive, and set up a second mirror with the two new drives. So now you have two 1TB mirrors and stripe across them (http://en.wikipedia.org/wiki/Nested_RAID_levels#RAID_10_.28RAID_1.2B0.29 ) giving you 2TB of space that is mirrored also for redundancy (then you would have the redundancy of mirroring plus the speed of striping, or near there).
Sorry about that, it was another 1 TB drive. I forgot to include that detail....
d
dnk wrote:
Hi there, I have a system with the following:
# fdisk -l
Disk /dev/sda: 80.0 GB, 80000000000 bytes 255 heads, 63 sectors/track, 9726 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 9471 75971385 83 Linux /dev/sda3 9472 9726 2048287+ 82 Linux swap / Solaris
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 121601 976760001 fd Linux raid autodetect
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 * 1 121601 976760001 fd Linux raid autodetect
Disk /dev/md0: 1000.2 GB, 1000202174464 bytes 2 heads, 4 sectors/track, 244189984 cylinders Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table
Now I just added a new hard drive (sdc).
I was wondering how to go about (if possible) to add this drive to my existing partitions with LVM.
Now I never setup this system (Another person had), and if i am reading the above right, it appears as though they did not use LVM for the raid.
The system has the OS on a standalone drive, the home folder is on the two raided drives. I was hoping to extend my home folder to take advantage of my new drive.
Recommendations?
WHat size is the new disk? If it's 1GB, you have many options. If not, there will be trade offs getting it into your system.
If 1G, then
- add disk to md0 for 3 way mirror. no increase in space, added safety/redundancy, current data kept.
- convert to raid5 increase in space, slight reduction in safety/redundancy, current data kept.
- convert all to LVM flexible, largest storage, no redundancy, current data kept.
- convert to raid0 fast, largest storage, no redundancy, not flexible as LVM, destroys current data.
If the third disk in not 1GB, then
- convert to any raid available space will be dictated by the smallest device/partition, wastes disk space, same other raid features as above.
- convert all to LVM flexible, largest storage, no redundancy, current data kept.
- keep md0 as is, add sdc as a separate mount. easy, not flexible storage, reduced safety/redundancy, current data kept.
- trade for a 1G disk.