Advertisement
Guest User

Untitled

a guest
Sep 20th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. Разбиваем диск
  2.  
  3. /sbin/fdisk /dev/sda
  4.  
  5. WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to
  6. switch off the mode (command ‘c’) and change display units to
  7. sectors (command ‘u’).
  8.  
  9. Смотрим, какие разделы есть на диске
  10.  
  11. Command (m for help): p
  12.  
  13. Disk /dev/sda: 32.2 GB, 32212254720 bytes
  14. 255 heads, 63 sectors/track, 3916 cylinders
  15. Units = cylinders of 16065 * 512 = 8225280 bytes
  16. Sector size (logical/physical): 512 bytes / 512 bytes
  17. I/O size (minimum/optimal): 512 bytes / 512 bytes
  18. Disk identifier: 0x0003e6f5
  19.  
  20. Device Boot Start End Blocks Id System
  21. /dev/sda1 * 1 64 512000 83 Linux
  22. Partition 1 does not end on cylinder boundary.
  23. /dev/sda2 64 2089 16264192 8e Linux LVM
  24.  
  25. Нам нужна вторая партиция, ее надо расширить. Сначало удаляем ее:
  26.  
  27. Command (m for help): d
  28. Partition number (1-4): 2
  29.  
  30. Потом создадим новую:
  31.  
  32. Command (m for help): n
  33. Command action
  34. e extended
  35. p primary partition (1-4)
  36. p
  37. Partition number (1-4): 2
  38. First cylinder (64-3916, default 64): Оставляем по умолчанию, жмем клавишу Enter
  39. Using default value 64
  40. Last cylinder, +cylinders or +size{K,M,G} (64-3916, default 3916): Оставляем по умолчанию, жмем клавишу Enter
  41. Using default value 3916
  42.  
  43. Меняем тип файловой системы на LVM:
  44.  
  45. Command (m for help): t
  46. Partition number (1-4): 2
  47. Hex code (type L to list codes): 8e
  48. Changed system type of partition 2 to 8e (Linux LVM)
  49.  
  50. Записываем таблицу разделов на диск:
  51.  
  52. Command (m for help): w
  53. The partition table has been altered!
  54.  
  55. Calling ioctl() to re-read partition table.
  56.  
  57. WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
  58. The kernel still uses the old table. The new table will be used at
  59. the next reboot or after you run partprobe(8) or kpartx(8)
  60. Syncing disks.
  61.  
  62. Для применения настроек перезагружаемся:
  63. reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement