Raid 0

Novi ste u svijetu Linuxa? Imate hrpu početničkih pitanja?

Moderator/ica: Moderatori/ce

Pravila foruma
PRAVILA ZA NOVE KORISNIKE LINUXA!
Prije otvaranja bilo kakve diskusije svaki novi korisnik u svijetu Linuxa obavezan je učiniti sljedeće korake:
Pročitati ove tekstove iz naše Wikipedije:
- Sve uvodne tekstove Linuxa za početnike (njih 5)
- Sve što trebate znati o radu s diskovima
- Pročitati ovu temu za početnike
- Pokušati pronaći riješenje problema u Enciklopediji znanja

Nakon toga korisnik smije otvoriti temu s naslovom svog problema uz obaveznu naznaku Linux distribucije koju koristi u formi:
[Linux distribucija, broj verzije, grafičko okruženje]: Naslov problema
U prvom postu korisnik obavezno mora odgovoriti na ova pitanja:
- Da li ima instalirane Windowse?
- Što ga je motiviralo na instaliranje i korištenje Linux distribucije?
- Obavezno je potrebno navesti specifikacije hardvera (Ime Laptopa, tip procesora, grafičke i mrežne kartice, količina RAM-a i diska)

Bez učinjenih ovih prvih koraka, na teme se neće odgovarati i one će biti izbrisane s foruma!
Odgovori
tech_soul8
Postovi: 177
Pridružen/a: 26 pro 2010, 16:12
OS: Debian

Raid 0

Post Postao/la tech_soul8 »

Ovako imam 2 hdd-a u racunalu. Jedan mi je IDE (80 gb) drugi mi je SATA (320 gb).
Zanima me dali mogu na ovom drugom, vecem disku napravit jednu particiju od 80 gb, a ostali prazan prostor kasnije particionirat prema potrebi. S ovom particijom od 80 gb sto sam napravio na drugom disku i ovom sto imam na prvom htio bi napravit raid 0 polje (softverski raid). E sada zanima me dali je to moguce posto sam cito negdje da ako zelim da mi se /root file system nalazi na raidu i da se sa njega direktno boota da moram potrazit kernel koji u sebi ima podrsku za raid ugradjenu direktno, a ne u obliku modula koji se loadira itd...??? Ili ako mi je bolje da koristim LVM kako bi onda to iskombiniro??? :mrgreen:
Avatar
glaskoncILLa
Postovi: 5678
Pridružen/a: 28 vel 2009, 16:36

Re: Raid 0

Post Postao/la glaskoncILLa »

koristi lvm.
...."Have you mooed today?"...
..It’s that time of the decade: I’m reinstalling Debian..
tech_soul8
Postovi: 177
Pridružen/a: 26 pro 2010, 16:12
OS: Debian

Re: Raid 0

Post Postao/la tech_soul8 »

ja bi koristio raid 0 cisto iz razloga da dobijem nesto na performansama.
znam i ja da mi je bolje koristit lvm iz puno razloga,ali ako napravim lvm dali onda mogu povezat to u raid 0 i kako? :)
Avatar
glaskoncILLa
Postovi: 5678
Pridružen/a: 28 vel 2009, 16:36

Re: Raid 0

Post Postao/la glaskoncILLa »

napravis prvo radi i onda zakalemis lvm na njega, najlakse prilikom instalacije, a postupak ovisi o distri.
iako mislim da ti je to previse petljancije jer u nekom prosjecnom koristenju neces primijetiti razlike u performansama.
...."Have you mooed today?"...
..It’s that time of the decade: I’m reinstalling Debian..
tech_soul8
Postovi: 177
Pridružen/a: 26 pro 2010, 16:12
OS: Debian

Re: Raid 0

Post Postao/la tech_soul8 »

