root@ubuntu:/var/lib# fdisk -l
Disk /dev/vda: 50 GiB, 53687091200 bytes, 104857600 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 884D39AE-2030-4231-B486-520515A9ADD7
Device Start End Sectors Size Type /dev/vda1 2048 4095 2048 1M BIOS boot /dev/vda2 4096 104857566 104853471 50G Linux filesystem
Disk /dev/vdb: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes root@ubuntu:/var/lib# fdisk /dev/vdb
Welcome to fdisk (util-linux 2.34). 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. Created a new DOS disklabel with disk identifier 0x1c765732.
Command (m for help): `p` Disk /dev/vdb: 200 GiB, 214748364800 bytes, 419430400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x1c765732
Command (m for help): `n` Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): `p` Partition number (1-4, default 1): First sector (2048-419430399, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-419430399, default 419430399):
Created a new partition 1 of type 'Linux' and of size 200 GiB.
Command (m for help): `w` The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.
root@ubuntu:/var/lib# mkfs.ext4 /dev/vdb1 mke2fs 1.45.5 (07-Jan-2020) Creating filesystem with 52428544 4k blocks and 13107200 inodes Filesystem UUID: a75b2a51-daa1-4d05-a6ee-0871fb0cf059 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: done Writing inode tables: done Creating journal (262144 blocks): done Writing superblocks and filesystem accounting information: done
root@ubuntu:/var/lib# mkdir /data root@ubuntu:/# mount /dev/vdb1 /data root@ubuntu:/# df -h Filesystem Size Used Avail Use% Mounted on udev 16G 0 16G 0% /dev tmpfs 3.1G 808K 3.1G 1% /run /dev/vda2 50G 19G 29G 39% / tmpfs 16G 24K 16G 1% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 16G 0 16G 0% /sys/fs/cgroup tmpfs 3.1G 0 3.1G 0% /run/user/1000 /dev/vdb1 196G 28K 186G 1% /data
|