Provisioning and Installing a New Filesystem on a New Logical Volume: Difference between revisions
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
=Procedure= | =Procedure= | ||
Create a new partition on the new block storage. We assume the entire block storage is exposed as a single partition. Use [[fdisk]] or [[sfdisk]]. | Create a new partition on the new block storage. We assume the entire block storage is exposed as a single partition. The unpartitioned storage device is listed in /proc/partitions. Use [[fdisk]] or [[sfdisk]]. | ||
<pre> | |||
# fdisk /dev/sdb | |||
Welcome to fdisk (util-linux 2.23.2). | |||
Changes will remain in memory only, until you decide to write them. | |||
Be careful before using the write command. | |||
Device does not contain a recognized partition table | |||
Building a new DOS disklabel with disk identifier 0x11803ea4. | |||
Command (m for help): n | |||
Partition type: | |||
p primary (0 primary, 0 extended, 4 free) | |||
e extended | |||
Select (default p): p | |||
Partition number (1-4, default 1): 1 | |||
First sector (2048-104857599, default 2048): | |||
Using default value 2048 | |||
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599): | |||
Using default value 104857599 | |||
Partition 1 of type Linux and of size 50 GiB is set | |||
Command (m for help): w | |||
The partition table has been altered! | |||
Calling ioctl() to re-read partition table. | |||
Syncing disks. | |||
</pre> |
Revision as of 22:57, 23 May 2017
Internal
Procedure
Create a new partition on the new block storage. We assume the entire block storage is exposed as a single partition. The unpartitioned storage device is listed in /proc/partitions. Use fdisk or sfdisk.
# fdisk /dev/sdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table Building a new DOS disklabel with disk identifier 0x11803ea4. Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-104857599, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599): Using default value 104857599 Partition 1 of type Linux and of size 50 GiB is set Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.