/altroot problem
Hi. I try to have a root backup with /altroot. I did everything related to the man pages. But i wonder why my /altroot partition is still empty. fstab file: /dev/wd0a / ffs rw,softdep 1 1 /dev/wd0d /altroot ffs xx 0 0 Both / and /altroot partitions are having the same size, I also added ROOTBACKUP=1 to /etc/daily.local, Daily.out file: Backing up root=/dev/rwd0a to /dev/rwd0d: 33129+1 records in 33129+1 records out 271393792 bytes transferred in 13.288 secs (20423240 bytes/sec) ** /dev/rwd0d
Re: /altroot problem
Andreas Gerdd wrote: Hi. I try to have a root backup with /altroot. I did everything related to the man pages. But i wonder why my /altroot partition is still empty. fstab file: /dev/wd0a / ffs rw,softdep 1 1 /dev/wd0d /altroot ffs xx 0 0 Both / and /altroot partitions are having the same size, I also added ROOTBACKUP=1 to /etc/daily.local, Daily.out file: Backing up root=/dev/rwd0a to /dev/rwd0d: 33129+1 records in 33129+1 records out 271393792 bytes transferred in 13.288 secs (20423240 bytes/sec) ** /dev/rwd0d How are you verifying that the /altroot PARTITION is empty? Nick.
Re: /altroot problem
ls /altroot shows nothing inside, other than ./ and ../ On Sun, Mar 28, 2010 at 17:51, Nick Holland n...@holland-consulting.net wrote: Andreas Gerdd wrote: Hi. I try to have a root backup with /altroot. I did everything related to the man pages. But i wonder why my /altroot partition is still empty. fstab file: /dev/wd0a / ffs rw,softdep 1 1 /dev/wd0d /altroot ffs xx 0 0 Both / and /altroot partitions are having the same size, I also added ROOTBACKUP=1 to /etc/daily.local, Daily.out file: Backing up root=/dev/rwd0a to /dev/rwd0d: 33129+1 records in 33129+1 records out 271393792 bytes transferred in 13.288 secs (20423240 bytes/sec) ** /dev/rwd0d How are you verifying that the /altroot PARTITION is empty? Nick.
Re: /altroot problem
Andreas Gerdd wrote on Sun, Mar 28, 2010 at 06:01:07PM +0300: On Sun, Mar 28, 2010, Nick Holland n...@holland-consulting.net wrote: Andreas Gerdd wrote: I try to have a root backup with /altroot. I did everything related to the man pages. But i wonder why my /altroot partition is still empty. fstab file: /dev/wd0a / ffs rw,softdep 1 1 /dev/wd0d /altroot ffs xx 0 0 Both / and /altroot partitions are having the same size, I also added ROOTBACKUP=1 to /etc/daily.local, Daily.out file: Backing up root=/dev/rwd0a to /dev/rwd0d: 33129+1 records in 33129+1 records out 271393792 bytes transferred in 13.288 secs (20423240 bytes/sec) ** /dev/rwd0d How are you verifying that the /altroot PARTITION is empty? ls /altroot shows nothing inside, other than ./ and ../ What does $ df /altroot tell you, in particular, which mount point is it reporting? Mounted on / or Mounted on /altroot? I'm asking because xx in fstab(5) means ignore totally, so /altroot will not be mounted by default, so ls(1) can't show the contents. By the way, this is useful behaviour. If you are regularly dd(1)ing into a partition, you do *not* want it to be mounted. Yours, Ingo
Re: /altroot problem
What does $ df /altroot tell you, in particular, which mount point is it reporting? Mounted on / or Mounted on /altroot? df /altroot shows: Mounted on / (df -h doesn't show /altroot.) So i cannot browse the content of /altroot, even though the backup files are there?
Re: /altroot problem
Andreas Gerdd wrote: What does $ df /altroot tell you, in particular, which mount point is it reporting? Mounted on / or Mounted on /altroot? df /altroot shows: Mounted on / (df -h doesn't show /altroot.) So i cannot browse the content of /altroot, even though the backup files are there? if your altroot slice is not mounted, /altroot is just some empty dir, as expected. if you want to see what is on there, you have to mount it first, like any other filesystem. mount it, have a look and don't forget to unmount it again. this is best done, when you are sure, that daily will not run while you have it mounted.
Re: /altroot problem
What does $ df /altroot tell you, in particular, which mount point is it reporting? Mounted on / or Mounted on /altroot? df /altroot shows: Mounted on / (df -h doesn't show /altroot.) Thus, /altroot is currently not mounted. So i cannot browse the content of /altroot, even though the backup files are there? We are slowly drifting off-topic, this is no more OpenBSD-specific, instead this is basic knowledge of basic Unix features. No, you cannot access a file system that is not mounted. You need to mount it first, see mount(8) for details. In case you just want to have a look, consider mounting it read-only. And don't forget to umount(8) it afterwards, or the next nightly dd(1) won't do what you expect.
Re: /altroot problem
On Sun, Mar 28, 2010 at 6:03 PM, Ingo Schwarze schwa...@usta.de wrote: df /altroot shows: Mounted on / (df -h doesn't show /altroot.) Thus, /altroot is currently not mounted. As you said before, it shouldn't be usually mounted as it is used by dd(1). daily.out's output on the first email shows that this partition stores a backup of /dev/wd0a right now. To look into it mount this partition on any mount point. For example: # mount /dev/wd0d /mnt # ls -al /mnt It should have a copy of your root partition, and you should be able to see it after mounting /dev/wd0d. Do not miss umount(8)ing it after looking into its contents (i.e., umount /mnt). So i cannot browse the content of /altroot, even though the backup files are there? We are slowly drifting off-topic, this is no more OpenBSD-specific, instead this is basic knowledge of basic Unix features. No, you cannot access a file system that is not mounted. You need to mount it first, see mount(8) for details. In case you just want to have a look, consider mounting it read-only. And don't forget to umount(8) it afterwards, or the next nightly dd(1) won't do what you expect. Agreed.