3-1 [Configure Local Storage] Partitions on MBR and GPT Disks Flashcards

1
Q

fdisk

A

Used to create master boot record-based partitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

gdisk

A

Used to create GPT-based partitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

MBR

A

disk can be only up to 2 TB in size as that is partition’s max
only 4 primary partitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

GPT

A

Means GUID Partiton table
because every partition has its own GUID associated

disk can be parted up to 128 partitions (no need for distinguishing between primary, extended, and logical partitions)
8 zebibyte (which is a lot) per partition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

dd if=/dev/xvda of=/root/diskfilename bs=1M count=1

cp /etc/fstab /root/fstabcopy

A

Easy to revert to initial disk, after using it for practice
save first megabyte of raw blocks as a new file

make a copy of fstab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

fdisk /dev/xvda

p to see avalable space
n for new partition
p for primary partition or pick diff (e for extended partition, used to make logical partition)
enter to accept defaults
+number(with K, M, or G) for partition size
decide, linux, linux swap, linux lvm

update in-memory kernel table: for it to take effect
partprobe /dev/xvda

A

how to make mbr partition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

fdisk -l

A

list MBR partitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

echo $?

A

check if last command exited successfully

successful if 0 is returned

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is command

partprobe /dev/xvda

A

Is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

fdisk

Sector default begins at 2048

A

MBR

Space is saved for mbr records in order to maintain information about the disks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

fdisk

option: l (lowercase L)

A

MBR

list known partition types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

fdisk

option: w

A

changes down in fdisk don’t exist until saved

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

fdisk
option: l
option: t
enter code looked up by option l(lowercase L)

A

change partition id (essentially label)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

mkfs -t xfs /dev/xvda

A

after partitioning,
make filesystem next with mkfs -t FILESYSTEM(ex: xfs ext4)
-t to set file type (xfs,ext4 etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

df -h

A

see all mounted disk devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

blkid

A

see available block storage devices attached to system

17
Q

/mnt

A

directory and its subdirectories are intended for use as the temporary mount points for mounting storage devices

18
Q

mkdir newdir inside /mnt

mount /dev/xvda /mnt/newdir

A

mount device

19
Q

fdisk

option: d

A

delete partiton, referred to by which partition number

20
Q

blkid

mount -U uuid(gathered from blkid) /mnt/newdir

A

mount by UUID

21
Q

two tools to make GPT partitons

A

command parted

command gdisk , easier to use for cert exam than parted

22
Q

gdisk

option: ?
option: n
option: w

afterwards for filesystem:
mkfs -t xfs /dev/xvda

A

used for GPT partitons
list options
new partition
save changes

afterwards make file system using mkfs -t
mount and use df -h to check

23
Q

umount /dev/xvda
gdisk /dev/xvda
option: d
option: w

A

to delete GPT partition