OVH Community, your new community space.

SATA Drives do not show in Plesk


Myatu
03-09-2010, 17:17
I had received your other post by e-mail before you posted the one at 11:53 am.

It didn't appear to have been mounted according to the "df -h" output, so did you follow the "Mounting the RAID" steps in the guide? It would be:

Code:
mkdir /mnt/raid
then adding to the file /etc/fstab:

Code:
/dev/md0     /mnt/raid    ext3    defaults    0 0
followed by this in the shell:

Code:
mount -a
If you've done this, then the directory /mnt/raid would be where your files can be stored on the SATA disks. If need be, you could make a soft-link for /var/www (or wherever Plesk stores the sites) to something like /mnt/raid/var/www/.

Gary Spires
03-09-2010, 11:53
Ok sorted, it now shows up in resources on Plesk, but does not show in the summary at the top of the home page. Still only shows the SSD. Should it show here? And how would you save to it? Doesn't appear to be any option on this.

Disk space
/dev/md1
14.9 GB free of 19.4 GB
/dev/md2
47.7 GB free of 54.1 GB
Memory
11.6 GB free of 11.8 GB
Traffic 4.6 GB

Many Thanks for your help on this.

Gary Spires
03-09-2010, 10:01
See below

Myatu
02-09-2010, 21:20
Quote Originally Posted by Gary Spires
Device Boot Start End Blocks Id System
/dev/sdc1 1 91202 732574583+ ee EFI GPT

...

Device Boot Start End Blocks Id System
/dev/sdd1 1 91202 732574583+ ee EFI GPT

Disk /dev/md0: 715.4 GB, 715401854976 bytes

...
Oh, this is even better! Seems like the RAID array has already been created (and from the looks, it's RAID 1). In this case, double check with the command:

Code:
cat /proc/mdstat
and see what disks /dev/md0 uses (should be /dev/sdc1 and dev/sdd1).

If that's the case, then issue this command:

Code:
df -h
and see where /dev/md0 is mounted (the last column).

If there's nothing there, then you need to continue from the "Mounting the RAID" step in the guide.

If it IS there, the mount point will indicate where to store data on the SATA disks. For example, if the mount point is "/mnt/raid", then saving a file to this location will actually save it onto the SATA disks -- you would use this in Plesk as well.

So apparently the Hybrid series SATA's do get setup in RAID1 by default nowadays... That's new to me, hence the lengthy guide

Gary Spires
02-09-2010, 20:02
Just to be sure on this, here's a copy of the fdisk -l

I'd like to have RAID 1, so which disc would I use

/dev/sdc - 750Gb
/dev/sdd - 750Gb
or
/dev/md0 - 715Gb

Gary




Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20480993 fd Linux raid autodetect
/dev/sda2 2550 9664 57143296 fd Linux raid autodetect
/dev/sda3 9664 9729 523872 82 Linux swap / Solaris

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 2550 20480993 fd Linux raid autodetect
/dev/sdb2 2550 9664 57143296 fd Linux raid autodetect
/dev/sdb3 9664 9729 523872 82 Linux swap / Solaris

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdc: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 1 91202 732574583+ ee EFI GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdd: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 1 91202 732574583+ ee EFI GPT

Disk /dev/md0: 715.4 GB, 715401854976 bytes
2 heads, 4 sectors/track, 174658656 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md2: 58.5 GB, 58514669568 bytes
2 heads, 4 sectors/track, 14285808 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md1: 20.9 GB, 20972437504 bytes
2 heads, 4 sectors/track, 5120224 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Gary Spires
02-09-2010, 19:49
Wow many thanks for this guide. I'll give it a go and post back the outcome.

gary

Myatu
01-09-2010, 21:35
Okay, I am going by the assumption that you do NOT have a hardware RAID card (LSI/3ware) installed (which is optional on the EG-Hybrid). If you do have this, then the following is not for you. Otherwise, keep reading

RAID choice

First determine what kind of RAID you wish to use. In laymen's terms, RAID-0 can be equaled to lots of storage (1.4TB), but no safeguard against data loss. RAID-1 on the other hand gives you only half the storage space (750GB), but it give you the benefit of a complete backup of the stored data.

Which Disks?

Now you need to determine which of your disks are the two 750GB SATA ones (and not the SSDs). This you can do with:

Code:
fdisk -l
It should give you a list of disks, including their partitions. Likely the SATA disks will be listed last (as "/dev/sdc" and "/dev/sdd") and they hold no valid partitions ("Disk /dev/sdX doesn't contain a valid partition table").

It is very important to get this right, as obviously you don't want to erase your existing data on the SSDs. If you're unsure, post the output from the above command here and someone will undoubtedly point out to you which disks to use. If possible, backup your existing data before starting any of the following steps!

Create partition

In the following steps, I will use "/dev/sdX" in place of the actual disks.

Type:

Code:
fdisk /dev/sdX
which brings you to an interactive menu as shown below:

Code:
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x1a9dea6d.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help):
Obviously, typing "m" followed by the RETURN key will give you a short overview of commands available.

