Score:0

Ubuntu extend harddrive to mounted one seamlessly?

md flag

I have two mounted harddrives (one hdd and one nvme) besides my main hd, my docker file (weaviate) will install massive code, and also data. I want the code on HDD and the data on nvme.

I suppose my question is that the code will install on the default harddrive - I presume, only 30Gb and I want it to spill over automatically to my HDD 120Gb. Is there a way I can do this? I can force data to nvme. Currently I have them partitioned and mounted as follows:

Create new empty partitions:
# parted -s /dev/vdb mklabel gpt
# parted -s /dev/vdb unit mib mkpart primary 0% 100%

Create new empty filesystem:
# mkfs.ext4 /dev/vdb1

Mount block storage:

# mkdir /mnt/blockstorage
# echo >> /etc/fstab
# echo /dev/vdb1               /mnt/blockstorage       ext4    defaults,noatime,nofail 0 0 >> /etc/fstab
# mount /mnt/blockstorage
raj avatar
cn flag
raj
Is the code installed in a particular directory? If yes, you can bind-mount that directory to some directory under `/mnt/blockstorage` (this is your 120 GB HDD I assume). This will place that particular directory on the 120 GB HDD. On the other hand, if you want your 30 GB and 120 GB HDDs to be joined "seamlessly" and form one big HDD from system's point of view (not only for that particular directory), you have to use LVM, which requires repartitioning and reformatting both HDDs to LVM format.
karel avatar
sa flag
Does this answer your question? [How to set up multiple hard drives as one volume?](https://askubuntu.com/q/7002/)
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.