Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to be able to run system image backups of my root partition without downtime.

I've read that I can use LVM snapshots and dd to create such images, but my current lvgroup has no unallocated space (I assume that's the right way to describe it) so the lvcreate -s is failing.

I've read that I might lvextend onto an (unallocated?) flash drive but that seems still cumbersome.

Seeing as I have 8gb of ram, I figure I could easily spare 4gb of ram for the duration of a backup operation and use the ram as the backing store of the snapshot.

But tmpfs just creates a mountpoint and not the device node I need for pvcreate. And I've read that Ubunutu (my distro) uses /dev/shm for tmpfs but I don't understand how that's supposed to work. And it doesn't anyway with "Device /dev/shm not found (or ignored by filtering)".

The following fails too:

sudo mknod -m 660 /dev/ram b 1 1
sudo dd if=/dev/zero of=/dev/ram bs=1K count=4294967296
sudo /sbin/mkfs -t ext4 -m 0 /dev/ram 4294967296

Perhaps because the ramdisk size is too large for the kernel limit? Also not sure why zeroing is necessary or effective in ram anyway, or why I'd make a filesystem at all.

How can I use available RAM to temporarily store the snapshot during the dd operation? And how do I clean up after all that when it's over?

Thanks!

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.