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

JackZong

New Member
Credits
17
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.
 


f33dm3bits

Gold Member
Gold Supporter
Credits
7,496
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:

JackZong

New Member
Credits
17
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. :)
 


Members online


Top