Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - Performing storage management tasks in Cockpit

#1
Performing storage management tasks in Cockpit

<div style="margin: 5px 5% 10px 5%;"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/09/performing-storage-management-tasks-in-cockpit.png" width="1334" height="771" title="" alt="" /></div><div><p>In the <a href="https://fedoramagazine.org/cockpit-and-the-evolution-of-the-web-user-interface/" target="_blank" rel="noreferrer noopener" aria-label="previous article (opens in a new tab)">previous article</a> we touched upon some of the new features introduced to Cockpit over the years. This article will look into some of the tools within the UI to perform everyday storage management tasks. To access these functionalities, install the <em>cockpit-storaged</em> package:</p>
<pre class="wp-block-preformatted"> sudo dnf install cockpit-storaged</pre>
<p>From the main screen, click the <strong>Storage</strong> menu option in the left column. Everything needed to observe and manage disks is available on the main Storage screen. Also, the top of the page displays two graphs for the disk’s reading and writing performance with the local filesystem’s information below. In addition, the options to add or modify RAID devices, volume groups, iSCSI devices, and drives are available as well. In addition, scrolling down will reveal a summary of recent logs. This allows admins to catch any errors that require immediate attention.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/09/performing-storage-management-tasks-in-cockpit.png" alt="Cockpit storage main screen" class="wp-image-29234" /></figure>
<h2>Filesystems</h2>
<p>This section lists the system’s mounted partitions. Clicking on a partition will display information and options for that mounted drive. Growing and shrinking partitions are available in the <strong>Volume</strong> sub-section. There’s also a filesystem subsection that allows you to change the label and configure the mount.</p>
<p>If it’s part of a volume group, other logical volumes in that group will also be available. Each standard partition has the option to delete and format. Also, logical volumes have an added option to deactivate the partition.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/09/performing-storage-management-tasks-in-cockpit-1.png" alt="Example screenshot of the /boot filesystem in Cockpit" class="wp-image-29240" /></figure>
<h2>RAID devices</h2>
<p>Cockpit makes it super-easy to manage RAID drives. With a few simple clicks the RAID drive is created, formatted, encrypted, and mounted. For details, or a how-to on creating a RAID device from the CLI check out the article <a rel="noreferrer noopener" href="https://fedoramagazine.org/managing-raid-arrays-with-mdadm/" target="_blank">Managing RAID arrays with mdadm</a>.</p>
<p>To create a RAID device, start by clicking the add (<strong>+</strong>) button. Enter a name, select the type of RAID level and the available drives, then click <strong>Create</strong>. The RAID section will show the newly created device. Select it to create the partition table and format the drive(s). You can always remove the device by clicking the <strong>Stop</strong> and <strong>Delete</strong> buttons in the top-right corner.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/09/performing-storage-management-tasks-in-cockpit.gif" alt="Creating a RAID device in Cockpit" class="wp-image-29235" /></figure>
<h2>Logical volumes</h2>
<p>By default, the Fedora installation uses LVM when creating the partition scheme. This allows users to create groups, and add volumes from different disks to those groups. The article, <a rel="noreferrer noopener" aria-label="Use LVM to Upgrade Fedora (opens in a new tab)" href="https://fedoramagazine.org/use-lvm-upgrade-fedora/" target="_blank">Use LVM to Upgrade Fedora</a>, has some great tips and explanations on how it works in the command-line. </p>
<p>Start by clicking the add (<strong>+</strong>) button next to “Volume Groups”. Give the group a name, select the disk(s) for the volume group, and click <strong>Create</strong>. The new group is available in the Volume Groups section. The example below demonstrates a new group named “vgraiddemo”.</p>
<p>Now, click the newly made group then select the option to <strong>Create a New Logical Volume</strong>. Give the LV a name and select the purpose: Block device for filesystems, or pool for thinly provisioning volumes. Adjust the amount of storage, if necessary, and click the <strong>Format</strong> button to finalize the creation.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/09/performing-storage-management-tasks-in-cockpit-1.gif" alt="Creating a volume group and assigning disks to that volume group." class="wp-image-29236" /></figure>
<p>Cockpit can also configure current volume groups. To add a drive to an existing group, click the name of the volume group, then click the add (<strong>+</strong>) button next to “Physical Volumes”. Select the disk from the list and click the <strong>Add</strong> button. In one shot, not only has a new PV, been created, but it’s also added to the group. From here, we can add the available storage to a partition, or create a new LV. The example below demonstrates how the additional space is used to grow the root filesystem.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/09/performing-storage-management-tasks-in-cockpit-2.gif" alt="" class="wp-image-29237" /></figure>
<h2>iSCSI targets</h2>
<p>Connecting to an iSCSI server is a quick process and requires two things, the initiator’s name, which is assigned to the client, and the name or IP of the server, or target. Therefore we will need to change the initiator’s name on the system to match the configurations on the target server.</p>
<p>To change the initiator’s name, click the button with the pencil icon, enter the name, and click <strong>Change</strong>.</p>
<p>To add the iSCSI target, click the add (<strong>+</strong>) button, enter the server’s address, the username and password, if required, and click <strong>Next</strong>. Select the target — verify the name, address, and port, — and click <strong>Add</strong> to finalize the process.</p>
<p>To remove a target, click the “checkmark” button. A red trashcan will appear beside the target(s). Click it to remove the target from the setup list.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/09/performing-storage-management-tasks-in-cockpit-3.gif" alt="Adding an iSCSI target in Cockpit" class="wp-image-29238" /></figure>
<h2>NFS mount</h2>
<p>Cockpit even allows sysadmins to configure NFS shares within the UI. To add NFS shares, click the add (<strong>+</strong>) button in the NFS mounts section. Enter the server’s address, the path of the share on the server, and a location on the local machine to mount the share. Adjust the mount options if needed and click <strong>Add</strong> to view information about the share. We also have the options to unmount, edit, and remove the share. The example below demonstrates how the NFS share on SERVER02 is mounted to the <em>/mnt</em> directory.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/09/performing-storage-management-tasks-in-cockpit-4.gif" alt="" class="wp-image-29239" /></figure>
<h2>Conclusion</h2>
<p>As we’ve seen in this article, a lot of the storage-related tasks that require lengthy, and multiple, lines of commands can be easily done within the web UI with just a few clicks. Cockpit is continuously evolving and every new feature makes the project better and better. In the next article we’ll explore the features and components on the networking side of things.</p>
</div>


https://www.sickgaming.net/blog/2019/09/...n-cockpit/
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016