Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Extreme Raid Growth
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
linear
Apprentice
Apprentice


Joined: 12 Aug 2004
Posts: 222

PostPosted: Mon Feb 19, 2007 10:37 pm    Post subject: Extreme Raid Growth Reply with quote

OK, so heres the trick:

The challenge: A growable partition and filesystem setup for ultra large arrays.

The hiccup: Pretend we do not have LVM2... because I do not know it well enough to make it happen "RIGHT NOW"

I have 2 devices:

/dev/sda 7.5TB hw RAID5 on AMCC 9550-12
/dev/sdb 7.5TB hw RAID5 on AMCC 9550-12

I raid them together with:

Code:

raiddev /dev/md0
    raid-level              linear
    nr-raid-disks           2
    persistent-superblock   1

    device                  /dev/sda1
    raid-disk               0
    device                  /dev/sdb1
    raid-disk               1


Add a handy filesystem:

#mkfs.xfs /dev/md0
I then mount the FS and create a few directories and files

Now the tricky bit:

I want to add another device (in this case an iSCSI drive on another box) so I unmount, stopraid, and edit raidtab:

Code:

raiddev /dev/md0
    raid-level              linear
    nr-raid-disks           3
    persistent-superblock   1

    device                  /dev/sda1
    raid-disk               0
    device                  /dev/sdb1
    raid-disk               1
    device                  /dev/sdd1
    raid-disk               2


mkraid -R /dev/md0 warns that data is about to be destroyed but I am stalwart, brave... and done it before so I let it go.

Mounting the raid shows the same filesystems size (of course) but parted shows it is now 22.5TB.

after running xfs_grow /mnt/1 (its mount point) we get a hurrah and checking the FS still shows my files!

so... I repeat for a second iSCSI 7.5TB device and I get a 30TB partition. The FS looks good with the files still there.

###

I'd be glad to post my emerging howto... but first:

HERE'S MY QUESTION(s):

Am I fooling myself?

What are the dangers here?

Is this worthy of production?

How many devices will raidtab concatenate?

Why would I want to use LVM2 if all I need in order to grow a single monolithic volume is a software JBOD?
Back to top
View user's profile Send private message
HeissFuss
Guru
Guru


Joined: 11 Jan 2005
Posts: 414

PostPosted: Mon Feb 19, 2007 10:53 pm    Post subject: Reply with quote

LVM2 does online resizing, so if your FS also supports it you don't even need to unmount to extend or shrink your partitions.
Back to top
View user's profile Send private message
linear
Apprentice
Apprentice


Joined: 12 Aug 2004
Posts: 222

PostPosted: Mon Feb 19, 2007 11:09 pm    Post subject: Reply with quote

Good point and online growth is a nice feature that is worth having.

When I went strafing for quick and dirty answers, LVM2 was my first choice. I have not used it before but as I went through docs I found myself a little overwhelmed with information that was not relevant to me and provided what looked like overly complex answers to a simple problem. Granted it may have been my choice of docs, but I read what I could find.

If anyone has some quick and dirty howtos on seting up LVM in the fashion I need I would be most appreciative. My needs are to be able to continually grow a volume over time. I do not need to segment it. I just need to concat a bunch of iSCSI targets and be able to add on more later.
Back to top
View user's profile Send private message
HeissFuss
Guru
Guru


Joined: 11 Jan 2005
Posts: 414

PostPosted: Mon Feb 19, 2007 11:33 pm    Post subject: Reply with quote

This guide has a section on setting up LVM2. http://gentoo-wiki.com/Installing_on_LVM2_And_Raid5#Creating_LVM2
You can skip the section on software raid.

In a nutshell:

add all physical devices with pvcreate
add all pvcreated devices with vgcreate to a new volume group
create a logical volume with lvcreate which will contain your entire volume group.
format the LV with your FS of choice.

To add a device, pvcreate /dev/device
use vgextend to add the device to your volume group
use lvextend to expand the logical partition by the additional size
grow your FS
Back to top
View user's profile Send private message
linear
Apprentice
Apprentice


Joined: 12 Aug 2004
Posts: 222

PostPosted: Tue Feb 20, 2007 10:37 pm    Post subject: Reply with quote

Your nutshell was exactly what I needed to jump into LVM. Thank you kindly.

I will be consuming LVM resources on the internet and hoped I might put forwad a few questions for varied points of view or pointers to more focused information.*

What is recovery of LVM like if the managing OS goes belly up?

Where is it's config stored, etc?

Are there known recovery issues?

What can happen if the underlying discs unexpectly drop such as when an iSCSI device is interrupted by a network cable being unplugged?

If I have ONLY a single box mount a logical volume, can I safely share out that mount with samba or NFS to multiple users?

###

* I know I can get the best answers from an LVM and/or iSCSI mailing list, and I will seek them there too. I figure, though, that if I had this question, other gentoo users may also, and the richer the questions and answers on our forums, the richer the community is as a whole.
Back to top
View user's profile Send private message
HeissFuss
Guru
Guru


Joined: 11 Jan 2005
Posts: 414

PostPosted: Wed Feb 21, 2007 1:02 am    Post subject: Reply with quote

The config is stored on the disks. There's also a tool you can use to make backups of that data in case you lose the device it's stored on.

I'm not sure how it would react if a linear device went missing. I think you'd just get read/write timeouts until you could get it back up, though you'd hope that it'd crash. Since it's linear it'd also depend on which section of the device you were trying to access.

As for sharing the volume I don't see any problems that would be different from any other shared volume.

If you find any answers please post them here. I'd like to know also.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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