Score:1

Ubuntu Server 18.04.5 decrease used hard drive

co flag

I have a little server running at home, for several years now, but now it have some web apps running, and the old sata hdd drive it's causing some problems, mainly too slow to handle the requests and the pages take some time to update.

So I was thinking in replace this HDD for two SDDs with RAID 1.

The actual SSD has 320Gb, and I want to make a copy sector by sector from this hdd to one of the sdd's and after that look to the RAID question.

There aren't any 320 SSD drives, so the options are to go bigger, 480Gb, but two of those are a little bit to expensive, so I was thinking, in decreasing the current size of the disk to 256Gb, and get two 256Gb SSDs.

Now I have some questions:

1 - Can I really decrease the size, and put the data order in the sectors of the HDD to later use for example dd to copy to the new and smaller SSD drive?

2 - If it's possible, how can I do this task? It worth the trouble?

Starting from the scratch it's not an option, too much stuff in this server to start from a clean installation...

After this, then I'll look for the RAID question, I just want to have a daily backup of the server because of bad experiences that I had with two SSDs...

So the main purpose it's, replace HDD for the SDD for performance reasons, and after that, RAID for security reasons.

Thanks

Benyamin Limanto avatar
kr flag
Why not only put /var/ folder for DB and /var/www or /home/<username>/wwwfolder to ssd with linking, with that you don't need to do anything like dd, and it's faster.
co flag
That's a good option, never thought of that... :) Sure I'll have a boost in the speed, but how about the security/backups, like i wrote, i had problems in the past, with one Samsung SSD and another one of a brand that i don't remember...
Benyamin Limanto avatar
kr flag
I always have cold storage to do backup each day, but that's application level backup, like sql dump and file change. For server configuration you could also backup it, and make simple shell script restore when needed. I never has mirror on hardware level, all are software level. Sorry if my answer isn't satisfying.
co flag
It's an option, a good one, I have several shell scripts that perform backup of dbs, configs and other stuff. But that doesn't help when or if the hdd crash, or something corrupts the server... I always need to remember everything that was installed, what versions, etc. and install everything again. Thanks
Benyamin Limanto avatar
kr flag
@McPT I think in theory any /etc could be backup, and restored. I always use some tools like anaconda to automate the reinstallation on Linux. I don't know if it's also working for ubuntu, as I always work with RHEL or CentOS derivative. On Ubuntu I just use backup tools, and use vestacp.
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.