[linux-lvm] backup with snapshots - some principal questions

Lentes, Bernd bernd.lentes at helmholtz-muenchen.de
Mon Dec 7 20:05:03 UTC 2015


Bernd wrote:
> Hi,
> 
> i have several servers running different Linux distributions.
> Our computing center provides a network-based backup solution
> (Legato/EMC), which saves the disks every night. But when the servers
> run, this backup is of course not consistent.
> The servers are running a lvm configuration (/ on lv and /boot on a
> physical partition).
> My idea is to create a snapshot and mount it before the network backup
> comes. When this is stored, my backup is consistent. I can configure the
> networker client in such a manner that the "live" lv is not saved, just
the
> snapshot so that the server is not saved twice.
> My questions:
> Before I create a new snapshot, I'd like to remove the old one. Is there
> something I have to take care of or can I just delete it using lvremove
?
> No merging or s.th. like that before ?
> What is if I'd like to apply the snapshot ? Which command do I have to
> use for rolling back the system to a snapshot ?
> 
> Thanks.
> 
> 

Hi,

i'm testing currently. This is my script:

cd
logger Skript snapshot.sh starts
date > /var/log/snapshot.log
test -e /mnt/sn_root/etc && umount /mnt/sn_root >> /var/log/snapshot.log
2>&1
/sbin/lvremove -f /dev/vg1/sn_root >> /var/log/snapshot.log 2>&1
/sbin/lvcreate -L 9G -n sn_root -s /dev/vg1/lv_root >>
/var/log/snapshot.log 2>&1
test -e /mnt/sn_root && mount /dev/vg1/sn_root /mnt/sn_root >>
/var/log/snapshot.log 2>&1
logger < /var/log/snapshot.log
logger Skript snapshot.sh finished

I get this in /var/log/messages:

Dec  7 20:59:00 vm53200-12 root: Skript snapshot.sh starts
Dec  7 20:59:01 vm53200-12 /usr/sbin/cron[28428]: (root) CMD
(/usr/sbin/logwatch --service dmeventd)
Dec  7 20:59:01 vm53200-12 lvm[13903]: No longer monitoring snapshot
vg1-sn_root
Dec  7 20:59:05 vm53200-12 lvm[13903]: Monitoring snapshot vg1-sn_root
Dec  7 20:59:06 vm53200-12 kernel: [1043986.343038] kjournald starting.
Commit interval 15 seconds
Dec  7 20:59:06 vm53200-12 kernel: [1043986.343196] EXT3-fs (dm-1): using
internal journal
Dec  7 20:59:06 vm53200-12 kernel: [1043986.402634] ext3_orphan_cleanup:
deleting unreferenced inode 157171
Dec  7 20:59:06 vm53200-12 kernel: [1043986.435634] ext3_orphan_cleanup:
deleting unreferenced inode 156958
Dec  7 20:59:06 vm53200-12 kernel: [1043986.705218] ext3_orphan_cleanup:
deleting unreferenced inode 157169
Dec  7 20:59:06 vm53200-12 kernel: [1043986.744313] ext3_orphan_cleanup:
deleting unreferenced inode 157168
Dec  7 20:59:07 vm53200-12 kernel: [1043987.299663] ext3_orphan_cleanup:
deleting unreferenced inode 156949

...

Dec  7 20:59:07 vm53200-12 kernel: [1043987.956167] ext3_orphan_cleanup:
deleting unreferenced inode 157126
Dec  7 20:59:07 vm53200-12 kernel: [1043987.962637] ext3_orphan_cleanup:
deleting unreferenced inode 157125
Dec  7 20:59:07 vm53200-12 kernel: [1043987.969118] ext3_orphan_cleanup:
deleting unreferenced inode 157091
Dec  7 20:59:07 vm53200-12 kernel: [1043987.976513] ext3_orphan_cleanup:
deleting unreferenced inode 156520
Dec  7 20:59:07 vm53200-12 kernel: [1043987.976534] ext3_orphan_cleanup:
deleting unreferenced inode 156518
Dec  7 20:59:08 vm53200-12 kernel: [1043988.018951] ext3_orphan_cleanup:
deleting unreferenced inode 563237
Dec  7 20:59:08 vm53200-12 kernel: [1043988.040367] EXT3-fs (dm-1): 68
orphan inodes deleted
Dec  7 20:59:08 vm53200-12 kernel: [1043988.040369] EXT3-fs (dm-1):
recovery complete
Dec  7 20:59:08 vm53200-12 logger: Mon Dec  7 20:59:00 CET 2015
Dec  7 20:59:08 vm53200-12 logger:   Logical volume "sn_root" successfully
removed
Dec  7 20:59:08 vm53200-12 logger:   Logical volume "sn_root" created
Dec  7 20:59:08 vm53200-12 root: Skript snapshot.sh finished

What does the message " ext3_orphan_cleanup: deleting unreferenced inode
xxxxxx" means ?
And it appears always when the script runs.


Bernd








   

Helmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Nikolaus Blum, Dr. Alfons Enhsen
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671




More information about the linux-lvm mailing list