I have a CentOS 7.7 server which has a vhd /dev/sdc
mounted (format-type= btrfs); it contains data.
I attached a empty vhd to the VM, /dev/sdd
(I didn't partition this disk using fdisk
)
lsblk
command lists the attached disk but no mount point.
used,
mdadm --create /dev/md0 --level 0 --raid-devices=2 --name=/data-disk /dev/sdc /dev/sdd
Output:
mdadm: cannot open /dev/sdc: Device or resource busy
Question:
Will the data from the disk
/dev/sdc
get wiped out when I try to create a RAID0 array?I can issue
umount /dev/sdc
and issue themdadm --create
command, but is that a proper approach to do this.
=== in case of successful RAID0 creation ===
Below command would be executed:
mkfs.btrfs /dev/md0
Editing the /etc/fstab, with the uuid info
===
Trying to add two disks to RAID0, one is already setup as backup, which has data. The new one is attached, could see the disk using lsblk
, but
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdc 8:32 0 100G 0 disk /cass_backup
sdd 8:48 0 100G 0 disk
df -h
/dev/sdc 100G 82G 20G 20% /data_disk
How does the distribution of data between mounted and unmounted disk done? Do I need to mount the new one (/dev/sdd) first?