Jump to content

Wikipedia:Reference desk/Archives/Computing/2008 April 22

From Wikipedia, the free encyclopedia
Computing desk
< April 21 << Mar | April | May >> April 23 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


April 22

[edit]

Linux backup server system partitioning for Bacula and other questions

[edit]

I am building a Linux server (Ubuntu Hardy Server) which will primarily be used as a file server (very simple SFTP) and storing backups (Bacula). It has four 750 gig drives that will have software RAID 1 and RAID 5 using mdadm below the file system (ext3). Currently, my partitioning plan is two small RAID 1 partitions for / and swap, and one large RAID 5 partition for /home. I haven't had much experience with setting up Bacula, so my main question is:

  • Is this the "best" partition configuration for Bacula?

This question is based on these other questions which I don't know the answers to:

  • Where is the best place to store the data and database files Bacula uses for backup?
  • Can Bacula store backup data files as separate files based on the user who owns the backups under each user's home directory? Or what about all under one "bacula" user's home directory, while still maintaining access permissions?
  • Can the associated database (MySQL most likely) files used by Bacula be too large to fit on a small (<20 GB) root partiton? Could they be broken up accordingly and stored under each user's home directory also?
  • Would having a large /srv partition instead of a large /home partition be more appropriate here? I'd prefer to keep the number of software RAID multidisk devices low, and preferably want one very large partition for both backup file storage and user's home file storage.

Some background: This server will be used by only a handful of users to archive and backup and share very large raw audio and video files on a LAN, so it probably wont hold more than a few thousand files in the backup database. Performance is not a big issue, rather the reliability of the backups are and backup and file server storage space, hence the RAID 5 setup.

I've been spending the last week researching these questions and haven't really been satisfied with any partial-answers I've found, so I was hoping some people with experience with this could fill me in. Thank you so much! -- Eric 66.75.102.95 (talk) 06:50, 22 April 2008 (UTC)[reply]

(Doesn't look like anyone else wants to jump in, so....) Not help, but questions for my education. Okay, for my entertainment, too, but, still. Why are you using software RAID? Any task that depends upon software will fail if you have a software issue. If you are doing this for data safety, you are making design decisions that lessen reliability. Have you considered hardware RAID? A controller that will let you do either RAID 10 or RAID 5 with 4 identical drives shouldn't be very expensive; certainly less expensive than the drives, and you get all the benefits of RAID without the drawbacks of depending upon your OS & drivers to work right. Your motherboard may support RAID 1 or 10 without any OS or driver help at all, in which case you can eliminate a lot of complexity right there. -SandyJax (talk) 15:21, 22 April 2008 (UTC)[reply]
I've done a fair amount of research regarding RAID and simple software RAID using mdadm was the best option, plus I've have a lot of experience with it and never had any problems. Using mdadm, I can build, expand, rebuild, and remove RAID remotely from headless servers, and monitor them along with smartmontools and lmsensors. Failed native mode SATA drives can be easily hot swapped by users on site while the server continues to run without any downtime and the RAID is rebuilt in the background. It's free, opensource, and requires no hardware or custom drivers. I've practiced pulling live drives from RAID 1 and RAID 5 setups and replacing them with blank drives and rebuilding the arrays, and everything has worked great without losing data any data. I've actually converted a 2 drive, non RAID system to a RAID 1 mirrored system over SSH from overseas without anybody actually touching the computer, as a demonstration!
If I understand you right, you just said "Software RAID is easier to use". Thank you for clarifying that. Yes, software control makes everything easier. My point was "Hardware RAID is more reliable". A hardware RAID solution fails if the core computer (power supply, motherboard, CPU, RAM) fails, the drive controller fails, or more than one hard drive fails. A software RAID solution fails for any of those, plus also if any of the following fails: the boot drive, the operating system, or the software module pretending to be a RAID controller. As you say, you have not yet seen that. Is this conclusive proof that it is not a danger? So, is reliability not a factor? And, if reliability is not a factor, why bother with a RAID solution of any kind? If reliability _IS_ a factor, then software systems add complexity. Nicer, yes. Safer, no. -SandyJax (talk) 20:11, 24 April 2008 (UTC)[reply]
Reliability is a factor, however it is not the only one. There's a lot more requirements and capabilities; cost, data integrity, ease of use, flexibility, etc. Software RAID is just the better option. With RAID 1 any drive is a mirror so any drive can boot, and if the OS is down then there wont be any work being done anyway, as the same would any other layer from from actual physical drive mechanics to the applications. Yes, adding one more layer mathematically introduces a higher probability of failure, but it's negligible and accepted with the benefits gained. Believe me, I've read a great deal on the concepts of RAID and best practices, and I've done my research, and what I presented was signed off on, so I'm not arguing for the sake of arguing.
Edit: >as the same would any other layer from from actual physical drive mechanics to the applications.
I take that back, if RAID is working, it wouldn't matter if something failed beneath the RAID layer down to the physical hard drives.

Spreadsheet formula

[edit]

I'm trying to write a formula to apply conditional formatting in OpenOffice Calc it is supposed to apply the format if three conditions are true and one is false, but it is applying the condition if D413 does not contain "No DNA", despite the fact that the other conditions are not satisfied. I would like it to require all conditions to be true (or rather the first three to be true and the fourth to be false... that's a question of semantics - it should be taken care of because I said 'NOT' in my formula). ----Seans Potato Business 10:25, 22 April 2008 (UTC)[reply]

