How do I cp -r /dev/sda2 /data1?

JackZong

New Member
Joined
Jul 4, 2019
Messages
20
Reaction score
7
Credits
53
While I have the sda and sdb two disks as a raid1. How do I cp -r /dev/sad2 /data1?

As when I "mount /dev/sda2 /tmp_file" the system show error message that the file is busy. So what should I do? Thanks a lot.
 


While I have the sda and sdb two disks as a raid1. How do I cp -r /dev/sad2 /data1?

As when I "mount /dev/sda2 /tmp_file" the system show error message that the file is busy. So what should I do? Thanks a lot.
You can't copy from a block device to a directory. What are you actually trying to do there?
If you are getting the error that file is busy when trying to mount a partition with a filesystem then probably your current working directory is that location. Change to a different location so that your current working directory isn't the same location as the mount location and then try mounting it again.
 
Last edited:
You can't copy from a block device to a directory. What are you actually trying to do there?
If you are getting the error that file is busy when trying to mount a partition with a filesystem then probably your current working directory is that location. Change to a different location so that your current working directory isn't the same location as the mount location and then try mounting it again.
Thanks very much! I've got it. :)
 


Top