Logical volumes and trying to mount backupdir readonly
Posted: Tue Feb 09, 2010 3:32 pm
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.
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.