IF(($M413=$M414)AND($P413=$P414)AND($Q413=$Q414)NOT($D413="No DNA"))

Maybe you need to use "AND NOT"? I dont use OOC, but in Excel I would write this like "=IF(AND($M413=$M414;$P413=$P414;$Q413=$Q414;NOT($D413="No DNA"));"do true";"do false")". — Shinhan < talk > 11:47, 22 April 2008 (UTC)[reply]
Thanks. Your syntax works. :) ----Seans Potato Business 12:16, 22 April 2008 (UTC)[reply]
Did you consider changing the last sub-condition to D413<>"No Data"? [YMMV if <> is not the operator for NotEqual in OOC.] Might be easier to recall "What was I thinking" when you look at it again in six months! -- Danh 63.226.145.214 (talk) 23:16, 23 April 2008 (UTC)[reply]

c++

[edit]

What is the default value of static type char variable?(For ex. Default value of static type int variable is 0) —Preceding unsigned comment added by 202.157.77.10 (talk) 10:35, 22 April 2008 (UTC)[reply]

It is possible that your compiler will set a default value, but I have seen no such thing in ANSI C or C++. Variables that are not initialized have no value (not even null). It is up to you to set an initial value. So, by definition, your ints won't be initialized to zero automatically. You must do that. -- kainaw 11:29, 22 April 2008 (UTC)[reply]
This is definitively false! Quoth [basic.start.init/1] of the C++ standard: Objects with static storage duration shall be zero-initialized before any other initialization takes place. Same goes for C. The char will be set to 0. --Sean 12:45, 22 April 2008 (UTC)[reply]
Kainaw may have missed the static duration part of the question. His statement is correct for variables with automatic duration. -- Coneslayer (talk) 13:03, 22 April 2008 (UTC)[reply]
Yes. I did. I only saw "char", not "static char". I actually read the question twice without answering it and then answered it the third time when nobody else did. So, I have no clue why I kept overlooking "static". -- kainaw 13:34, 22 April 2008 (UTC)[reply]

Mobile domain for google earth?

[edit]

1) I saw in one book that "google earth" is now made in that way that it can be even used in mobile phones... i mean can anyone give me the mobile url for google earth...for youtube it's m.youtube.com & in suchway what is it for google earth....plz give me the exact url address? 2) Are there any websites which will allow us to send multimedia messages from computer to mobile especially in India?

Plz don't mix the above two questions....seperately answer them! Temuzion (talk) 11:02, 22 April 2008 (UTC)[reply]
Googling for "google earth mobile" gives Google maps for mobile as first hit, and this as second. — Shinhan < talk > 11:43, 22 April 2008 (UTC)[reply]
It looks as if http://www.text4free.net/ will let you send MMS messages to some (possibly all) Indian mobile phones. I haven't tried it myself - just searched for send mms free. There are probably other sites like this too. AJHW (talk) 14:59, 24 April 2008 (UTC)[reply]

