Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support
Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support
Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support
Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support


Go Back   Australian Media Center Community > Linux Server & Networking Support > Linux Home Server

Community Information

Reply
 
Thread Tools
Old 7th October 2008, 11:11 AM   #1 (permalink)
 
dgaust's Avatar
Status dgaust is Offline:
Location Wollongong, NSW
ActivityPosts: 3,063
Reputation & Thanks Support Rating:
dgaust dgaust dgaust dgaust dgaust dgaust dgaust dgaust dgaust
Points Earned: 1229

dgaust has been Thanked 479 times in 428 posts
dgaust's
Media Center
Expand RAID5

I'm trying to expand a RAID5 array that on an Adaptec 2410SA RAID card. It's currently a 3 drive array, and I've just added a fourth.

The expansion went ok, but now when i try to take advantage of extra space by expanding the partition using gparted I get the following error:

"A partition cannot have a length of -1 sectors"

and it won't complete.

The size of the partition if it completed would be approx 1.5tb.

I can however create a partition for the unallocated space, but I would like to avoid this if possible.

Attached is a copy of the output from fdisk -l

Code:
 	Disk /dev/sda: 1500.2 GB, 1500216557568 bytes
255 heads, 63 sectors/track, 182390 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00058d95

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1      121593   976695741   83  Linux
/dev/sda2          121594      182390   488351902+  83  Linux

Disk /dev/sdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1549f232

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        9640    77433268+  83  Linux
/dev/sdb2            9641        9733      747022+   5  Extended
/dev/sdb5            9641        9733      746991   82  Linux swap / Solaris
The output of df -H

Code:
 	Filesystem             Size Used Avail Use% Mounted on
/dev/sdb1               79G   7.7G    68G  11% /
varrun                 131M   246k   131M   1% /var/run
varlock                131M      0   131M   0% /var/lock
udev                   131M    74k   131M   1% /dev
devshm                 131M    13k   131M   1% /dev/shm
lrm                    131M    41M    91M  32% /lib/modules/2.6.24-19-generic/volatile
/dev/sda2              497G   208M   471G   1% /media/disk
/dev/sda1              985G   742G   193G  80% /media/Media
So I currently have the RAID array separated into two partitions /media/Media and /media/disk. /media/disk is empty, so I can delete the partition without loss.

Ideally I would like to expand the partition to encompass the whole drive. Any ideas?
__________________
Abit Fatal1ty F-190HD | Quad Core Q6600 2.4Ghz | 2GB Kingston DDR2 667 | Asus 8500GT | WD 250GB, Samsung 500GB | SPDIF Out | Pioneer BDC-S02BK Blu-Ray | DigitalNow Dual Hybrid S2 | Vista Ultimate | Antec Fusion v2

Asus M3N78 Pro | AMD 4850e | 2GB Kingston DDR2 800 | 6x500gb Samsung | DVD-RW | DigitalNow Dual Digital PCI-E | Vista Ultimate | Antec 4U22EPS650

Sign the myEPG petition. Go on, you know you want to.....
  Reply With Quote
Old 7th October 2008, 12:36 PM   #2 (permalink)
MC Graduate
No Avatar
Status itr2401 is Offline:
Location Melbourne
ActivityPosts: 63
Reputation & Thanks Support Rating:
itr2401
Points Earned: 32

itr2401 has been Thanked 11 times in 11 posts
itr2401's
Media Center
Re: Expand RAID5

Is your existing partition inside a logical volume?

The way I have expanded my raid (using OpenFiler mind you - but should be similar) is to increase the size of the logical volume before increasing the size of the partition.

Is there any logical volume manager's you can look at / use to see what / where things are at?
  Reply With Quote
Old 7th October 2008, 01:45 PM   #3 (permalink)
 
vlad's Avatar
Status vlad is Offline:
Location Sydney
ActivityPosts: 4,794
Reputation & Thanks Support Rating:
vlad vlad vlad vlad vlad vlad vlad vlad vlad
Points Earned: 1136

vlad has been Thanked 334 times in 288 posts
vlad's
Media Center
Re: Expand RAID5

I would try to create a partition from free space. If you can do it than something wrong with gparted.
In linux if you have another partition you you can join them, Arkay probably knows .
__________________
Linux World Domination... One Joke at a Time :)
  Reply With Quote
Old 7th October 2008, 01:50 PM   #4 (permalink)
 
