How to backup ReiserFS based RAID using amanda on Fedora FC3? - Unix

This is a discussion on How to backup ReiserFS based RAID using amanda on Fedora FC3? - Unix ; Hi, we are using amanda for backups here and recently we added a new machine (4 CPU Compaq with 4 SCSI disks and HW RAID) and installed the newest Fedora on it. It uses ReiserFS. I added its parititions to ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: How to backup ReiserFS based RAID using amanda on Fedora FC3?

  1. How to backup ReiserFS based RAID using amanda on Fedora FC3?

    Hi,

    we are using amanda for backups here and recently we added a new machine (4
    CPU Compaq with 4 SCSI disks and HW RAID) and installed the newest Fedora
    on it. It uses ReiserFS. I added its parititions to disklist file on our
    backup server and modified .amandahosts file on the client (hector), but
    when I do 'amcheck -c ' it reports:

    Amanda Backup Client Hosts Check
    --------------------------------
    ERROR: hector: [could not access /dev/mapper/VolGroup00-LogVol02 (/var): Permission denied]
    ERROR: hector: [could not access /dev/ida/c0d0p1 (/boot): Permission denied]
    ERROR: hector: [could not access /dev/mapper/VolGroup00-LogVol00 (/): Permission denied]
    Client check: 16 hosts checked in 2.638 seconds, 3 problems found


    Now, I see that permissions of these are:

    hector# ls -al /dev/mapper/
    total 0
    drwxr-xr-x 2 root root 120 Mar 15 12:39 ./
    drwxr-xr-x 10 root root 4620 Mar 15 17:42 ../
    crw------- 1 root root 10, 63 Mar 15 12:39 control
    brw------- 1 root root 253, 0 Mar 15 12:39 VolGroup00-LogVol00
    brw------- 1 root root 253, 2 Mar 15 12:39 VolGroup00-LogVol01
    brw------- 1 root root 253, 1 Mar 15 12:39 VolGroup00-LogVol02

    so I tried changing it to 660 (after adding amanda to group root), but
    still the same message. If I change amanda's id from 33 to 0 (which is
    something I'll rather not do), and try 'amcheck -c ', it
    times out:

    Amanda Backup Client Hosts Check
    --------------------------------
    WARNING: hector: selfcheck request timed out. Host down?

    Ditto if I copy .amandahosts to / and /root and/or allow root to it.

    So, what should I do? This is to become our mail server, so I'll rather
    have its backups working properly.

    TIA, Dragan

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!

  2. Re: How to backup ReiserFS based RAID using amanda on Fedora FC3?

    Dragan Cvetkovic wrote:
    > ERROR: hector: [could not access /dev/mapper/VolGroup00-LogVol02 (/var):
    > Permission denied]
    >
    > Now, I see that permissions of these are:
    >
    > hector# ls -al /dev/mapper/
    > total 0
    > drwxr-xr-x 2 root root 120 Mar 15 12:39 ./
    > drwxr-xr-x 10 root root 4620 Mar 15 17:42 ../
    > brw------- 1 root root 253, 1 Mar 15 12:39 VolGroup00-LogVol02
    >
    > so I tried changing it to 660 (after adding amanda to group root), but
    > still the same message.


    Do a 'su - amanda', then
    cd /dev
    cd mapper
    head -10 VolGroup00-LogVol02

    One of these should give you an error, proceed fro there.

    Yours,
    Laurenz Albe

  3. Re: How to backup ReiserFS based RAID using amanda on Fedora FC3?

    Laurenz Albe writes:

    > Dragan Cvetkovic wrote:
    >> ERROR: hector: [could not access /dev/mapper/VolGroup00-LogVol02 (/var):
    >> Permission denied]
    >>
    >> Now, I see that permissions of these are:
    >>
    >> hector# ls -al /dev/mapper/
    >> total 0
    >> drwxr-xr-x 2 root root 120 Mar 15 12:39 ./
    >> drwxr-xr-x 10 root root 4620 Mar 15 17:42 ../
    >> brw------- 1 root root 253, 1 Mar 15 12:39 VolGroup00-LogVol02
    >>
    >> so I tried changing it to 660 (after adding amanda to group root), but
    >> still the same message.

    >
    > Do a 'su - amanda', then
    > cd /dev
    > cd mapper
    > head -10 VolGroup00-LogVol02
    >
    > One of these should give you an error, proceed fro there.


    I am not sure I understand what you are trying to say. I can cd both do
    /dev and to mapper from it (as amanda), but head -10 VolGroup00-LogVol02
    gives a permission error which is to be expected since I am not root.

    My temprary solution was to change VolGroup00-LogVol02 to mode 640 and its
    group to disk, but that change is gone after a reboot (and playing with
    /etc/udev/permission.d/ doesn't change that).

    Dragan

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!

  4. Re: How to backup ReiserFS based RAID using amanda on Fedora FC3?

    Dragan Cvetkovic wrote:
    > I am not sure I understand what you are trying to say. I can cd both do
    > /dev and to mapper from it (as amanda), but head -10 VolGroup00-LogVol02
    > gives a permission error which is to be expected since I am not root.
    >
    > My temprary solution was to change VolGroup00-LogVol02 to mode 640 and its
    > group to disk, but that change is gone after a reboot (and playing with
    > /etc/udev/permission.d/ doesn't change that).


    I will try to explain.

    I assumed that the program that got the error you quoted in your original
    post was run by user amanda. The commands I gave you should exhibit
    where your permission problems are.

    If you want user amanda to read the logical volume, you must somehow
    grant him/her read access.

    Since the permissions on your /dev/mapper entries change after reboot,
    I assume that there is a 'vgmknodes' somewhere in your startup scripts.

    There are two options to make user amanda read the logical volume:
    1) add the user to group root
    2) disable the invocation of 'vgmknodes' in the startup script and
    change the permissions of the /dev/mapper entries.

    If I failed to understand your problem, please be patient and explain.

    Yours,
    Laurenz Albe

  5. Re: How to backup ReiserFS based RAID using amanda on Fedora FC3?

    Laurenz Albe wrote:
    > There are two options to make user amanda read the logical volume:
    > 1) add the user to group root
    > 2) disable the invocation of 'vgmknodes' in the startup script and


    Actually, in your original post the permissions were
    brw------- root root, so solution 1 will not work.
    That's kind of strange, since vgmknodes creates the volumes as
    brw-r----- on my system.
    Things on RedHat systems are sometimes nonstandard.

    Are you using LVM version 2?

    Yours,
    Laurenz Albe

  6. Re: How to backup ReiserFS based RAID using amanda on Fedora FC3?

    Laurenz Albe writes:

    > Laurenz Albe wrote:
    >> There are two options to make user amanda read the logical volume:
    >> 1) add the user to group root
    >> 2) disable the invocation of 'vgmknodes' in the startup script and

    >
    > Actually, in your original post the permissions were
    > brw------- root root, so solution 1 will not work.
    > That's kind of strange, since vgmknodes creates the volumes as
    > brw-r----- on my system.
    > Things on RedHat systems are sometimes nonstandard.
    >
    > Are you using LVM version 2?


    It's Fedora FC3 so I assume that it is LVM2. I don't know much about it
    (Linux is not exactly my speciality). As I said before I played with
    /etc/udev/permission.d/* scripts to give root:disk and 660 to /dev/mapper/*
    but now only the control file gets it, whereas the rest of the files are
    still (udev default) root:root and 600.

    I'll check vgmknodes, thanks.

    Bye, Dragan

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!

  7. Re: How to backup ReiserFS based RAID using amanda on Fedora FC3?

    Dragan Cvetkovic writes:

    > Laurenz Albe writes:
    >
    >> Laurenz Albe wrote:
    >>> There are two options to make user amanda read the logical volume:
    >>> 1) add the user to group root
    >>> 2) disable the invocation of 'vgmknodes' in the startup script and

    >>
    >> Actually, in your original post the permissions were
    >> brw------- root root, so solution 1 will not work.
    >> That's kind of strange, since vgmknodes creates the volumes as
    >> brw-r----- on my system.
    >> Things on RedHat systems are sometimes nonstandard.
    >>
    >> Are you using LVM version 2?

    >
    > It's Fedora FC3 so I assume that it is LVM2. I don't know much about it
    > (Linux is not exactly my speciality). As I said before I played with
    > /etc/udev/permission.d/* scripts to give root:disk and 660 to /dev/mapper/*
    > but now only the control file gets it, whereas the rest of the files are
    > still (udev default) root:root and 600.


    Actually, it seems that permissions were a red herring. I found the
    following error messages in amanda log files:

    calculating for device '/dev/mapper/VolGroup00-LogVol00' with 'reiserfs'
    running "/sbin/dump 0Ssf 1048576 - /dev/mapper/VolGroup00-LogVol00"
    running /usr/lib/amanda/killpgrp
    /dev/mapper/VolGroup00-LogVol00: Bad magic number in super-block while opening filesystem
    DUMP: The ENTIRE dump is aborted.

    Hm. That's more serious problem. Any ideas here?

    TIA, Dragan

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!

  8. Re: How to backup ReiserFS based RAID using amanda on Fedora FC3?

    Dragan Cvetkovic wrote:
    > Actually, it seems that permissions were a red herring. I found the
    > following error messages in amanda log files:
    >
    > calculating for device '/dev/mapper/VolGroup00-LogVol00' with 'reiserfs'
    > running "/sbin/dump 0Ssf 1048576 - /dev/mapper/VolGroup00-LogVol00"
    > running /usr/lib/amanda/killpgrp
    > /dev/mapper/VolGroup00-LogVol00: Bad magic number in super-block while
    > opening filesystem
    > DUMP: The ENTIRE dump is aborted.


    The problem is that I have no knowledge of Amanda.

    However, the message in your first post is very indicative of a permisson
    problem.

    Please answer:

    - As which user do the backup processes run?

    If they do not run as root, and the permissions are as you stated in your
    first posting, then the backup process cannot read the logical volume.
    Period.

    If they run as root, the problem is indeed something else.

    Does Amanda work with ReiserFS? I poked around on the web site but found
    no answer.

    Yours,
    Laurenz Albe

  9. Re: How to backup ReiserFS based RAID using amanda on Fedora FC3?

    Laurenz Albe writes:

    > Dragan Cvetkovic wrote:
    >> Actually, it seems that permissions were a red herring. I found the
    >> following error messages in amanda log files:
    >>
    >> calculating for device '/dev/mapper/VolGroup00-LogVol00' with 'reiserfs'
    >> running "/sbin/dump 0Ssf 1048576 - /dev/mapper/VolGroup00-LogVol00"
    >> running /usr/lib/amanda/killpgrp
    >> /dev/mapper/VolGroup00-LogVol00: Bad magic number in super-block while
    >> opening filesystem
    >> DUMP: The ENTIRE dump is aborted.

    >
    > The problem is that I have no knowledge of Amanda.
    >
    > However, the message in your first post is very indicative of a permisson
    > problem.


    [snip]

    > Does Amanda work with ReiserFS? I poked around on the web site but found
    > no answer.


    Actually, amanda uses whatever native backup program for the platform is
    (ufsdump on Solaris, dump on AIX, etc), so it tries to use dump on Linux
    but fails since dump is FS specific and only works with ext2 and ext3. I
    could use tar instead, but that makes it even more complicated for two
    reasons:

    1. It's much slower than dump;
    2. It need to be able to read _all_ files it backs up so we would have to
    run it as a root (which we don't want) -- dump only needs persmissions for
    underlining raw device which is much easier to set.

    Since the machine is quite new and not in production yet, We decided to
    resolve the problem by switching from ReiserFS to ext3. Shame actually,
    since ReiserFS is faster than ext3...

    Thanks for your help, but that turned out to be a limitation of the
    particular FS and not a setup (or user) error as I have hoped it would be.

    Bye, Dragan

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!

+ Reply to Thread