I upgraded to amahi 5.1 by reinstalling my server and adding an extra harddisk. Fedora 12 uses Logical volumes, so I created one for the extra harddisk that I mount under /var/hda/files. I also mounted an extra logical volume on my system disk at /var/hda/files/downloads. This way I can also put the space on my system disk to good use. I used the LVM manager in Fedora for all this. I only had to change the order of mounts in fstab manually to get /var/hda/files/downloads mounted after /var/hda/files.
I created a new volumegroup for the extra harddisk because I think that I won't lose it's data when the system disk fails. But is this correct?
I will post my /etc/fstab below, can anyone comment on this configuration. Tips are welcome.
#
# /etc/fstab
# Created by anaconda on Sat Feb 6 21:56:41 2010
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
# this is all on my 750Gb system disk
/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=5b5952be-b048-4b64-bc50-f0d1a72d2ff5 /boot ext4 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
# this is how I mounted an extra 1Tb disk
/dev/1Tb_schijf/tb_data /var/hda/files ext4 defaults 1 2
# this is how I use the additional space on my system disk with a logical volume lv_downloads of 650Gb
/dev/VolGroup/lv_downloads /var/hda/files/downloads ext4 defaults 1 2
# this is how I mount my external usb drive permanently, so it works after a reboot. I use LABEL instead of /dev/sdc1 to avoid mounting the wrong drive
LABEL=seagateusb /media/seagateusb ext3 defaults 0 0
# this is an attempt to mount the rsnapshot backup readonly, but it IGNORES the readonly option
/media/seagateusb/.private/.snapshots/ /var/hda/files/backup none bind,ro 0 0
The last two lines I added manually to permanently mount an external usb drive where I backup my files through rsnapshot.
I try to mount the snapshot directory readonly to \\hda\backup but unfortunately it is still writable. according to some google searches this is a bug in the kernel. the readonly option is ignored in fstab.
I tried to make it readonly by setting the share backup to readonly in the hda webinterface but this also does not work. I think the subdirectories in the backup get the same rights as the original subdirectories.
At rsnapshot.org the "Howto" described how to do this using an nfs share, but NFS is not running on my amahi server and i am afraid i will make things too complicated when i try to get NFS running.
Has anybody managed to arrange a setup like mine that is really readonly?
I think this could be a very nice backup option for amahi where users can restore lost files very easily. If I get things working right I will try to write a wiki page about it.
Logical volumes and trying to mount backupdir readonly
Re: Logical volumes and trying to mount backupdir readonly
Q: I created a new volumegroup for the extra harddisk because I think that I won't lose it's data when the system disk fails. But is this correct?
A: Yes, however if this extra disk fails your /var/hda/files/downloads will not mount. Plus that you'll need to do some voodoo when trying to recover the LVM info if your primary drive is broken and replaced and you have reinstalled. Just some voodoo though, nothing like needing virgins and goat blood and candles and stuff.
A: Yes, however if this extra disk fails your /var/hda/files/downloads will not mount. Plus that you'll need to do some voodoo when trying to recover the LVM info if your primary drive is broken and replaced and you have reinstalled. Just some voodoo though, nothing like needing virgins and goat blood and candles and stuff.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Re: Logical volumes and trying to mount backupdir readonly
ummmm......
if it's read only then how can anything write to it? i imagine you want it as read only for cetain users so that would be file permissions.
also, nfs is there. you just have to enable it but you won't be working in the amahi dashboard to use it.
if it's read only then how can anything write to it? i imagine you want it as read only for cetain users so that would be file permissions.
also, nfs is there. you just have to enable it but you won't be working in the amahi dashboard to use it.
Re: Logical volumes and trying to mount backupdir readonly
Q: ummmm......if it's read only then how can anything write to it? i imagine you want it as read only for cetain users so that would be file permissions.
A: Actually rsnapshot writes to /media/seagateusb/.private/.snapshots/ this directory is mounted again at /var/hda/files/backup. This way users can see all the backups of files they have permissions for. But I don't want users or even myself be able to mess with a backup. Therefore it should be mounted as readonly. In that way nobody can alter or delete backups. Not even root.
Quote: also, nfs is there. you just have to enable it but you won't be working in the amahi dashboard to use it.
How should I enable nfs, without messing up anything in amahi? I am still a linux newbie on a steep learning curve
A: Actually rsnapshot writes to /media/seagateusb/.private/.snapshots/ this directory is mounted again at /var/hda/files/backup. This way users can see all the backups of files they have permissions for. But I don't want users or even myself be able to mess with a backup. Therefore it should be mounted as readonly. In that way nobody can alter or delete backups. Not even root.
Quote: also, nfs is there. you just have to enable it but you won't be working in the amahi dashboard to use it.
How should I enable nfs, without messing up anything in amahi? I am still a linux newbie on a steep learning curve
Re: Logical volumes and trying to mount backupdir readonly
issue the following commands:
edit the /etc/exports file, add your mountpoint, * for all clients, you can also add hostnames (with wildcards, like host* ) ro for read only rw for read write:
and then
(or restart if it's already running).
Code: Select all
root@host# chkconfig nfs --level 2345 on
Code: Select all
/mountpoint *(rw,no_root_squash)
Code: Select all
root@host# service nfs start
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD
Re: Logical volumes and trying to mount backupdir readonly
Thank you moredruid, got it working now.
I documented everything I did and made a manual in the wiki.
http://wiki.amahi.org/index.php/Rsnapshot
comments are welcome, or even better modify the wiki.
I documented everything I did and made a manual in the wiki.
http://wiki.amahi.org/index.php/Rsnapshot
comments are welcome, or even better modify the wiki.
Who is online
Users browsing this forum: No registered users and 17 guests