How to increase partition size of a drive without formatting the PC?

[edit]

I have 3 drives in my PC. I want to increase the partition size of one of these drives. So is there any way to do so without formatting the PC and then make the partitions accordingly? —Preceding unsigned comment added by 210.18.82.102 (talk) 11:09, 22 April 2008 (UTC)[reply]

Try Partition Magic. The name is lame, but the program is quite powerful. 206.252.74.48 (talk) 12:26, 22 April 2008 (UTC)[reply]
GParted is an open source program to do the same. --LarryMac | Talk 13:30, 22 April 2008 (UTC)[reply]
In any event, backup before attempting to use these programs! Sandman30s (talk) 14:11, 23 April 2008 (UTC)[reply]

Interpreting Licenses

[edit]

If x -> product, and, y -> another product developed using x: then, I would like to know whether following cases are legal, with respect to the following licenses,

  1. GPL
  2. LGPL
  3. MIT
  4. Apache License
  5. BSD licenses
  6. Mozilla Public License 1.1 (MPL)
  7. Common Development and Distribution License
  8. Common Public License 1.0
  9. Eclipse Public License
  10. copyleft

Cases,

  1. use x for study
  2. use x for profit
  3. hack/improve x
  4. redistribute x
  5. redistribute x, without source
  6. redistribute x, under another license
  7. redistribute y
  8. redistribute y, without source
  9. redistribute y, under another license
  10. sell x
  11. sell x, without source
  12. sell y
  13. sell y, without source
  14. redistribute copies of x
  15. redistribute copies of x, without source
  16. sell copies of y
  17. redistribute copies of y, without source

I know this is not the whole list of possibilities when we use multiple products and each of them with different licenses. Please feel free to change / add the cases and licenses.

Please give me, if there are any similar wiki links.

--V4vijayakumar (talk) 12:10, 22 April 2008 (UTC)[reply]

Number 10, "copyleft", is not a license, but a philosophy. So you might as well just cross that one out. --Captain Ref Desk (talk) 12:48, 22 April 2008 (UTC)[reply]

With respect, from Copyleft "Copyleft is a form of licensing and may be used to modify copyrights for works such as computer software, documents, music, and art. In general, copyright law allows an author to prohibit others from reproducing, adapting, or distributing copies of the author's work. In contrast, an author may, through a copyleft licensing scheme" Ironmandius (talk)

Also, I don't know what "redistribute copies" is supposed to cover that "redistribute" doesn't. I've left it off, below. --Captain Ref Desk (talk) 12:58, 22 April 2008 (UTC)[reply]

In case anyone does feel like helping out with this quite large compilation, I've made a table. I filled in GPL as I understand it; feel free to correct me if I've botched something. There are caveates, of course, depending on what one means by "sell" and "without source." --Captain Ref Desk (talk) 12:58, 22 April 2008 (UTC)[reply]

Yes, selling a license to use the software seems to be different from selling the distribution rights of the software. Kushal 20:37, 22 April 2008 (UTC)[reply]
Copyleft licenses
Use original for study Use orig. for profit Make derivatives Redistribute deriv. Redistribute deriv. w/out source Redistribute deriv. under another license Sell orig. Sell orig. w/out source Sell deriv. Sell deriv. w/out source Redistribute orig. Redistribute orig. w/out source
GPL Yes Yes Yes Yes No* No Yes** No* Yes** No* Yes No*
LGPL Yes Yes Yes Yes No* GPL Yes** No* Yes No* Yes No*
MIT
Apache License
BSD licenses Yes Yes Yes Yes Yes Yes Yes** Yes Yes** Yes Yes Yes
Mozilla Public License 1.1 Yes Yes Yes Yes*** No Yes Yes Yes
Common Development and Distribution License
Common Public License 1.0
Eclipse Public License

*If downloaded from a website, the website also needs a link to source code. If distributed by CD, etc, provide a written offer of the source code.[1]
**Taking a fee for distribution is allowed, but it is not strictly considered a sale of the intellectual property. *** Excludes trademarks, eg firefox branding.[2]