The first thing to do is to create a partition, by typing the "n" command.

It will then ask for a "Command action" and you have a choice of extended or primary. You want a primary partition, so type "p".

Now it will ask you for a "First Cylinder" and after that a "Last Cylinder". For the First Cylinder, you choose 1 (default). For the Last Cylinder, you can choose the size or cylinder you wish, and by default it's set to the very last cylinder making it use the entire disk. If you're unsure, choose the default.

You're back at the main command menu now. A sample output:

Code:
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-16383, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-16383, default 16383): 16383

Command (m for help):
Up next, you need to change the partition type. And this can be done by typing the "t" command.

Linux softraid uses the "fd" hex code and it can be verified by pulling up a list of codes by typing "L":

Code:
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): l

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris
 1  FAT12           39  Plan 9          82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      3c  PartitionMagic  83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       40  Venix 80286     84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
...
16  Hidden FAT16    64  Novell Netware  af  HFS / HFS+      fb  VMware VMFS
17  Hidden HPFS/NTF 65  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE
18  AST SmartSleep  70  DiskSecure Mult b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 75  PC/IX           bb  Boot Wizard hid fe  LANstep
1c  Hidden W95 FAT3 80  Old Minix       be  Solaris boot    ff  BBT
1e  Hidden W95 FAT1
Hex code (type L to list codes):
So type "fd". It will return you to the main menu again after stating "Changed system type of partition 1 to fd (Linux raid autodetect)".

Finally, verify that all of this was done correctly by typing "p" to view the partitions.