dgaust's Avatar
Status dgaust is Offline:
Location Wollongong, NSW
ActivityPosts: 3,063
Reputation & Thanks Support Rating:
dgaust dgaust dgaust dgaust dgaust dgaust dgaust dgaust dgaust
Points Earned: 1229

dgaust has been Thanked 479 times in 428 posts
dgaust's
Media Center
Re: Expand RAID5

I've been able to create another partition from the free space, and I guess I could create a logical volume from that.... I think that's how it could work.

Not sure of the process though.
__________________
Abit Fatal1ty F-190HD | Quad Core Q6600 2.4Ghz | 2GB Kingston DDR2 667 | Asus 8500GT | WD 250GB, Samsung 500GB | SPDIF Out | Pioneer BDC-S02BK Blu-Ray | DigitalNow Dual Hybrid S2 | Vista Ultimate | Antec Fusion v2

Asus M3N78 Pro | AMD 4850e | 2GB Kingston DDR2 800 | 6x500gb Samsung | DVD-RW | DigitalNow Dual Digital PCI-E | Vista Ultimate | Antec 4U22EPS650

Sign the myEPG petition. Go on, you know you want to.....
  Reply With Quote
Old 7th October 2008, 02:43 PM   #5 (permalink)

 
arkay's Avatar
Status arkay is Online:
Location Melbourne
ActivityPosts: 7,240
Reputation & Thanks Support Rating:
arkay arkay arkay arkay arkay arkay arkay arkay arkay arkay arkay
Points Earned: 1613

arkay has been Thanked 273 times in 213 posts
arkay's
Media Center
Re: Expand RAID5

okedokey.

This is what you have:

/dev/sda2 497G 208M 471G 1% /media/disk
/dev/sda1 985G 742G 193G 80% /media/Media

Option 1

To do what you want to do you should be using lvm. You can easily create a new volume with /dev/sda2. The problem you've got is that you can't add the /dev/sda1 volume to the volume group and keep the data. The volumes needed to be set up before you started.

Have you got any way to back up what is on /dev/sda1?

If you have it's not so bad. If not then you'll need to create a volume group including /dev/sda2 (the empty one), move as much data as you can out of /media/Media to /media/disk and then use gparted to reduce the size of /dev/sda1 to create a new /dev/sda3. Add /dev/sda3 to the volume group, move more data out of /dev/sda1 to the volume group, rinse and repeat until all data is off /dev/sda1, then add /dev/sda1 to the volume group. It's messy and risky reducing the size of partitions though. So if you can get the data off, blow away /dev/sda1 and combine sda1 and sda2 into a single volume group under lvm control, you'll be better off in the long run.

Option 2

Another option, but equally as risky, is to try and do what gparted is trying manually.

This is your partition table on the array:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 121593 976695741 83 Linux
/dev/sda2 121594 182390 488351902+ 83 Linux

Print the above out or copy to a text file somewhere.

Go into fdisk manually:

sudo su -
umount -a (to unmount everything on /dev/sda).
fdisk /dev/sda

delete sda1 and sda2 from the partition table.
Create a new sda1 with Id 83 (linux) so it then would look like:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 182390 1465047643 83 Linux

write the partition table to disk (the data should? remain intact).

That will take care of the partition but the underlying filesystem will be screwed. You need to extend it to make the rest of the space available.

Asuming it's ext2 or ext3:

resize2fs /dev/sda1

after that fsck it:

fsck /dev/sda1

Finally:

mount -a

You should see the whole space allocated to the one partition and available in /dev/Media.

BUT!!!. If the data on that disk is important I WOULDN"T DO IT without a backup.

and if you're able to back it up I'd just re-create the whole lot with lvm so adding/removing/shrinking storage is easier from then on. Having to modify partitioning is always risky (just like using partition magic under windows). LVM doesn't touch partitioning and gives you all the magic disk management stuff.

If you want to go Option 1 above and try and move everything across to an lvm Volume Group I can help with the commands to do it all.

Cheers,

Arkay.
__________________

The box said 'Requires Windows XP or better' - so I installed Linux . . .
  Reply With Quote
The following Member(s) said "Thank You!" to arkay for this information:
Old 7th October 2008, 02:54 PM   #6 (permalink)
 
dgaust's Avatar
Status dgaust is Offline:
Location Wollongong, NSW
ActivityPosts: 3,063
Reputation & Thanks Support Rating:
dgaust dgaust dgaust dgaust dgaust dgaust dgaust dgaust dgaust
Points Earned: 1229