E ovako ja sam pokusao bas tako napravit ko sto si mi reko i onda prilikom instalacije grub-a mi je javio neku fatal error i izbacio gresku da nemoze inst. grub bootloader. To sam iso radit u vmboxu tako da provjerim samo ako ce mi radit sve prije nego sto idem na pravom racunalu to napravit. Kada sam isti taj postupak ponovio samo umjesto raid 0 stavio raid 1 sve mi je proslo ok. Negdje sam procito da grub i sam kernel nema podrsku za bootanje direktno sa raid diska ako se radi o raidu 0 ili tako nesto i da bi se doskocilo tom problemu da treba nesto iskombinirat sa lvm-om tako da se napravi raid 0 polje (npr. /dev/md0 device) i onda kasnije da se /boot filesystem stavi na drugu particiju i stavi u raid 1 (npr. /dev/md1)... ne znam sad ako sam te zbunio, ali uglavnom tako nesto bi trebalo ic koliko sam ja shvatio :)
Avatar
glaskoncILLa
Postovi: 5678
Pridružen/a: 28 vel 2009, 16:36

Re: Raid 0

Post Postao/la glaskoncILLa »

napravi posebnu boot particiju od par desetaka mega koja nece biti u raidu.
...."Have you mooed today?"...
..It’s that time of the decade: I’m reinstalling Debian..
tech_soul8
Postovi: 177
Pridružen/a: 26 pro 2010, 16:12
OS: Debian

Re: Raid 0

Post Postao/la tech_soul8 »

evo vidi radi se o ovome:

If a RAID device could be partitioned, the administrator could simply have created one single /dev/md0 device device, partitioned it as he usually would, and put the filesystems there. Instead, with today's Software RAID, he must create a RAID-1 device for every single filesystem, even though there are only two disks in the system.

There have been various patches to the kernel which would allow partitioning of RAID devices, but none of them have (as of this writing) made it into the kernel. In short; it is not currently possible to partition a RAID device - but luckily there is another solution to this problem.

I onda kasnije objasnjava kako bi to trebalo rijesit pomocu lvm-a:

The solution to the partitioning problem is LVM, Logical Volume Management. LVM has been in the stable Linux kernel series for a long time now - LVM2 in the 2.6 kernel series is a further improvement over the older LVM support from the 2.4 kernel series. While LVM has traditionally scared some people away because of its complexity, it really is something that an administrator could and should consider if he wishes to use more than a few filesystems on a server.

We will not attempt to describe LVM setup in this HOWTO, as there already is a fine HOWTO for exactly this purpose. A small example of a RAID + LVM setup will be presented though. Consider the df output below, of such a system:

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md0 942M 419M 475M 47% /
/dev/vg0/backup 40G 1.3M 39G 1% /backup
/dev/vg0/amdata 496M 237M 233M 51% /var/lib/amanda
/dev/vg0/mirror 62G 56G 2.9G 96% /mnt/mirror
/dev/vg0/webroot 97M 6.5M 85M 8% /var/www
/dev/vg0/local 2.0G 458M 1.4G 24% /usr/local
/dev/vg0/netswap 3.0G 2.1G 1019M 67% /mnt/netswap
"What's the difference" you might ask... Well, this system has only two RAID-1 devices - one for the root filesystem, and one that cannot be seen on the df output - this is because /dev/md1 is used as a "physical volume" for LVM. What this means is, that /dev/md1 acts as "backing store" for all "volumes" in the "volume group" named vg0.
All this "volume" terminology is explained in the LVM HOWTO - if you do not completely understand the above, there is no need to worry - the details are not particularly important right now (you will need to read the LVM HOWTO anyway if you want to set up LVM). What matters is the benefits that this setup has over the many-md-devices setup:

No need to reboot just to add a new filesystem (this would otherwise be required, as the kernel cannot re-read the partition table from the disk that holds the root filesystem, and re-partitioning would be required in order to create the new RAID device to hold the new filesystem)
Resizing of filesystems: LVM supports hot-resizing of volumes (with RAID devices resizing is difficult and time consuming - but if you run LVM on top of RAID, all you need in order to resize a filesystem is to resize the volume, not the underlying RAID device). With a filesystem such as XFS, you can even resize the filesystem without un-mounting it first (!) Ext3 does not (as of this writing) support hot-resizing, you can, however, resize the filesystem without rebooting, you just need to un-mount it first.
Adding new disks: Need more storage? Easy! Simply insert two new disks in your system, create a RAID-1 on top of them, make your new /dev/md2 device a physical volume and add it to your volume group. That's it! You now have more free space in your volume group for either growing your existing logical volumes, or for adding new ones.

A mogao bih i probat napravit ovo sto si mi ti rekao to mi se cini puno jednostavnije :)
Odgovori