Bacula-users

Re: [Bacula-users] Some problem with database and volumes

2010-02-04 20:12:27
Subject: Re: [Bacula-users] Some problem with database and volumes
From: "Mike Holden" <bacula AT mikeholden DOT org>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 5 Feb 2010 00:45:46 -0000
eMJay wrote:
>
>
>> On Thu, Feb 4, 2010 at 11:01 AM, eMJay <bacula-forum < at > 
>> backupcentral.com> wrote:
>> Quote:
>>
>>
>> Quote:
>> check permission on your /mnt/mnt1 as the running bacula-sd daemon should be 
>> allowed
>> to write some backup data here
>> isn't it ?
>>
>>
>>
>>
>> On 02/04/2010 09:16 AM, eMJay wrote:
>> Quote:
>>
>>
>> Quote:
>> I already had this problem. I suspect that it happens when a volume is
>> recycled after the backup job starts
>> Do you have enough volumes? Is Purge Oldest Volumes option set?
>>
>>
>> I have created 10 volumes.
>> +---------+------------+-----------+---------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
>> | MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | 
>> VolRetention |
>> Recycle | Slot | InChanger | MediaType | LastWritten |
>> +---------+------------+-----------+---------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
>> | 1 | store0001 | Full | 1 | 0 | 0 | 31,536,000 | 1 | 0 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> | 2 | store0002 | Append | 1 | 0 | 0 | 31,536,000 | 1 | 1 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> | 3 | store0003 | Append | 1 | 0 | 0 | 31,536,000 | 1 | 2 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> | 4 | store0004 | Append | 1 | 0 | 0 | 31,536,000 | 1 | 3 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> | 5 | store0005 | Append | 1 | 0 | 0 | 31,536,000 | 1 | 4 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> | 6 | store0006 | Append | 1 | 0 | 0 | 31,536,000 | 1 | 5 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> | 7 | store0007 | Append | 1 | 0 | 0 | 31,536,000 | 1 | 6 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> | 8 | store0008 | Append | 1 | 0 | 0 | 31,536,000 | 1 | 7 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> | 9 | store0009 | Append | 1 | 0 | 0 | 31,536,000 | 1 | 8 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> | 10 | store0010 | Append | 1 | 0 | 0 | 31,536,000 | 1 | 9 | 0 | File | 
>> 0000-00-00
>> 00:00:00 |
>> +---------+------------+-----------+---------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
>>
>> Because I am newbie, I wonder if volumes are created correctly.
>> I suspect there is something wrong, because when I try to run job, the 
>> output is:
>>
>> 04-Feb 09:01 ubuntu-sd JobId 15: Warning: label.c:351 Open device 
>> "FileStorage"
>> (/mnt/mnt1) Volume "store0002" failed: ERR=dev.c:490 Could not open:
>> /mnt/mnt1/store0002, ERR=Permission denied
>>
>> 04-Feb 09:01 ubuntu-sd JobId 15: Please mount Volume "store0002" or label a 
>> new one
>> for:
>> Job: Client1.2010-02-04_09.01.19.04
>> Storage: "FileStorage" (/mnt/mnt1)
>> Pool: Default
>> Media type: File
>>
>> When tried to label:
>>
>> *label
>> Automatically selected Catalog: MyCatalog
>> Using Catalog "MyCatalog"
>> Automatically selected Storage: File
>> Enter new Volume name: store0003
>> Defined Pools:
>> 1: Default
>> 2: Scratch
>> Select the Pool (1-2): 1
>> Connecting to Storage daemon File at ubuntu:9103 ...
>> Sending label command for Volume "store0003" Slot 2 ...
>> 3910 Unable to open device "FileStorage" (/mnt/mnt1): ERR=dev.c:490 Could 
>> not open:
>> /mnt/mnt1/store0003, ERR=Permission denied
>>
>> Label command failed for Volume store0003.
>> Do not forget to mount the drive!!!
>>
>> I don't understand that ERR=Permission denied. That dir is already created 
>> with chmod
>> 666
>>
>> And finally an output after status 2 command:
>> Device status:
>> Device "FileStorage" (/mnt/mnt1) is not open.
>> Device is BLOCKED waiting for mount of volume "store0002",
>> Pool: Default
>> Media type: File
>>
>> How can I mount store0002 volume? I doesn't work using command in bconsole. 
>> In
>> bacula-sd.conf, I set storage device like this:
>> Device {
>> Name = FileStorage
>> Media Type = File
>> Archive Device = /mnt/mnt1
>> LabelMedia = yes; # lets Bacula label unlabeled media
>> Random Access = Yes;
>> AutomaticMount = yes; # when device opened, read it
>> RemovableMedia = no;
>> AlwaysOpen = yes;
>> }
>>
>> Thanks for help,
>> Michal
>>
>>
>> You didn't read my previous post carefully, did you?
>> I have already set read and write permission on both /mnt and /mnt/mnt1 for 
>> everybody.
>>
>>
>> What about the files inside?
>
>
> Well, there are actually no files inside, since backup still doesn't work. 
> It's just an
> empty directory, in which I think bacula should copy backup files.

Has it ever created any files? Looks like store0001 should exist, as that is 
Full?

Can you run:

ls -laR /mnt

and

ps -ef|grep bacula

and post the output (assuming there isn't too much of it!)?

Just noticed that you state chmod 666, which is probably not adequate, since 
you need
execute permission as well. 666 gives rw-, while you need rwx to allow the 
bacula server
to descend into the directories.

Assuming you are running bacula as root, and root owns both /mnt and /mnt/mnt1, 
then
/mnt and /mnt/mnt1 should have 755 permissions, or even more strictly 750 or 
700,
depending on how paraniod/security conscious you are!

Quoting is a nightmare in this thread so far, because people are top, bottom and
middle-posting, all in the same thread, some are trimming useful stuff, some are
trimming nothing, and the whole thing is an unreadable mess! Please 
bottom-post, and
trim unnecessary text from the mail you are replying to. This explains why I 
read this
thread from the beginning, but didn't notice the 666 reference until just now, 
and why
you had a go at someone for not reading your earlier post, when they probably 
had! You
also keep replying to the thread but removing the "Re:" part of the subject, 
making it
look like a new post rather than a reply to an earlier one. Email is our friend 
when we
use it well, but our enemy when we use it badly!
-- 
Mike Holden

http://www.by-ang.com - the place to shop
for all manner of hand crafted items,
including Jewellery, Greetings Cards and Gifts



------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users