Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 37 additions & 24 deletions docs/labs/systems_administration_II/lab6-the_file_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -671,37 +671,20 @@ You'll add the `/dev/loop1` physical volume (PV) that was prepped and created ab

!!! Question

Using your `vgdisplay` output, note down the changes on your system. What are the new values for "Free PE / Size"?

#### To remove a LV, VG and PV

This section will step through how to delete the `/dev/loop1` PV that you assigned to the existing `rl` VG in the previous section.

1. Remove the logical volume named scratch2. Type:

```bash
[root@localhost ~]# lvremove -f /dev/rl/scratch2
Logical volume "scratch2" successfully removed.
```

2. Remove the scratch3 logical volume, by running:
Using your `vgdisplay` output, note down the changes on your system. What are the new values for "Free PE / Size"?

4. To remove the new PV (/dev/loop1) from the existing `rl` volume group. Use the `vgreduce` command, type:

```bash
[root@localhost ~]# lvremove -f /dev/rl/scratch3
[root@localhost ~]# vgreduce rl /dev/loop1
```

3. With the relevant volumes now removed, you can now reduce the size of the `rl` VG to make it consistent. Type:
**OUTPUT**

```bash
[root@localhost ~]# vgreduce --removemissing rl
Removed "/dev/loop0" from volume group "rl"
```

4. Remove any LVM labels from the `/dev/loop1` PV. Type:

```bash
[root@localhost ~]# pvremove /dev/loop1
Labels on physical volume "/dev/loop1" successfully wiped.
```

#### To create a new volume group

Expand Down Expand Up @@ -789,6 +772,36 @@ With the additional free space we have been able to add to the `rl` volume group

5. Use the `lvdisplay` command again to view the new LV.

#### To remove a LV, VG and PV

This section will step through how to delete the `/dev/loop1` PV that you assigned to the existing `rl` VG in the previous section.

1. Remove the logical volume named scratch2. Type:

```bash
[root@localhost ~]# lvremove -f /dev/rl/scratch2
Logical volume "scratch2" successfully removed.
```

2. Remove the scratch3 logical volume, by running:

```bash
[root@localhost ~]# lvremove -f /dev/rl/scratch3
```

3. With the relevant volumes now removed, you can now reduce the size of the `rl` VG to make it consistent. Type:

```bash
[root@localhost ~]# vgreduce --removemissing rl
```

4. Remove any LVM labels from the `/dev/loop1` PV. Type:

```bash
[root@localhost ~]# pvremove /dev/loop1
Labels on physical volume "/dev/loop1" successfully wiped.
```

## Exercise 2

To make the traditional partition and LVM-style volumes created earlier usable by the operating system, you need to create file systems on it. Writing a file system to a device is also known as formatting the disk.
Expand Down Expand Up @@ -928,7 +941,7 @@ Here we will walk through the use of some common filesystem utilities that can b
/usr/sbin/fsck.xfs: XFS file system.
```

## Exercise
## Exercise 3

The previous exercises walked through preparing a block/storage device for use on a system. After going through all the motions of partitioning, formatting and so on, the final step in making the file system available to users for storing data is known as mounting.

Expand Down