|
FreeBSD Installation and Upgrading Installing and upgrading FreeBSD. |
|
Thread Tools | Display Modes |
|
|
|||
FreeBSD 8.0 and RAID-1
Hello,
A couple of days ago I've sent an email to the lists@, about my issues, but couldn't get a decent solution about my problem. So, here I am asking for some ideas This is the situation - I want to create a RAID-1 for my FreeBSD 8.0 system. For that you may say there are already existing tools like:
From my testings for about 2-3 days now with the new 8.0 RELEASE, I can say that none of the above can do what I need, and that is - Creating a mirror for all the partitions - /var, /tmp, / , swap, /usr and also keeping the possibility to extend these partitions if needed. Well, that functionality is already present in gvinum, but unfortunately 8.0, doesn't allow you to manipulate the disks, like it was in 7.2 for example. What I mean is this - in 7.2 you can make a fresh minimal install and then transform all of your partitions to gvinum volumes - now using gpart that is not possible, because you cannot create one big vinum partition that overlaps the others. Yes, sure I can use gmirror to mirror the partitions, but I cannot extend them if I need one day - using gvinum it's fairly simple - you just add new subdisks to the existing plexes, but the issue remains - you cannot transform the partitions to gvinum volumes in 8.0 Are you guys using a software RAID for your systems? How did you do it? I'm open to any ideas. Thanks and regards, DNAeon
__________________
"I never think of the future. It comes soon enough." - A.E Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org |
|
||||
The gconcat does not provide mirroring, it only creates big logical space from all disks available, like raid0, but without performance gains.
Generally gmirror is currently preferred sollution instead of gvinum. @Carpetsmoker This should do the job: # zpool create POOL mirror DISK0 DISK1
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
|||
Quote:
Thanks for the replies! Yes, I know that gconcat doesn't provide mirroring, but it was also part of the problem - I've tried concatenating several slices and then mirror them using gmirror, but that doesn't work out I wanted to have the option to extend the volumes, once I mirror them. ZFS sounds good, but I don't think it would be of any good for my system - it's an IBM ThinkCentre A50 with 1g of RAM and 2.53GHz CPU. May if I add it 1 or 2 more gigs of RAM it would be reasonable to run ZFS. What do you think? (Please people having experience with ZFS - share your ideas ) Also, if I run ZFS will I be able to extend the volumes after mirroring them - I really want to have that option since it's more likely that new disk(s) will be added to the system. Thanks and regards, DNAeon
__________________
"I never think of the future. It comes soon enough." - A.E Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org |
|
||||
Quote:
George
__________________
...when you have excluded the impossible, whatever remains, however improbable, must be the truth. |
|
|||
Quote:
It's really so easy to extend the volumes, wow! I'm also thinking about the following situation, though.. Will ZFS allow me to use slices instead of whole disks - that way I would be able to mirror disks that are not identical. I have two disks - one 250g and one 750g. So instead of getting identical disks I slice the second one into two - one 250g and one 500g slices. The first slice of the bigger one is used to mirror the first disk, and rest 500g are used for some data that is not that important. I was able to do this using gmirror in single-user mode, but don't know if ZFS would allow me to do this? Have you tried this? Thanks!
__________________
"I never think of the future. It comes soon enough." - A.E Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org |
|
||||
Quote:
Code:
# zpool create myzfs mirror /disk1 /disk4 invalid vdev specification use '-f' to override the following errors: mirror contains devices of different sizes
__________________
...when you have excluded the impossible, whatever remains, however improbable, must be the truth. |
|
||||
ZFS vdevs can be made from files on existing filesystems (only useful for testing), disk partitions (/dev/ad0s1d for example), disk slices (/dev/ad0s1 for example), or whole disks (/dev/ad0 for example). In fact, anything that you can create or access with GEOM, can be used to create ZFS vdevs.
However, to get all the benefits of ZFS, it should be used with whole disks. To make things simple, as well, you should use glabel to label the disks/slices/partitions, and then reference the labels when creating the vdevs (zpool create storage mirror label/disk0slice0 label/disk1slice0, for example). That way, if you change disks, or change controllers, or whatever, ZFS will continue to work right away, without any manual intervention to get the device names sync'd. |
|
|||
Hi,
Thanks a lot for that information, phoenix! I'll surely try to implement this on my system (as soon as I get more RAM, cause I think ZFS will need it ). I'll keep you informed about it's progress Thanks! DNAeon
__________________
"I never think of the future. It comes soon enough." - A.E Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org |
|
||||
Phoenix, I see your point with glabel!
I was wondering if fsck has any meaning yet on a ZFS root installation Thanks, George
__________________
...when you have excluded the impossible, whatever remains, however improbable, must be the truth. |
|
||||
No. ZFS has features that provide the same end results as "fsck", but without a separate fsck binary.
For example, you can run zpool scrub <poolname> to run a background process that will double-check the data in the pool, using the checksums that are stored in the pool. If there are any mis-matched checksums, the data is recreated from redundant data stored in the pool. This is similar in function to a "background fsck" except that is can actual repair bad data. In newer versions of ZFS, if there's an issue that prevents the pool from being imported, you are given the option to roll-back one transaction group, which gets you back to a known-good status. (Previously, one had to do this manually using zdb and other arcane "magic" commands. This is not yet in FreeBSD's port of ZFS.) Thus, you get a working pool, with known-good data, without ever having a separate "fsck" binary. Which is better, since fsck just checks the filesystem metadata, and never checks/fixes the actual file data. Something that ZFS does!! |
|
||||
Thanks Phoenix for the info! Actually I have used the "scrub" in my opensolaris box and it is very impressive how fast it works on 2X250 GB drives with 50% utilization and running heavy disk I/O apps during.
Now you mentioned earlier that: Quote:
Code:
gkontos@hp:~# cat /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # /devices - /devices devfs - no - /proc - /proc proc - no - ctfs - /system/contract ctfs - no - objfs - /system/object objfs - no - sharefs - /etc/dfs/sharetab sharefs - no - fd - /dev/fd fd - no - swap - /tmp tmpfs - yes - /dev/zvol/dsk/rpool/swap - - swap - no - Code:
zfsroot# cat /etc/fstab /dev/gpt/swap0 none swap sw 0 0 /dev/gpt/swap3 none swap sw 0 0 tank/usr /usr zfs rw 0 0 tank/var /var zfs rw 0 0 tank/tmp /tmp zfs rw 0 0 Code:
zfs create tank/usr/ports On the other hand if I issue: Code:
mkdir /usr/ports zfs create tank/usr/ports Your help will be much appreciated George
__________________
...when you have excluded the impossible, whatever remains, however improbable, must be the truth. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Want to convert my server to raid | revzalot | OpenBSD Installation and Upgrading | 2 | 16th September 2009 07:56 PM |
What about FreeBSD's RAID-5? | stukov | FreeBSD General | 3 | 11th November 2008 09:40 PM |
RAID-1 over NFS with fail-over | PatrickBaer | FreeBSD General | 0 | 12th October 2008 12:03 AM |
freebsd 7 sofware raid-5 | nimmen | FreeBSD Installation and Upgrading | 2 | 23rd May 2008 01:04 PM |
RAID 10 on FreeBSD | bigb89 | FreeBSD General | 5 | 11th May 2008 03:58 AM |