Score:1

How Dual SSD is used in ubuntu-server?

ro flag

Today I purchased a ubuntu server where 2 SSD (500GB each). In server information following information was written.

SSD 500 x 2
RAID 1 (Software RAID)

Now I wanna setup a storage file server.

I am confused how 2 SSD will works since I never use dual SSD server previously.

  1. In which SSD Ubuntu Server Installed?
  2. If all store all files in /srv folder do I need to do anything?
  3. Did all ssd is counted as single storage?
  4. How will the storage file will used?

For SSD information I tested the following command. If I run following command I get following result:

$ sudo lshw -C disk
  *-disk
       description: ATA Disk
       product: WDC  WDS500G2B0A
       vendor: Western Digital
       physical id: 0.0.0
       bus info: scsi@2:0.0.0
       logical name: /dev/sda
       version: 40WD
       serial: 200511800205
       size: 465GiB (500GB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=f2e52d4d-f48f-4434-9c6d-e4c7002c4fdb logicalsectorsize=512 sectorsize=512
  *-disk
       description: ATA Disk
       product: WDC  WDS500G2B0A
       vendor: Western Digital
       physical id: 0.0.0
       bus info: scsi@3:0.0.0
       logical name: /dev/sdb
       version: 40WD
       serial: 200422801375
       size: 465GiB (500GB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=6e2607b0-cf37-449c-af96-0acac4359885 logicalsectorsize=512 sectorsize=512

If I run following command I get following result:

$ lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME        FSTYPE              SIZE MOUNTPOINT        LABEL
loop0       squashfs           32.3M /snap/snapd/12704
loop1       squashfs           55.4M /snap/core18/2128
loop2       squashfs           70.3M /snap/lxd/21029
loop3       squashfs           32.3M /snap/snapd/12883
loop4       squashfs           61.8M /snap/core20/1081
loop5       squashfs           67.3M /snap/lxd/21545
sda                           465.8G
├─sda1                            1M
├─sda2      linux_raid_member     1G                   ubuntu-server:0
│ └─md0     ext4               1022M /boot
├─sda3      linux_raid_member    16G                   ubuntu-server:1
│ └─md1     swap                 16G [SWAP]
└─sda4      linux_raid_member 448.8G                   ubuntu-server:2
  └─md2                       448.6G
    └─md2p1 ext4              448.6G /
sdb                           465.8G
├─sdb1                            1M
├─sdb2      linux_raid_member     1G                   ubuntu-server:0
│ └─md0     ext4               1022M /boot
├─sdb3      linux_raid_member    16G                   ubuntu-server:1
│ └─md1     swap                 16G [SWAP]
└─sdb4      linux_raid_member 448.8G                   ubuntu-server:2
  └─md2                       448.6G
    └─md2p1 ext4              448.6G /

Also

$ df /
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/md2p1     461987712 6716124 431734132   2% /

$ df /boot
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/md0         1013688 108580    836400  12% /boot
france1 avatar
ng flag
I recommend to use df -h instead of df
Score:5
in flag

Welcome to the fun world of server management!

Because you've set your system up as a RAID1, and because you've provided all of the details that are needed to answer your questions, let's get right to the questions:

In which SSD Ubuntu Server Installed?

Both. You've set your system up with a RAID1 mirroring pattern, so 100% of the bytes for each file will be on each SSD.

If all store all files in /srv folder do I need to do anything?

You will need to make sure that the accounts accessing that directory have the appropriate permissions.

Did all ssd is counted as single storage?

Yes. The output of lsblk shows you have about 448GB mounted at /, which confirms that the two SSDs are being used as a mirror.

How will the storage file will used?

The files will appear the same way as they would if you had a single SSD in the system. You don't need to do any special thinking when working with files stored on a RAID partition beyond the question of backups. While RAID1 will allow the system to continue if one device fails, it's always good to have a backup of the critical files just in case.

Rejaul Karim avatar
ro flag
Why following command only shows 441G available? ` df -hBG / Filesystem 1G-blocks Used Available Use% Mounted on /dev/md2p1 441G 8G 411G 2% / `
in flag
A brain-freeze on my part. RAID1 is a *mirror*, which means that both SSDs will contain the same data. If one SSD fails, the other can continue while the other is replaced. 411GB available is correct. If you would like a great deal more, then you'll need to use RAID0 or -- perhaps ideally -- an LVM pool.
Rejaul Karim avatar
ro flag
Thanks. I accepted your answer. :) So, If want to add an 1 TB HDD for more storage, Am I need to use two 1TB HDD since current config is RAID 1?
in flag
If you plan to add a 1TB HDD, then you can use a single disk and mount it. You do not need to use RAID unless you specifically want to mirror or stripe data across multiple devices.
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.