If this matches what you have done above, then finalize everything by typing "w" for Write. As the command name suggests, this will write the partition data to the disk - THIS IS PERMANENT (in other words: DATA LOSS if you're using the wrong HDs - so triple check!).

Repeat this process for the 2nd SATA HD.

Create the RAID array

As said in the beginning, the assumption is that you're using Linux softraid. This would mean there may already be existing RAID arrays present. To find out, type:

Code:
cat /proc/mdstat
This could show something similar to:

Code:
Personalities : [raid1]
read_ahead 1024 sectors
md1 : active raid1 hda3[0] hdc3[1]
        522048 blocks [2/2] [UU] 
md0 : active raid1 hda2[0] hdc2[1] 
        4192896 blocks [2/2] [UU] 
md2 : active raid1 hda1[0] hdc1[1] 
       128384 blocks [2/2] [UU] 
unused devices: 
The above is simply an example that's unlikely to be the same in your case, but the main thing to look for in YOUR output is "md0", "md1", etc.

The main point being, is that you want to use something other than what's listed here, so in the above example the next possible array would be "md3". And also note the above example does not necessarily give everything in ascending/descending order.

So having determined what the next one we can use, we issue the following command:

Code:
mdadm --create --verbose /dev/md3 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdd1
where "/dev/md3" is the new RAID array as determined earlier, "--level=0" is for RAID0 and where "/dev/sdc1" and "/dev/sdd1" match the partitions you created in the step above with fdisk.

If you wish to use RAID1 instead, use "--level=1" instead in the above command.

After you have issued the above command, you can verify the creation by issuing (again):

Code:
cat /proc/mdstat
This time it should include the new RAID array just created.

Format the new RAID array

This is a simple step, which is done by issuing:

Code:
mkfs.ext3 /dev/mdX
where "/dev/mdX" is the actual RAID array.

The one thing that is important, is to "forget"/ignore the partitions you've created by fdisk ("/dev/sdX") and use the RAID array instead.

Code:
Re-assemble the RAID on reboot
To help your system remember the RAID on reboot, you need to create a new mdadm.conf file.

Save your current configuration first, so you have a way to revert this in case things don't go as planned, with:

Code:
cp /etc/mdadm.conf /etc/mdadm.oldconf
(And should you need to restore it, it's "cp /etc/mdadm.oldconf /etc/mdadm.conf").

Now type:

Code:
mdadm --detail --scan --verbose
It should list ALL your RAID arrays (the ones that existed before, plus the new one you've created in the above steps). So this would include something like "ARRAY /dev/md3 ...".

If it does indeed show all the RAID arrays, save it to the mdadm.conf file as following:

Code:
mdadm --detail --scan --verbose > /etc/mdadm.conf
Mounting the RAID

We first need a mount point for the RAID. Often, mount points are located within the /mnt/ directory, so let's make this /mnt/raid (or whatever you'd like):

Code:
mkdir /mnt/raid
Now you need to edit the "/etc/fstab" file, by adding the following line:

Code:
/dev/mdX     /mnt/raid    ext3    defaults    0 0
where /dev/mdX is the actual RAID array you've created and /mnt/raid the mount point created earlier.

Issuing the following command should complete everything:

Code:
mount -a
You should now have the RAID array mounted, and ready to store data on. Check with the following command:

Code:
df -h
which will list all mounted partitions and capacities. Depending on your RAID setup, you should now have 750 or 1400 GB (roughly) extra space.

Before you save a lot of things on it, reboot the server first to verify everything remains operational upon reboot. If not, verify you have a correct /etc/mdadm.conf file, /etc/fstab file and check the system log messages (ie., typing "dmesg", "dmesg | less", "car /var/log/syslog", etc).

As a reminder:
  1. You need to be comfortable with using the Linux shell
  2. Ask here if you're unsure about a certain step, before you attempt to resolve things yourself
  3. Backup your data before you start, as I cannot be held responsible if you lose any existing data due to errors in this how-to or otherwise


But I'm sure you'll do fine

Gary Spires
01-09-2010, 11:36
The OS is Cent OS 5 with Plesk control panel.

Myatu
31-08-2010, 18:18
You can do it without re-installing the OS, but first, what exactly what OS are you using?

jonlewi5
31-08-2010, 13:59
You should have space on one of the OVH back up servers, you could use that.

*Apparantly, you can only access those backup servers from your server IP.

Gary Spires
31-08-2010, 13:51
Ok, If I was to do a OS reinstall I would need to do a back-up of all the data on the server? Would this have to include all databases, domain info etc,Emails etc?

If I do a back up via the control panel in Plesk is this stored external to the server, would this back up everything so I could do a reinstall?

Or would it be best to download and back up each domian individually via FTP to my own HDD here?

I need to get my other SATA drives showing as I need the space, however I'm worried of losing customer data.

Whats the best way to back up the server to do the OS reinstall?

Gary

Gary Spires
28-08-2010, 10:34
Can this be done without affecting whats already located on the SSD?

I read that you can reconfigure your RAID formats via the manager, but this involves reinstalling the OS. I don't want to do this as there are too many sites to back up etc, I just want to be able to use the 2 x 750Gb drives the server has.

Can it be done? If so how

Regards

Gary

maybars
26-08-2010, 14:36
Hello there,

You simply need to format them and mount.

Thelen
25-08-2010, 17:18
Pretty sure this question was handled before, but basically no you won't loose, but yes you have to manually setup the raid on those 2.

Gary Spires
25-08-2010, 14:52
Hi All

I have a dedicated OVH server EG-10 Hybrid with 2 x 80Gb SSD and 2 x 750GB SATA. The SSD drive shows in Plesk but the SATA's do not. How do I get to use these drives so I can have them for storage.

Will I need to start over, or can I do it without loosing the Domains I have already.

Gary