Upgrading OS & Storage

I want to upgrade from 32 to 33 but I need to add more storage (2T). My / directory is too full for some things to run (like Splunk) and I need to rearrange that partition.

$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 1.1G 15G 7% /dev/shm
tmpfs 16G 2.2M 16G 1% /run
/dev/mapper/fedora_localhost–live-root 66G 61G 1.9G 98% /
tmpfs 16G 160M 16G 1% /tmp
/dev/sda2 453M 316M 110M 75% /boot
/dev/dm-6 99G 60M 94G 1% /usr/local/footprints
/dev/dm-7 197G 167G 21G 89% /home
/dev/dm-8 3.2T 3.1T 773M 100% /multimedia
/dev/dm-9 130G 122G 2.1G 99% /var/lib/www
tmpfs 3.2G 0 3.2G 0% /run/user/1004
tmpfs 3.2G 112K 3.2G 1% /run/user/1001
tmpfs 3.2G 28K 3.2G 1% /run/user/42
/dev/sde1 597G 241G 356G 41% /run/media/user/My Book
/dev/sdd2 4.6T 3.6T 997G 79% /run/media/user/Seagate Backup Plus Drive

$ sudo fdisk -l
Disk /dev/sdc: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: TOSHIBA HDWD120 Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B861EE69-9E7B-4E8D-85CA-32C77E33C360

Device Start End Sectors Size Type
/dev/sdc1 2048 3907028991 3907026944 1.8T Linux LVM

Disk /dev/sda: 223.58 GiB, 240057409536 bytes, 468862128 sectors
Disk model: SSD2SC240G1CS175 Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 12B2794D-5038-431C-B01B-4C8693D56C6E

Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 978943 974848 476M Linux filesystem
/dev/sda3 978944 158064639 157085696 74.9G Linux LVM
/dev/sda4 158064640 315351039 157286400 75G Linux filesystem
/dev/sda6 420208640 468860927 48652288 23.2G Linux filesystem

Disk /dev/sdb: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: TOSHIBA HDWD120 Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 90FF3770-B6E8-4B42-8DD3-486F466F1AB3

Device Start End Sectors Size Type
/dev/sdb1 2048 3906824191 3906822144 1.8T Linux LVM

The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Disk /dev/sdd: 4.56 TiB, 5000981077504 bytes, 9767541167 sectors
Disk model: Backup+ Desk Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: DF33571C-B37A-4774-B77A-80788F9B2452

Device Start End Sectors Size Type
/dev/sdd1 34 262177 262144 128M Microsoft reserved
/dev/sdd2 264192 9767540735 9767276544 4.6T Microsoft basic data

Partition 1 does not start on physical sector boundary.

Disk /dev/sde: 596.18 GiB, 640135028736 bytes, 1250263728 sectors
Disk model: 6400AAV External Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xacdd9b22

Device Boot Start End Sectors Size Id Type
/dev/sde1 63 1250258624 1250258562 596.2G c W95 FAT32 (LBA)

Disk /dev/mapper/fedora_localhost–live-root: 66.93 GiB, 71840038912 bytes, 140312576 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/fedora_localhost–live-swap: 7.102 GiB, 8585740288 bytes, 16769024 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/fedora-00: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/fedora-03: 3.22 TiB, 3535739551744 bytes, 6905741312 sectors
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/fedora-05: 100 GiB, 107378376704 bytes, 209723392 sectors
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/fedora-root: 133 GiB, 142811856896 bytes, 278929408 sectors
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/luks-588fe8fb-def2-4ab5-89c8-a6ccff9c6a93: 100 GiB, 107376279552 bytes, 209719296 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/luks-a449fab9-843a-4f2e-8948-b6f97866f72b: 199.102 GiB, 214746267648 bytes, 419426304 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/luks-42ae05f1-5dc4-409e-93af-aff5733e1909: 3.22 TiB, 3535737454592 bytes, 6905737216 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/luks-068983f4-3276-4098-add9-57db873c1b8d: 132.101 GiB, 142795079680 bytes, 278896640 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

I want to get rid of /dev/dm-6 and change /dev/dm-9 to just 30G and the rest of it all can go to /

In the end I just want a partition for /, /home, /multimedia/Movies, /multimedia/TV_Shows, /multimedia/Photos and /multimedia/Videos.

Is there a way I can reasonably do this w/o doing a fresh install? Also, as you can see, some of those partitions are encrypted.

1 Like

Hi @robcampbell, and welcome to the community!

It’s a bit unwieldy to figure out your disk layout from all that. Could you maybe post the output of lsblk?

Generally, if your / is on a lvm, then it should be possible to add the new drive to the LVM storage pool and then increase the size of the root filesystem.

@lcts