dgaust has been Thanked 479 times in 428 posts
dgaust's
Media Center
Re: Expand RAID5

Thanks.... I did do the delete partitions, create new partition thing with fdisk a little while ago. You're right, it did screw with the FS, it said 1.5tb but appeared to the OS as 1tb (approx).

I just didn't do the

Quote:
resize2fs /dev/sda1

after that fsck it:

fsck /dev/sda1
To be honest, it's not a huge deal. I can just move stuff into that partition anyway and use it as if it was an extra drive not part of the RAID set (even though it is).

It was just bugging me.

I'll probably just pick up a 1tb drive in the next week or so, copy everything over. Blast the RAID (who needs it anyway for media storage), and create a LVM so I can just pile a lot more drives of any size into the box.

Who really cares if you lose some media if a drive fails.
__________________
Abit Fatal1ty F-190HD | Quad Core Q6600 2.4Ghz | 2GB Kingston DDR2 667 | Asus 8500GT | WD 250GB, Samsung 500GB | SPDIF Out | Pioneer BDC-S02BK Blu-Ray | DigitalNow Dual Hybrid S2 | Vista Ultimate | Antec Fusion v2

Asus M3N78 Pro | AMD 4850e | 2GB Kingston DDR2 800 | 6x500gb Samsung | DVD-RW | DigitalNow Dual Digital PCI-E | Vista Ultimate | Antec 4U22EPS650

Sign the myEPG petition. Go on, you know you want to.....
  Reply With Quote
Old 7th October 2008, 03:10 PM   #7 (permalink)

 
arkay's Avatar
Status arkay is Online:
Location Melbourne
ActivityPosts: 7,240
Reputation & Thanks Support Rating:
arkay arkay arkay arkay arkay arkay arkay arkay arkay arkay arkay
Points Earned: 1613

arkay has been Thanked 273 times in 213 posts
arkay's
Media Center
Re: Expand RAID5

Quote:
Originally Posted by dgaust View Post
Thanks.... I did do the delete partitions, create new partition thing with fdisk a little while ago. You're right, it did screw with the FS, it said 1.5tb but appeared to the OS as 1tb (approx).

To be honest, it's not a huge deal. I can just move stuff into that partition anyway and use it as if it was an extra drive not part of the RAID set (even though it is).

It was just bugging me.

I'll probably just pick up a 1tb drive in the next week or so, copy everything over. Blast the RAID (who needs it anyway for media storage), and create a LVM so I can just pile a lot more drives of any size into the box.

Who really cares if you lose some media if a drive fails.
That's always been my thinking. It's usually always replaceable anyway. For anything not replaceable you can set up a single mirrored logical volume across 2 drives of say 10GB (or whatever size you need), and just use the rest as unmirrored free space.

So out of 2x2TB drives you'd have 20 GB allocated as a 10GB mirrored logical volume on two physical drives and 1980 GB allocated to media you can afford to lose.

When you do it though don't allocated the entire Volume Group to Logical Volumes. You can then grow each Logical Volume as required from free space in the volume group. That allows you to create temporary volumes etc. The "Windows" way is to allocate all space to a drive letter, no need to do that and you're better off not to in Linux.

i.e. On my machine I have

datavg made up of:
4 x physical drives (1.9TB total space) divided up as:
700GB video
50GB audio
20GB home
200GB scratch (temp volume while I'm video editing)
and 900ish GB free in the Volume Group that I can use for anything like increasing /video as I add more DVD's etc etc or leaving space to move all data off disk 3 so I can pull it and replace it with a larger drive then re-add it to the volume group etc.

Cheers,

Arkay.
__________________

The box said 'Requires Windows XP or better' - so I installed Linux . . .
  Reply With Quote
Reply

Bookmarks

Thread Tools



Advertisers




Terms Of Service - Contact Us - Advertise With Us - Archive - Privacy Statement - FAQ
Microsoft©, Windows XP©, Windows XP Media Center© & Windows Vista© are registered trademarks of Microsoft Corporation.
www.xpmediacentre.com.au has no relationship with, nor is affiliated in any way with Microsoft Corporation.
All original content on this website © 2004 - 2008 xpmediacentre.com.au, All rights reserved
Forum by vBulletin Version 3.7.3 - Copyright Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC7
Local time now is 12:51 PM AEDT.