| 200 | |
| 201 | === ubuntu-hab === |
| 202 | ==== fdisk ==== |
| 203 | * mitty@ubuntu-hab:~$ sudo fdisk -u /dev/sdb |
| 204 | {{{ |
| 205 | Command (m for help): n |
| 206 | Command action |
| 207 | e extended |
| 208 | p primary partition (1-4) |
| 209 | p |
| 210 | Partition number (1-4): 1 |
| 211 | First sector (63-4194303, default 63): |
| 212 | Using default value 63 |
| 213 | Last sector, +sectors or +size{K,M,G} (63-4194303, default 4194303): +2000M |
| 214 | |
| 215 | Command (m for help): t |
| 216 | Selected partition 1 |
| 217 | Hex code (type L to list codes): 8e |
| 218 | Changed system type of partition 1 to 8e (Linux LVM) |
| 219 | |
| 220 | Command (m for help): p |
| 221 | |
| 222 | Disk /dev/sdb: 2147 MB, 2147483648 bytes |
| 223 | 255 heads, 63 sectors/track, 261 cylinders, total 4194304 sectors |
| 224 | Units = sectors of 1 * 512 = 512 bytes |
| 225 | Sector size (logical/physical): 512 bytes / 512 bytes |
| 226 | I/O size (minimum/optimal): 512 bytes / 512 bytes |
| 227 | Disk identifier: 0x4ab4a81c |
| 228 | |
| 229 | Device Boot Start End Blocks Id System |
| 230 | /dev/sdb1 63 4096063 2048000+ 8e Linux LVM |
| 231 | Partition 1 does not end on cylinder boundary. |
| 232 | |
| 233 | Command (m for help): w |
| 234 | The partition table has been altered! |
| 235 | |
| 236 | Calling ioctl() to re-read partition table. |
| 237 | Syncing disks. |
| 238 | }}} |
| 239 | |
| 240 | ==== pvcreate/vgcreate/lvcreate ==== |
| 241 | * mitty@ubuntu-hab:~$ sudo pvcreate /dev/sdb1 |
| 242 | {{{ |
| 243 | Physical volume "/dev/sdb1" successfully created |
| 244 | }}} |
| 245 | * mitty@ubuntu-hab:~$ sudo vgcreate -s 32 vgnfs /dev/sdb1 |
| 246 | {{{ |
| 247 | Volume group "vgnfs" successfully created |
| 248 | }}} |
| 249 | * mitty@ubuntu-hab:~$ sudo lvcreate --size 1.5G -n drbd vgnfs |
| 250 | {{{ |
| 251 | Logical volume "drbd" created |
| 252 | }}} |
| 253 | * see [./log#lvm2onubuntu-hab] for detail |