1

I have two different RAID arrays on a server. The first virtual drive is a RAID 10 with 4 disks and is already mapped to the OS. Now I have created another array with RAID 0 and one disk. Because the first virtual drive was created and mapped through the install routine when setting up the whole system, I don’t know how to map the new virtual drive to the OS.

The virtual drives:

# megacli -LDInfo -Lall -Aall


Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 5.457 TB
Sector Size         : 512
Mirror Data         : 5.457 TB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives per span:2
Span Depth          : 2
Default Cache Policy: WriteBack, ReadAhead, Direct, Write Cache OK if  Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Direct, Write Cache OK if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: No
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: Yes
Cache Cade Type : Read Only


Virtual Drive: 1 (Target Id: 1)
Name                :
RAID Level          : Primary-0, Secondary-0, RAID Level Qualifier-0
Size                : 2.728 TB
Sector Size         : 512
Parity Size         : 0
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 1
Span Depth          : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: No
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: Yes
Cache Cade Type : Read Only

The existing filesystems:

# df -h
Filesystem                                              Size  Used Avail     Use% Mounted on
rootfs                                                  5.5T  4.7T  525G  91% /
udev                                                     10M   80K   10M   1% /dev
tmpfs                                                    38G  248K   38G   1% /run
/dev/disk/by-uuid/8fcd8997-12d3-4259-b7b9-4e5c27286b21  5.5T  4.7T  525G  91% /
tmpfs                                                   5.0M     0  5.0M   0% /run/lock
tmpfs                                                    77G     0   77G   0% /run/shm
/dev/sda2                                               504M   40M  440M   9% /boot

What are the right steps to get the new virtual drive mapped, create a filesystem and mounted to the OS, for example to /var/backups/new ? (We are on Debian 7.11) Thank you very much!

seobility
  • 45
  • 1
  • 5
  • please add `fdisk -l` to the pasted outputs. Basically, you probably have an sdb disk showing up there (or sdc/e/f/etc) which you need to format and mount – dyasny Oct 11 '16 at 15:27

1 Answers1

2

You'll have to write a partition table to this drive, so that you may get a valid partition to work with. It can take up the whole available disk if need be. You'll also need to format that partition with a valid filesystem, and then mount that filesystem either temporarily with the mount command, or persistently using /etc/fstab or the automounter.

What you choose for your filesystem will depend on what you're using it for. I can't offer a recommendation based on the data I'm given here. However, this essentially boils down (in most cases) to a choice between BTRFS, XFS, and EXT4. Since you're on Debian Wheezy, I would avoid using BTRFS unless you're sure you need it.

First, you need to identify which disk you want to operate on. This is most easily accomplished in most situations by reading the output of the lsblk command.

Then you'll need to use fdisk or parted to partition your disk.

After this is done, you will need to use mkfs to format that partition with a filesystem

Finally, you'll need to specify a permanent mount point for this filesystem if you intend to persistently use it. This is done typically via the fstab file.

Spooler
  • 7,046
  • 18
  • 29
  • Thank you very much! Do you know a good howto where the steps from paritioning to mounting are explained? – seobility Oct 12 '16 at 11:51
  • mounting you can do manually by invoking the mount command directly. Mount utilized automatic filesystem detection, so you don't typically ever need to give it many options except in special cases. You could use it liek so: `# mount /dev/sda1 /mnt/location` First argument being the block device your filesystem is, second argument being the empty file you intend to mount it to. Also, you may invoke the fstab to mount things for you if you've made a persistent entry, by using `# mount -a` This is essentially what happens at boot. Using `mount -a` won't disrupt already mounted filesystems. – Spooler Oct 12 '16 at 15:43
  • Right, `mount` isn't that big thing. Some adivce for `gdisk/parted` (need a GPT) and `mkfs` would be great instead. – seobility Oct 12 '16 at 16:52
  • I put a series of links in my answer. Is there something specifically deficient about them? Tried to include guides rather than just man pages. – Spooler Oct 12 '16 at 19:12
  • Yes thanks! Found something very nice and complete here: http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html – seobility Oct 13 '16 at 08:42