446ec
![]() |
|
|
|
|
|||||||
| Storage Place to ask questions about partitioning, labelling, filesystems, encryption or anything else related to storage area. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Pre-script: So I basically realized I gave my whole situation below, so if you have time please read and give suggestions on the whole thing, but primarily the questions/concerns I still have at this point are as follows:
I’m new to FreeBSD. I've used Linux at home and school for 10 years, and been a Solaris SysAdmin professionally for the past 3 years. I decided recently to build my own home NAS. From my work with Solaris 10, I’ve grown fond of ZFS. I realize that many of its capabilities exist in some form with other LVMs and/or filesystems, but I can’t seem to find one that’s as easy or as free. FreeBSD was not the first OS I looked at. Ideally I'd just get some new Sun/Oracle hardware and run Solaris 11 on it, but that option is expensive. I looked at Linux. Btrfs doesn’t seem to be ready for production yet. I can do ZFS via FUSE, but since that's the main point of this box, that seems silly. I looked at the LLNL kernel port of ZFS, but aside from the obvious CDDL/GPL licensing issues, it does not yet have a production version with a working ZPL (ZFS POSIX Layer). I looked at the OpenSolaris forks (especially OpenIndiana) but from messing with it for a bit, it doesn't seem ready for primetime. So after that I looked at FreeBSD. I am aware of the FreeNAS fork, but it doesn’t seem like I’d gain much from that other than a WebGUI, and I don’t need that. I’ve heard many good about FreeBSD in general, and it seems like out of all the free/open ZFS implementations out there, it seems to have the best. Also I like the idea of the ports system, and have used Gentoo's Portage, which I'm told is somehow derived from ports. I’ve installed FreeBSD 9 RC 3 in a Virtual Box environment to play around with it, and have been reading up alot on FreeBSD documentation. I have not 100% decided on FreeBSD yet, and there is some hardware I still need to buy, but I just wanted to run through my general plan to see if anyone more experienced with FreeBSD could answer still unanswered questions, provide tips, or perhaps most importantly, point out any “gotchas,” that me an inexperienced FreeBSD user wouldn't be able to see and avoid. Since this ideally will be a NAS with a lot of data on it, I want to get this right the first time so I don’t have to reinstall the OS or redo the storage or something like that.
Last edited by phoenix; January 2nd, 2012 at 23:27. |
|
#2
|
|||||
|
|||||
|
Quote:
Setting various ZFS settings is done via /boot/loader.conf OIDs whose names will probably differ from those used on Solaris. Besides these, I haven't spotted any others. Quote:
Quote:
Quote:
Quote:
I will answer rest of your questions tomorrow or later (if I find some more time today).
__________________
Religions, worst damnation of mankind. "FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM http://vermaden.blogspot.com Last edited by DutchDaemon; January 3rd, 2012 at 02:03. |
| The Following User Says Thank You to vermaden For This Useful Post: | ||
ctengel (January 2nd, 2012) | ||
|
#3
|
|||
|
|||
|
Quote:
I need to read up a bit more on how exactly FreeBSD upgrades take place (from what I tell it seems like I'd want to go from one -RELEASE to the next -RELEASE for this box as I don't need this box to get new stuff terribly fast, aside from security fixes, which I assume come out for any non-EOLed RELEASEs, correct?) to figure out whether I would want to bother with this. I am kind of under the impression that a FreeBSD release base ought to just work, so I'm not terribly concerned, as long as the upgrade path is smooth; maybe make a backup of the rootdisk to the NAS zpool before upgrading just to be safe. The idea of a ZFS root does not seem to be supported by either sysinstall (8.x) or bsdinstall (9.x) directly, so maybe as someone new to FreeBSD it may not be the best idea. Just reading over the docs on manageBE, I'm also confused on what's all this about sending and receiving the FS. Isn't that what ZFS clones are for? Quote:
Quote:
Cool. I don't know if I would it do it that small (I had issues trying to bsdinstall 9rc3 on a 512MB virtual disk; 1 GB worked though!), but good to know that I don't necessarily need to shell out for a big one. I think I'd put most of the ports, source, etc on the NAS zpool, in their own dataset of course. (I'm still learning the FreeBSD directory tree, but I guess /usr and /var can safely be sent off? Assuming I can get the installer to put them elsewhere or install ports and so forth after.) Just out of curiosity, do you have your CF card formatted UFS or ZFS? Thanks for your quick initial reply and I look forward to seeing what you have to say about the rest! |
|
#4
|
|||||||
|
|||||||
|
Note: all of your questions could have been answered via the search feature of the forums.
![]() Quote:
Quote:
Quote:
The built-in NTFS support allows for read-only access, write is a little dangerous. There is a port that provides better read/write support for NTFS (sysutils/fusefs-ntfs). FAT12 through FAT32x support is provided with the OS. There's no support (that I know of) for exFAT. Quote:
We have one ZFS-based storage server using 2x 2GB CF cards in IDE-CF adapters configured in a gmirror(8)-based mirror. And another one using 2x 4GB CF cards in SATA-CF adapters, also confirumed in a gmirror(8)-based mirror. The SATA-based one works so much nicer than the IDE-based one. Quote:
![]() Quote:
Code:
$ zpool status
pool: storage
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
gpt/disk-a1 ONLINE 0 0 0
gpt/disk-a2 ONLINE 0 0 0
gpt/disk-a3 ONLINE 0 0 0
gpt/disk-a4 ONLINE 0 0 0
gpt/disk-b1 ONLINE 0 0 0
raidz2-1 ONLINE 0 0 0
gpt/disk-b2 ONLINE 0 0 0
gpt/disk-b3 ONLINE 0 0 0
gpt/disk-b4 ONLINE 0 0 0
gpt/disk-c1 ONLINE 0 0 0
gpt/disk-c2 ONLINE 0 0 0
raidz2-2 ONLINE 0 0 0
gpt/disk-c3 ONLINE 0 0 0
gpt/disk-c4 ONLINE 0 0 0
gpt/disk-d1 ONLINE 0 0 0
gpt/disk-d2 ONLINE 0 0 0
gpt/disk-d3 ONLINE 0 0 0
cache
gpt/cache1 ONLINE 0 0 0
gpt/cache2 ONLINE 0 0 0
errors: No known data errors
Quote:
No idea about Blu-Ray support, never touched a Blu-Ray disc, let alone a drive.
|
| The Following User Says Thank You to phoenix For This Useful Post: | ||
ctengel (January 3rd, 2012) | ||
|
#5
|
|||||||||
|
|||||||||
|
Quote:
Quote:
Quote:
Quote:
Luckily aside from UFS, FFS, ZFS, ISO/UDF (for CD/DVD/BluRay, but this would be fine with mkisofs, etc) and some network-based filesystems, I don't believe I need write support for any filesystems, as long as I can read from these filesystems from other OS's. And luckily in my experience with Linux, mounting a strange filesystem read only is usually much safer than read-write. ![]() Quote:
I'll have to take a look at gmirror; do you have the CF cards formatted FFS? Quote:
Does anyone have experience doing ZFS on similarly old hardware? I'm looking at a 2-5 TB pool's worth of data, striped and mirrored (not RAID-Z, which I realize takes even more resources). Like I said, dealing with a single core amd64 processor, 3GB of RAM, and plain PCI card SATA controllers. I'm not expecting much in performance, but I was kind of hoping the bottleneck would be the Ethernet network link. I could just try it on the old hardware and see what happens, but that's almost worse on the wallet, because I do need to buy some stuff for *this* system (such as the PCI SATA cards); if the system is just too slow/old then I may as well just get new *everything* now. (and in that case probably end up with PCIx SATA cards) Quote:
Quote:
Quote:
Thanks for your ideas! |
|
#6
|
|||
|
|||
|
As a quick update, just read in another thread that FreeBSD 9.0-RELEASE is being built now, so I will surely go with that over 8.2-RELEASE. I still need to learn more about the best practices for staying up-to-date with 9.0-STABLE, (or RELENG_9) but at least now I know my starting point and don't have to worry about sacrificing 9 features for 8 stability.
|
|
#7
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
Quote:
About manageBE, its not even in the Ports mate, its just a some script/side project. Quote:
If You want to stay at *-RELEASE, then it would be even easier, just use freebsd-update utility that does binary updates/upgrades and fetches security patches. Quote:
Thanks for that; that's the sort of summary I was looking for. Sometimes it's hard to track down exactly what's new in a new release that hasn't even been released yet! The official Release Notes haven't also been published for 9.0, maybe You will also find some interesting info there ![]() Quote:
Quote:
Quote:
Quote:
Quote:
![]() Quote:
Quote:
Quote:
![]() Quote:
Quote:
Quote:
Quote:
Quote:
![]() Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
__________________
Religions, worst damnation of mankind. "FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM http://vermaden.blogspot.com |
|
#8
|
|||
|
|||
|
You should know that ZFS on root will provide more flexibility but it still provides less performance in I/O, snapshots are also possible with UFS2. I would also recommand UFS2 beacause the CF card is already little slow, adding ZFS might cause a slow system.
|
|
#9
|
|||
|
|||
|
Quote:
Quote:
A year ago everyone said 'use whole disks' and I would have agreed. But now I'm not so sure anymore. Partitioning/labeling avoids problems with slightly smaller replacements drives, helps identify drives in the array and - if I'm not mistaken - partitioning with a 1MB offset will also avoid problems with the large sector sizes found in Advanced Format drives and SSDs (can someone confirm this, or is the gnop trick still required?). Where are the disadvantages? |
|
#10
|
|||
|
|||
|
Quote:
|
|
#11
|
|||
|
|||
|
Hmm, then I'm not understanding the difference between the 'ashift=12' that ZFS does when it detects a 4k drive (either because it really is one and advertises as one, or because we force it too using gnop) and just offsetting your partition 1MB (which is a multiple of 512 and 4k, so it should mathematically start on a 4k boundry right?).
|
|
#12
|
|||
|
|||
|
Quote:
The Threadstarter could try both and report
|
|
#13
|
||||
|
||||
|
Quote:
__________________
Religions, worst damnation of mankind. "FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM http://vermaden.blogspot.com |
|
#14
|
||||
|
||||
|
Quote:
You cannot add a true 4KB disk to an ashift=9 vdev. But you can add a 512B disk to an ashift=12 vdev. Hence, to future-proof your pool, you should create your vdevs using 4KB sectors (whether via hardware or gnop). Performance on 512B drives will not be affected. Aligning things via a partition at 1 MB just makes things nicer, and guarantees that everything is lined up for 512B and 4096B accesses. And provides future-proofing for any other sector sizes coming down the pipe (and works for SSDs as well, which have all kinds of funky write page sizes). Thus, combining the two gives you the best of all worlds, and future-proofs the pool.
|
|
#15
|
||||||
|
||||||
|
Quote:
Quote:
If you want to do source upgrades, then you set your csup(1) tag to RELENG_X_Y (where X is the major version, and Y is the minor version), and go through a csup/buildworld cycle. See the Handbook for details. Quote:
And it doesn't work with DMA, even though the CF cards show DMA support. And they occasionally give error when doing heavy writes (like during an installworld).The SATA adapter doesn't have any of those issues. It might be the adapters we are using, though. Quote:
Plus, ZFS would be kind of "heavy" for a pair of 2-ish GB CF disks. ![]() Quote:
![]() Just do not enable dedupe on any filesystems with that little RAM. Horrible things will happen. ![]() Quote:
|
|
#16
|
|||
|
|||
|
Quote:
The key to this is that ZFS uses variable block sizes! Hence where the 'minimum block size' comes in to play and why it's so important. Btw: the 'recordsize' setting on ZFS filesystems refers to the maximum blocksize that the FS can use. So if you set recordsize=8k, actual used blocksizes will vary between 4k (with ashift=12) and 8k (with power-of-2 steps I guess). (Btw2: the ashift value means a power of 2, 2^9 = 512, 2^12=4096) When using the whole disk, that's all you have to do. Things will be correct. However if you use partitions, you also have to make sure they are aligned properly! No use in fixing your minimum block size, if your first block starts of in the middle of an actual disk sector. With regards to old hardware: we are running a 2TB zpool on a SuperMicro Core 2 Duo, 4GB RAM, attached to an DAS (Dell MD1000) via a LSI PCI-X (that's X, not Express unfortunatly) SAS card (in IT mode). Has 6 x 750GB disks in 3 mirror vdevs. It does daily backups of our other servers, with snapshots going back a year already. And it's running without a sweat. In fact it also runs 2 Postgres instances (on the zpool, on seperate filesystems with recordsize=8k): one replicating another Postgres over the internet and one for our monitoring tool (which also runs on that same server). The filesystems where the backups are happening on (seperate one per backed-up server) have also compression enabled, which doesn't seem to add any extra load (ljzb, gzip is terrible). In fact, as others will tell you, they even speed up writes considerably! I think the key very much is in using striped mirrors (which also give you better options for expanding the pool, we only need to replace 2 drives and our pool is already bigger) and not the fancy RAIDZ options. I did some tests with RAIDZ when building the server and it wasn't as fast as the mirrors. RAM usage I can not say, since I didn't really fill the pool when testing. We get sequential reads up to 200MB/s if I'm not mistaken, which adequatly fills a 1Gb link ![]() One last piece of advice: I've read everywhere that it's best to use 64bit FreeBSD for ZFS, if you can, even if you will never have more than 4GB of RAM. Since ZFS does a lot of 64 and 128 bit calculations. Last edited by hopla; January 3rd, 2012 at 22:11. Reason: Forgot to mention compression |
|
#17
|
|||
|
|||
|
Just one data point here, concerning NTFS via fuse, on at least FreeBSD 8.2. I do not consider it ready for prime time. In my hands it did not function reliably for large scale usage. Occasional file r/w, it was fine. But it did not tolerate the copying of GB sized file sets very well. To get it to be reliable at all, I had to slow it down by turning on verbose mode.
Last edited by DutchDaemon; January 4th, 2012 at 00:48. |
|
#18
|
|||
|
|||
|
Quote:
Quote:
The only departure from default configuration is in loader.conf: Code:
vm.kmem_size="512M" vm.kmem_size_max="512M" vfs.zfs.arc_max="160M" vfs.zfs.vdev.cache.size="5M" vfs.zfs.prefetch_disable="0" |
|
#19
|
||||||||||||||
|
||||||||||||||
|
Thanks to all, glad I started something interesting! (I'll respond to the ZFS partitioning (or lack thereof) and hardware issues in a separate post).
ROOT FILESYSTEM, SNAPSHOTS, BOOTENV Quote:
Quote:
Quote:
manageBE is a cool idea, but like I mentioned before I have my reservations for now. I was not aware of UFS2's snapshotting capabilities. I'll have to read up on that. I'm guessing it works differently from ZFS's COW-based snapshots. In any event the UFS2 snapshotting could be handy in an upgrade scenario I guess! HIERARCHY BREAKUP Indeed it does; so based on my reading of that manpage, my setup would look like:
One thing I am a bit confused about: /home or /usr/home or /export/home or /opt/home is not mentioned in hier(7)... LVM Quote:
ZPOOLS Quote:
CF Quote:
Do you know what makes/models of adapters and cards you are using? (so I avoid the IDE one if I go that way, and try to get the SATA one if I go that way!) UPGRADES/RELEASES Quote:
Quote:
Is there an advantage performance wise in building everything from source? (obviously aside from the resources necessary to compile!) I seem to remember a bit of one on Gentoo but over time it seemed less significant. What's the consensus on FreeBSD? And if there is no performance benefit, do people just do it to stay more up-to-date? MANUAL INSTALL Quote:
UPGRADES AND PORTS Quote:
TESTING Quote:
SUPPORT FOR OTHER FILESYSTEMS Quote:
Quote:
ZPOOL VERSION Quote:
Thanks again! Last edited by DutchDaemon; January 4th, 2012 at 11:45. |
|
#20
|
|||||||||||
|
|||||||||||
|
Quote:
Code:
% ls -l /dist ls: /dist: No such file or directory Quote:
Code:
% ls -l /media ls: /media: No such file or directory Quote:
Code:
% ls -l /proc ls: /proc: No such file or directory Quote:
![]() Quote:
Quote:
Quote:
Quote:
![]() Default FreeBSD CFLAGS are: -O2 -pipe -fno-strict-aliasing which provide more then enough optimization. Quote:
I personally consider crippled every installer that is not able to install FreeBSD in most useful/powerful ways which of course are ZFS/Gmirror/Geli/GPT. In short, if You know what You are doing, do it the 'manual' way, after several tries @ virtualbox You will feel as at home. If You do not want to use the 'manual' way, use the PC-BSD installer to install FreeBSD. Quote:
![]() Quote:
For similar issue Truecrypt is not ported to FreeBSD (no fully functional FUSE interface).
__________________
Religions, worst damnation of mankind. "FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM http://vermaden.blogspot.com |
|
#21
|
||||||||
|
||||||||
|
Quote:
Quote:
Quote:
Quote:
I tend to put /usr/local, /usr/ports onto ZFS, though. And, sometimes, even /usr/src and /usr/obj. Quote:
Quote:
Quote:
Quote:
bsdinstall is a much nicer installer, supports GPT, ZFS, GEOM, etc. And, it's a LiveCD, so you can drop to a shell and have access to a full-fledged FreeBSD system to do anything. So, while the TUI may not support all the GEOM features, you can always drop to a shell, configure things manually, then continue on with the TUI. Want a gmirror-based / setup? bsdinstall can do that. Want a ZFS-based setup? bsdinstall can do that. Want some fancy GELI-encrypted setup? bsdinstall can do that. And the best part is that bsdinstall is just an installer. There's no broken post-install configuration crap in there.
|
|
#22
|
||||
|
||||
|
Quote:
That's the power of bsdinstall. |
|
#23
|
||||
|
||||
|
Quote:
__________________
Religions, worst damnation of mankind. "FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM http://vermaden.blogspot.com |
|
#24
|
||||||||
|
||||||||
|
PARTITIONING
Quote:
Quote:
Quote:
Quote:
Quote:
I need to learn more about 512B vs 4096B blocksize on disks, what impact that has, and what size I'm likely to get. I can see why starting a partition at 1MB is better than 512B (planning for the future), but not sure why not just start at 4KB (a multiple of 512 and 4096). And if I understand correctly, if I forego partitioning altogether, it won't matter because that will be starting at 0B (also a multiple of 512 and 4096 )I also think i need to read up a bit more on glabel, gnop, GEOM, GPT, and all that fun stuff... OLD/SLOW HARDWARE Quote:
Quote:
Quote:
Hardware has become I think my biggest remaining concern; I'm reading wildly different things about what is necessary. In my personal experience, those situations where I've done it with not much RAM (1-2GB) on Solaris/SPARC, I was only doing 250-300GB of data at a time. (And even so, on boxes with 3TB of storage or so, not uncommon at all to see the ARC cache climb to 50% of 32GB of RAM!) In this situation, to start I'm looking at 2x 2-3 TB drives mirrored, with an optional to add (stripe) additional mirrored pairs, for a max of 8-10 TB of data, but by the time it gets that big, it's quite possible I will have decided on new hardware anyway, so lets say max ~5 TB of data across 4 drives in a RAID10-like setup. (a stripe of two mirrored pairs) In terms of the other hardware, I'm thinking one or two (if two then each mirror split between the two cards) PCI-attached SATA controllers. The motherboard I'll max out at 3GB of RAM; the processor is an AMD Athlon64, single core, I forget the clock speed, but I think RAM is really the weakest link in this ZFS setup. I'd do either 100Mbps or 1Gbps Ethernet; if 100Mbps, I think I'd want THAT to be the weakest link in a typical ZFS read via NFS/CIFS scenario. BTW, The reason this is a dilemma, and not just a simple case of "let me just try it on what I have, and if it's not fast enough, I'll upgrade" is that the existing hardware requires some investment to bring up to speed (notably the PCI SATA controllers, maxing out the DDR1 RAM, and IDE-CF adapter), and I wouldn't want to bother with that if I'm just going to have to immediately get new mobo, multi-core CPU, DDR3, PCIx SATA cards, SATA-CF adapter etc. (and not able to use the PCI SATA, DDR1, IDE-CF) On the other hand, if I can get 2 years use of the old stuff before I need to upgrade to better hardware, I wouldn't mind it. Anyway I'll keep on looking for some more definitive info on ZFS hardware reqs; if anyone else has experience running 2-5 TB arrays on less than 4 GB of RAM I'd love to hear about it. And thanks vermaden and phoenix for the advice on filesystem layout and installers (or lack thereof ) and so forth.
|
|
#25
|
|||||
|
|||||
|
I've given some more thought to the ZFS hardware reqs issue and I basically realized three things: (reducing the problem from all the back and forth between reading all sorts of inconsistent things I've read regarding how much RAM is needed):
FILESYSTEM LAYOUT Just a note, I guess I didn't say it explicitly before, but I'm envisioning that the CF cards will have everything needed on them for at least running full base OS (maybe not necessarily build it), and certainly relevant ZFS tools; the zpool then would have (in separate filesystems of course) any additional applications/ports/etc, and obviously user data. Not needed or not needed and also useless? If useless, then I think that's another thing different about FreeBSD I'll have to learn! Quote:
Quote:
Quote:
INSTALLATION Quote:
Quote:
FUSE Good to know. For some reason I guess I assumed FreeBSD had a fully working FUSE setup. I'll have to do some testing. Luckily I only need read only on most of the weird filesystems. CF Thanks. That will be good info for me to have |
![]() |
| Tags |
| blu-ray, cf converter, ext4, freebsd 9, zfs |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FreeBSD ZFS as a NAS/server? | forrie | General | 6 | February 24th, 2012 17:18 |
| ZFS send/receive between FreeBSD 9 and a Solaris box (stream unsupported version) | Boeri | General | 14 | July 1st, 2011 14:25 |
| Complete FreeBSD 8.2 ZFS + GELI encryption NAS Howto | asconix | Howtos & FAQs | 0 | June 9th, 2011 00:21 |
| Zfs nas | niclas197 | System Hardware | 4 | October 13th, 2009 20:36 |
| Solaris ZFS | ronaldprettyman | General | 9 | October 13th, 2009 15:24 |