Storage management: Difference between revisions
no edit summary
imported>Sjwhitak (Copied from https://lug.mtu.edu/minutes/fall2021/meeting09.html) |
imported>Sjwhitak No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
|
to make the partition a swap file, then run
{{RootCmd|swapon /dev/sda2}}
to enable swap. Run <code>top</code> or <code>htop</code> to see your swap and memory usage.
== Looking at things ==
{{RootCmd|umount /mnt}}
If you plug in a USB and you want to access it, use <code>lsblk -f</code>, then <code>mount /dev/sdXN /mnt</code> or wherever you want the USB files. Then, <code>umount /mnt</code> to safely remove.
{{Note|If you're testing this on [https://www.virtualbox.org/ VirtualBox], your virtual drives have no format, so just run
{{RootCmd|mkfs.ext4 /dev/sdX}} for every drive and you can mount them.}}
== Bare-metal drives ==
=== Demo setup ===
Follow [https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks#Partitioning_the_disk_with_GPT_for_UEFI this] setup to test.
<syntaxhighlight lang="text">
Device Start End Sectors Size Type
/dev/sda3 2623488 19400703 16777216 8G Linux filesystem
</syntaxhighlight>
{{Tip|I'd recommend playing with this in [https://www.virtualbox.org/ VirtualBox] because it is very difficult to change these on your filesystem once you have data on it. In fact, }}
{{Warning|You destroy all data when running these commands, so if you're doing this on your system just move everything off the drives before running these commands.}}
== Logical volume management (LVM) ==
I'd highly, highly recommend following along with [https://www.howtoforge.com/linux_lvm this tutorial] within an LVM. You will be very comfortable with all of these commands after this.
{{Warning|You destroy all data when running these commands, so if you're doing this on your system just move everything off the drives before running these commands.}}
=== Demo setup ===
Here's my computer's setup:
<syntaxhighlight lang="
/dev/lvm/lv_root / ext4 defaults 0 1
/dev/lvm/lv_home /home ext4 defaults 0 2
| |||