daily pastebin goal
0%
SHARE
TWEET

LVM - Copying old OS?

a guest Aug 19th, 2012 18 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. root@ubuntu:~# fdisk -l
  51.  
  52. ### Disk /dev/sda: 750.2 GB, 750156374016 bytes
  53. 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
  54. Units = sectors of 1 * 512 = 512 bytes
  55. Sector size (logical/physical): 512 bytes / 4096 bytes
  56. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  57. Disk identifier: 0x000a58db
  58.  
  59.    Device Boot      Start         End      Blocks   Id  System
  60. /dev/sda1   *        2148  1449722656   724860254+  83  Linux
  61. Partition 1 does not start on physical sector boundary.
  62. /dev/sda2      1449722657  1465149167     7713255+   5  Extended
  63. Partition 2 does not start on physical sector boundary.
  64. /dev/sda5      1449722658  1465149167     7713255   83  Linux
  65. Partition 5 does not start on physical sector boundary.
  66.  
  67. Disk /dev/mapper/cc11rocksVG-boot: 322.1 GB, 322122547200 bytes
  68. 255 heads, 63 sectors/track, 39162 cylinders, total 629145600 sectors
  69. Units = sectors of 1 * 512 = 512 bytes
  70. Sector size (logical/physical): 512 bytes / 4096 bytes
  71. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  72. Disk identifier: 0x00000000
  73.  
  74. Disk /dev/mapper/cc11rocksVG-boot doesn't contain a valid partition table
  75. ###
  76.  
  77. #Questions
  78. 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).
  79.  
  80. 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?
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top