harsh3466

joined 1 year ago
[–] harsh3466@lemmy.ml 2 points 4 days ago (1 children)

Perfect. So you've got separate /boot and /boot/efi partitions, which means dual booting will be much easier if you want to do that.

The ubuntu--vg-ubuntu-lv is the logical volume you'll want to resize. So now we need to see how much space is available on the volume. To get that, run the command sudo df -h and paste that output into a comment.

From there we can figure out how much space you have and how you might want to resize the volume to prep for a new install.

What is challenging about this is that your data is under your root (/) mount, which is also the ubuntu os. If in the end you want to entirely remove ubuntu, it'll be a little trickier than if your data was in a separate logical volume that you mounted into your root system during boot.

For example many people have a separate logical volume for /home, which makes it easier to switch distros while preserving your home folder with all of your user data, config files, etc...

But that's getting a little ahead of ourselves. Start with sudo df -h for the filesystem usage info and we can go from there.

[–] harsh3466@lemmy.ml 3 points 5 days ago (3 children)

Happy to help!

lsblk will give exactly the info needed. Copy the output of lsblk and paste it into a reply and that will be perfect. Or a screenshot. Whatever's easier for you

[–] harsh3466@lemmy.ml 1 points 5 days ago (5 children)

Okay, more details will be required, but here's what I'm thinking will work.

One of the benefits of an LVM is its pretty easy to resize it.

The outline of what you can do is this (and we can refine the steps with more details)

Right now you've got your 8TB physical volume, and within that, you should have your volume group, and within that volume group, you should have one or more logical volums that are mounted for your system. The idea is to resize the existing logical volume by shrinking it, creating addition space within the volume group that can be used to create a new logical volume. Then, that new logical volume can be used to install Fedora.

Depending on how much free space you have on the entire physical volume, you could potentially dual boot Fedora and Ubuntu. Roughly speaking, the steps would look like this:

WARNING: These steps are not exhaustive because I don't know the full details of your system. This is not meant to be a guide for you to immediately implement and follow, but to help get you down the right path DO NOT FOLLOW THESE STEPS WITHOUT FIRST FULLY UNDERSTANDING HOW THIS WILL APPLY TO YOUR UNIQUE SYSTEM SETUP.

  1. Download a Linux ISO of your choice. Ubuntu, Fedora, it doesn't really matter. This one is going to be used to live boot on your server so you can make adjustments to your lvm without having the lvm mounted.
  2. Boot into the live usb
  3. Once you get to the desktop environment of the live usb dismiss any installation prompts, etc and open a terminal
  4. Install the logical volume tools with sudo whatever-the-package-manager-install-command-is lvm2
  5. If your volume group is encrypted (typically with LUKS), you'll need to decrypt it to make sizing changes to the lvm(s) in the volume group. You can decrypt it with:
    1. cryptsetup open /dev/your-disk-here name-of-your-volume-group
    2. For example, on my system if I were doing this it would be cryptsetup open /dev/nvme0n1p2 server (I very creatively named my server volume group server)
  6. Once you can access your volume group, you can use the df command to see how much space is free in your volume group. The full command you'll want to run is:
    1. sudo df -h
    2. This command will list all mounted disks along with filesystem usage data. With this you should be able to determine how much free space you have in your volume group.
  7. Once you've determined how much free space you have, you can decide how big you want to make your new logical volume. For example, if your current usage is 6TB out of the 8TB total, you could resize the current logical volume down to 7TB, and then create a new logical volume that's 1TB in size for the Fedora install
  8. You will do the resize using the lvm2 tools installed. The command to shrink the logical volume looks like this:
    1. sudo lvreduce --resizefs --size -1TB /dev/your-volume-group/the-lvm-name
  9. Once you've shrunk the lvm, You can create your new lvm

IMPORTANT NOTES:

  1. If at all possible, you should really back up the data. If you don't have any kind of backups in place, you're risking losing all of your data, not just in doing this operation, but in general.
  2. If you want to dual boot, things are more complicated because of where your /boot exists
[–] harsh3466@lemmy.ml 3 points 5 days ago

Season one was entertaining enough that I enjoyed it despite the writing, but good god season two the writing was so much worse.

[–] harsh3466@lemmy.ml 3 points 5 days ago (7 children)

Can you detail the storage and is drives and mounts as well as the lvm structure? Knowing that will help people give useful advice.