For sales of orig or of deriv; You are required to inform receiver that the product is licensed under GPL. For deriv it should be noted that products that link the licensed product might be considered derivative works.Taemyr (talk) 13:52, 22 April 2008 (UTC)[reply]

Developing

[edit]

With linux developers improving unix-like systems at an alarming rate in an attempt to creat more powerful and reliable operating systems at the same time that microsoft is developing new and improved versions of windows seems somewhat wasteful of electrical energy. —Preceding unsigned comment added by 195.194.74.154 (talk) 14:05, 22 April 2008 (UTC)[reply]

Do you have a question? --LarryMac | Talk 14:23, 22 April 2008 (UTC)[reply]
I can assure you that a skilled programmer's time is a far more valuable commodity than the electricity used to power his or her computer. If you want to complain about wasted resources due to duplicated effort, I'd worry more about that than the electricity. But every industry has duplicated effort between competitors. I don't see how you would avoid that, aside from central planning. -- Coneslayer (talk) 14:42, 22 April 2008 (UTC)[reply]
Competition requires some waste in the form of duplication of resources, but the overall hope is that it will be more efficient than monopoly, which has known drawbacks and inefficiencies as well. Measuring up net wattage is not a good way of measuring the efficiency of an industry in any case. --Captain Ref Desk (talk) 14:58, 22 April 2008 (UTC)[reply]
Boeing is even known to go so far as having two groups of internal developers independently write a program they need, so they can pick the best. Only a defense contractor can afford this type of internal competition. StuRat (talk) 22:23, 22 April 2008 (UTC)[reply]
Consider Evolution for the merits of competition. Consider different targets - Ubutnu and Vista versus Red Hat Enterprise Linux and Windows Server 2003. Then there's Monopoly. Costs are never cut and dry - as a simple hypothetical, suppose there was only Vista. I'd have to spend $500 (yes, there are other editions with other price points) to upgrade my operating system, and my job requires me to use a fair amount of electricity, so that would be a few hours of electric consumption that the existence of Ubuntu has precluded (not to mention that in the hypothetical monopolistic example, the price could be an order of magnitude larger, thus the time I - and every PC user - work to pay for the OS upgrade an order of magntitude longer... see Parable of the broken window. Not to mention, history, forks, and unintented consequences have taken us a long wheres from, say, CP/M Ironmandius (talk) 00:33, 23 April 2008 (UTC)[reply]

Windows explorer in XP - file rename

[edit]

I've just made a copy of a file via windows explorer on a PC running XP. Having done that, I renamed the file and XP decided to do the matching rename to the original file. Two questions. (1) Is this normal, I've never notriced it happen before? (2) How do I srop XP doing this. Thanks -- SGBailey (talk) 20:28, 22 April 2008 (UTC)[reply]

I think it is trying to autocomplete. I am not sure but it could be based on a setting that you decided on Internet Explorer. Its perfectly OK, and if I see the situation correctly, the extra text should be highlighted, and you should be able to ignore it, and go on typing without pressing 'Enter' when you see XP trying to autocomplete. if I read the situation wrong, please tell us know here. Kushal 20:33, 22 April 2008 (UTC)[reply]
Cheers. AFAIK, it has nothing to do with Internet Explorer. It definitely isn't OK. I don't want my files renamed by the OS on its whim. It may have highlit the filename, but I wasn't looking at that bit of text, rather I was looking at the filename that I was renaming - and did succesfully. Ctrl-Z restored the old name. I just don't want it mucking me about like this. -- SGBailey (talk) 22:04, 22 April 2008 (UTC)[reply]
I am terribly sorry if my reply seemed condescending. Please accept my apologies. Kushal 00:45, 23 April 2008 (UTC)[reply]
I've definitely never heard of that happening. Is this a repeatable problem? Does it happen with every file you copy? - Akamad (talk) 02:59, 23 April 2008 (UTC)[reply]
If it only happened once, you might have accidentally selected both files, and the rename operation affected both of them. --Bavi H (talk) 01:51, 24 April 2008 (UTC)[reply]