What does this do?

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
bocochoco
Posts: 317
Joined: Thu Aug 06, 2009 8:22 pm UTC

What does this do?

Postby bocochoco » Mon Dec 20, 2010 3:24 pm UTC

I just found this bash script in my home directory. I don't remember writing it, and I definitely don't really get what it does.

Code: Select all

dd if=/dev/zero of=/srv/loop bs=1 count=1 seek=5368709120
losetup -f /srv/loop
pvcreate /dev/loop0
vgextend vg0 /dev/loop0
lvcreate -s -n home-snapshot /dev/vg0/home -L 5G


Looks like it's creating a file of zeros, then using losetup to make that into a loop device and then adding that to LVM as a new hard drive. But wheres this info being stored?
Image

Moose Hole
Posts: 398
Joined: Fri Jul 09, 2010 1:34 pm UTC

Re: What does this do?

Postby Moose Hole » Mon Dec 20, 2010 4:05 pm UTC


User avatar
bocochoco
Posts: 317
Joined: Thu Aug 06, 2009 8:22 pm UTC

Re: What does this do?

Postby bocochoco » Tue Dec 21, 2010 2:41 pm UTC


I see. That makes sense. Thank you.
Image


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 7 guests