[–] harsh3466@lemmy.ml 4 points 1 week ago

BBSes are back!

[–] harsh3466@lemmy.ml 1 points 1 week ago

Good to know! Wasn't expecting a masterpiece. I'll be happy with a good, fun movie with some nice animation

[–] harsh3466@lemmy.ml 2 points 1 week ago (2 children)

I haven't yet but planning to watch Kpop Demon Hunters later this week(end) with my wife. Looks like a fun romp.

[–] harsh3466@lemmy.ml 8 points 1 week ago

The answer is in the question. They're sycophants.

And yes. Lots of us are worried about this.

[–] harsh3466@lemmy.ml 1 points 1 week ago

Hahaha! Even tankies gotta eat! (though I'm not actually a tankie. Just happened to pick .ml when I joined Lemmy)

[–] harsh3466@lemmy.ml 3 points 1 week ago

That is a lovely setup. I'm gonna drop that into my bash_aliases so much more elegant than me adding the alias for each server.

 

Connection: both songs are about gentrification. Bonus connection, both are UK artists

 

TMBG formed in Brooklyn

 

Les Claypool!

 

Connection: Glam/hair metal! Pantera started as a glam metal band

 

Speaking of sick bass! Bonus heavy metal connection, Led Claypool auditioned for Metallica back in the day. I'm paraphrasing, but Metallica told him something like, "You're way to good to be in Metallica"

 

Since we're dancing with the devil...

 

This is just me celebrating a small win. I've been slowly learning bash scripting, and just now I was able to quickly write a simple bash script to automate a file moving task without referring to my notes or the web!

It's not a super complicated script, I'm just happy I'm starting to internalize the knowledge I've been building.

I've been organizing my media files after ripping our DVD collection. I had all the files for The Smurfs cartoon (love the Smurfs) in the main Smurfs show folder. I wanted to put them all into their respective season folders (Season.XX). Here's the script:

#! /bin/bash

for number in {01..09}; do
	find . -type f -name "The.Smurfs.S$number*" -exec mv {} Season.$number/ \;
done

I could have done it as a one liner, but I like to keep things like this for future reference.

 
 

EDIT WITH UPDATE: Operation went off without a hitch! I'm now up and running with the 512GB nvme drive! Next stop is dual booting nixos, which was the whole reason for switching to the larger drive.

ORIGINAL POST:

I’ve got a laptop running Arch (btw), with a 128GB nvme in it. The nvme has two partitions. EFI boot, and a luks encrypted lvm.

I’ve got a 512GB nvme I want to swap in. I think I can clone the device with dd, update the uuids, expand the lvm, and drop in the 512 nvme, but my searching hasn't given me a clear confirmation of this. Am I correct in my thought process, or am I setting myself up for disaster?

 
21
submitted 5 months ago* (last edited 5 months ago) by harsh3466@lemmy.ml to c/linux@lemmy.ml
 

Edit 4: I think I've fixed the issue. I uninstalled vim, deleted ~/.viminfo and /etc/vimrc, then reinstalled vim. I jumped around a file a bit, went in and out of edit mode, and type a bunch of ~ and it didn't jump the text around at all. Still not sure what I did, but it appears this variation of turning it on and off again worked.

I'm hoping someone can help me with this.

I was holding my laptop while I had a vile open in vim, and I slipped, mashing a bunch of keys on the keyboard by mistake.

After doing this, I can't type the ~ character anymore. Anytime I try to type it, it jumps the text to the last line, putting the last line at the top of the editing screen so that's the only line of text showing.

I thought maybe I had set an option that would show up in ~/.vimrc, but there's no ~/.vimrc file. There is a /etc/vimrc file, and a ~/.viminfo file.

I've searched and had no luck finding out what I did to cause this behavior. I also tried looking through the vim manpage and couldn't find any info there either.

Edit 3: I just installed neovim and in neovim it acts as expected when I type the ~. Something I did notice is that in vim, I now have a blinking block cursor in insert mode as well as in visual mode, while in neovim, it's a block cursor in visual mode and a vertical bar cursor in insert mode. I think this was the normal behavior in vim prior to whatever the heck I did.

Hoping someone knows what the heck I did. Thank you!

Edit: clarified what happens when I try to type ~

Edit 2: added details of the .vimrc and .viminfo files

 

Had to do them quietly so I didn't wake her.

view more: next ›