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