Score:0

Add a new 16TB HDD and transfer the OS to it

io flag

I have 2x 4 TB and I bought another one of 16TB. I mounted it with the following commands:

cd /mnt/
mkdir data2
blkid /dev/sdc 
fsck.ext4 /dev/sdc
mkfs.ext4 /dev/sdc
mount /dev/sdc /mnt/data2
lsblk

sda      8:0    0  3.7T  0 disk
├─sda1   8:1    0   32G  0 part [SWAP]
├─sda2   8:2    0    1G  0 part /boot
├─sda3   8:3    0    2T  0 part /
├─sda4   8:4    0  1.7T  0 part /home
└─sda5   8:5    0    1M  0 part
sdb      8:16   0  3.7T  0 disk /mnt/data
sdc      8:32   0 14.6T  0 disk /mnt/data2

I would like to change the OS place from 4tb HDD to 16TB HDD because it is of crucial importance to me that /home has more space than 1.7TB as it is now. Now, is it possible to replace HDDs without reinstalling the OS, or is it possible to solve my problem in another way. My best hope is that all 16 TB will be mounted in the /home location. Thank you

cc flag
It is unclear what you are trying to do: put an OS install onto the 16TB disk or use it as /home. In either case, you would be far better off putting a partition table on it, making a partition, and formatting the partition instead of the device.
oldfred avatar
cn flag
Did you just format the drive? You need to create gpt partitions & format those. Better to do new install & restore your data, /home, list of installed apps and anything in / like databases or web apps to new install from your normal backup. Great way to test that backup is complete when you still have original drive. If you just want to move /home. [Move Home](https://help.ubuntu.com/community/Partitioning/Home/Moving) & https://ubuntuforums.org/showthread.php?t=2455822&p=14010437#post14010437
Uploadkom avatar
io flag
I want to expand the /home space on the dedicated server, because it is full. Ubuntu is something new for me and so are the possible ways to do it. Reinstalling the OS is the last option.
cc flag
See https://help.ubuntu.com/community/Partitioning/Home/Moving It's personal preference how to set up expanded storage for a user -- /home partition is available at install, but not good if the machine can boot multiple roots with different Oses. I like mounting at /usr/local/data, then give the user a dir there, and make subdirs for Documents, Music, Videos, etc. that way, multiple users may utilize the space, and the /home/username directory is OS specific, with links for Documents,...etc. to the mounted partition.
Score:0
cn flag

I would like to change the OS place from 4tb HDD to 16TB HDD because it is of crucial importance to me that /home has more space than 1.7TB as it is now.

This is a wrong premise. There is no reason for the OS to be on the 16TB HDD to have more space for /home. Moving the contents of /home to the 16TB and replacing /home by a symbolic link to the 16TB drive is enough to enjoy all the 16 TB for /home (including 25 GB that otherwise would be used by the system).

Otherwise, moving an existing installation to a new partition is in principle possible, but involves technical issues such as editing configuration files to make it work again. It will be far easier and quicker to just reinstall on the new drive.

  • Thus, you could leave the 4 TB disk with Ubuntu in place, and move the /home from that partition to the 16TB drive. Then create a symbolic link /home to that new location

  • If you want to remove that 4 TB drive where Ubuntu is installed, then I advice to just reinstall the OS on the 6 TB drive, then move the old /home over.

Uploadkom avatar
io flag
I've been reading explanations on how to do it for hours... so I'd be grateful if you could tell me which commands to type in order. I access the server through the terminal, I use winSCP btw.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.