Guest User

LVM - Copying old OS?

a guest
Aug 19th, 2012
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Disc - /dev/sda1 with everything
  2.  
  3. pvcreate /dev/sda1
  4. vgcreate cc11rocksVG /dev/sda1
  5. lvcreate --size 300G --name boot cc11rocksVG
  6.  
  7. resize2fs /dev/sda1 300G #Failed
  8.  
  9. pvdisplay #This is what showed up
  10.  
  11. ### --- Physical volume ---
  12. PV Name /dev/sda1
  13. VG Name cc11rocksVG
  14. PV Size 691.28 GiB / not usable 3.34 MiB
  15. Allocatable yes
  16. PE Size 4.00 MiB
  17. Total PE 176967
  18. Free PE 100167
  19. Allocated PE 76800
  20. PV UUID wvMkB9-0KHW-fK7v-rMxi-gnwy-ycLL-dhuRmu
  21. ###
  22.  
  23. #Without the "#", I added those to show that they were the output
  24.  
  25. root@ubuntu:/dev# mkfs.ext4 /dev/cc11rocksVG/boot #Output below
  26.  
  27. ###mke2fs 1.42 (29-Nov-2011)
  28. Filesystem label=
  29. OS type: Linux
  30. Block size=4096 (log=2)
  31. Fragment size=4096 (log=2)
  32. Stride=0 blocks, Stripe width=0 blocks
  33. 19660800 inodes, 78643200 blocks
  34. 3932160 blocks (5.00%) reserved for the super user
  35. First data block=0
  36. Maximum filesystem blocks=0
  37. 2400 block groups
  38. 32768 blocks per group, 32768 fragments per group
  39. 8192 inodes per group
  40. Superblock backups stored on blocks:
  41. 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
  42. 4096000, 7962624, 11239424, 20480000, 23887872, 71663616
  43.  
  44. Allocating group tables: done
  45. Writing inode tables: done
  46. Creating journal (32768 blocks): done
  47. Writing superblocks and filesystem accounting information: done
  48. ###
  49.  
  50.  
  51. #Questions
  52. Are all of my files gone? Where do I go from here? I originally had Ubuntu 12.04 LTS on /dev/sda1 (sda2 & sda5 are swap, nothing else on drive).
  53.  
  54. I started the install to see what the installer would let me do. It's finding "/dev/mapper/cc11rockVG-boot", "/dev/mapper/cc11rocksVG-boot" with type ext4 (322122 MB). Then on to "/dev/sda", encasing "/dev/sda1" (742256 MB) then finally "/dev/sda5" with type swap (7898 MB). It looks like this is how it is supposted to be. How do I transfer the files from my OS (move entire OS into LV), then delete it?
Advertisement
Add Comment
Please, Sign In to add comment