$ sudo lsblk
NAME                            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                               8:0    0 223.6G  0 disk
├─sda1                            8:1    0     1M  0 part
├─sda2                            8:2    0   476M  0 part  /boot
├─sda3                            8:3    0  74.9G  0 part
│ ├─fedora_localhost--live-root 253:0    0  66.9G  0 lvm   /
│ └─fedora_localhost--live-swap 253:1    0     8G  0 lvm   [SWAP]
├─sda4                            8:4    0    75G  0 part
└─sda6                            8:6    0  23.2G  0 part
sdb                               8:16   0   1.8T  0 disk
└─sdb1                            8:17   0   1.8T  0 part
  ├─fedora-00                   253:2    0   200G  0 lvm
  │ └─luks-a449fab9-843a-4f2e-8948-b6f97866f72b
  │                             253:7    0   200G  0 crypt /home
  ├─fedora-03                   253:3    0   3.2T  0 lvm
  │ └─luks-42ae05f1-5dc4-409e-93af-aff5733e1909
  │                             253:8    0   3.2T  0 crypt /multimedia
  ├─fedora-05                   253:4    0   100G  0 lvm
  │ └─luks-588fe8fb-def2-4ab5-89c8-a6ccff9c6a93
  │                             253:6    0   100G  0 crypt /usr/local/footprints
  └─fedora-root                 253:5    0   133G  0 lvm
    └─luks-068983f4-3276-4098-add9-57db873c1b8d
                                253:9    0   133G  0 crypt /var/lib/www
sdc                               8:32   0   1.8T  0 disk
└─sdc1                            8:33   0   1.8T  0 part
  └─fedora-03                   253:3    0   3.2T  0 lvm
    └─luks-42ae05f1-5dc4-409e-93af-aff5733e1909
                                253:8    0   3.2T  0 crypt /multimedia
sdd                               8:48   0   4.6T  0 disk
├─sdd1                            8:49   0   128M  0 part
└─sdd2                            8:50   0   4.6T  0 part  /run/media/user/Seasde                               8:64   0 596.2G  0 disk
└─sde1                            8:65   0 596.2G  0 part  /run/media/user/My

1 Like

Thanks.
Seems to me that on sda, sda4 and sda6 aren’t used, so you could remove them, increase sda3 to fill the entire drive and then increase the root volume to use that space. That’ll give you +100GB on /, which should suffice - if there’s data on those partitions simply copy it elsewhere before removing them.

/usr/local/footprints seems to be pretty empty, so to get rid of it, simply unmount it then mount it elsewhere, cp -a it’s contents to the /usr/local/footprints, then you can delete that logical volume.

/var/lib/www is almost full, so I’m not sure how you would want to reduce it to 33GB? I’d leave it where it is. Just add your new 2TB drive to the existing volume group, and then expand the logical volumes onto that as needed.

That sounds like a great idea for sda but isn’t /dev/dm-6 using that? That’s what confused me. I can get rid of it bc I no longer need it but I wasn’t sure if they were the same (sda6 & /dev/dm-6).

/var/lib/www actually has the Video dir that I need to move to /multimedia.

Should/could I make /multimedia logical? Can I do this remotely or do I need to do this using the installation usb?

Yeah, that can be a bit confusing, but they are unrelated.

The dm-X devices are the device mapper devices for your virtual drives (lvm/luks). The entries in /dev/mapper/... (those are the ones reported by lsblk, fedora-00 is /dev/mapper/fedora00, luks... is /dev/mapper/luks...) are actually just links to these devices. It’s a way of giving the cryptic and volatile dm-X devices persistent & human-readable names, same as is done for physical partitions under /dev/disk/....
Example from my machine:

ce@kat ~ % ls -l /dev/mapper 
total 0
crw------- 1 root root 10, 236 26. Nov 13:19 control
lrwxrwxrwx 1 root root       7 26. Nov 13:19 cryptroot -> ../dm-1
lrwxrwxrwx 1 root root       7 26. Nov 13:19 cryptstorage -> ../dm-0
lrwxrwxrwx 1 root root       7 26. Nov 13:19 cryptswap -> ../dm-2
lrwxrwxrwx 1 root root       7 26. Nov 13:19 fedora -> ../dm-3

The only thing that might need a live system is resizing the root partition, depending on which filesystem you’re using. Many support online growing of the fs.

The others you can simply unmount from within the running system and then do whatever you like with them :slight_smile: .

It’s already a logical volume. If I understood your initial post correctly you want separate logical volumes for /multimedia subfolders, rather than /multimedia itself, correct?

If so, you can use the same strategy I mentioned for /usr/local/footprints:

  • Unmount /multimedia (actually /dev/mapper/luks-42ae05f1-5dc4-409e-93af-aff5733e1909)
  • Create the subfolders /multimedia/(Videos|Movies|...) you want as your new partition mountpoints (which, since the volume that was mounted at /multimedia is no longer mounted, you’re now doing on the root fs)
  • Mount /dev/mapper/luks-42ae05f1-5dc4-409e-93af-aff5733e1909 to one of your newly created subfolders, e.g. /multimedia/Videos, create logical volumes for the others, mount them, then move the stuff from /multimedia/Videos to the correct folders.

Alternatively, you could think about just having the one /multimedia partition and put everything there.

Alternatively alternatively, if you have a way to temporarily copy your data elsewhere, your setup would be a prime usecase for btrfs using subvolumes.