How Dual SSD is used in ubuntu-server?
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.
- In which SSD Ubuntu Server Installed?
- If all store all files in
/srv
folder do I need to do anything? - Did all ssd is counted as single storage?
- 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
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.