Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Explain me in detail how to connect external hard disk to linux server so that it will detect it. Also let me know how can i come to know whether the linux server has detected it.
Also how to copy the linux server harddisk content/data to this USB External hard disk
1. plug it in
2. boot
3. check if it's automounted with "mount"
4. If not, mount it. It's probably /dev/sdX1 where X is a letter
5. use cp to copy files
It's probably that easy. If you run into problems then come back with details about exactly what you did and what errors you are receiving.
1. plug it in
2. boot
3. check if it's automounted with "mount"
4. If not, mount it. It's probably /dev/sdX1 where X is a letter
5. use cp to copy files
It's probably that easy. If you run into problems then come back with details about exactly what you did and what errors you are receiving.
There is also a pretty good chance it will automount if you just plug the USB drive in with the server up. If not it is easy enough to mount with the mount command.
If you use cp it will certainly move most of the content.
Is that what you mean to do or are you looking to use the external drive as a "clone" or other detailed backup copy.
Check out rsync and related scripts and GUI aids. In short,
the rsync utility says "Take the folder and file structure from HERE
and make an identical copy over THERE." The advantage comes from the fact that rsync only moves what doesn't already exist or what is different.
You can even use udev rules so that when you connect your external drive, a script runs, uses rsync, and brings your copy up-to-date. Just a thought.
I also have a same type of question:
I need to copy my data from the pc to an external hard drive with keeping the attributes;
so i used the command
cp -rp ~/sourceDir ~/Destination
but when i am coping it it give the error message
"cp: failde to preserve ownership for 'file' : Operation not permitted
and it copied the files to the destination but the attributes has changed from
-rw-r--r-- to
-rwxr-xr-x
I tried to copy it by loging as the root also but still the same thing happens. If possible please let me know how to copy the files with preserving the attributes
but when i am coping it it give the error message
"cp: failde to preserve ownership for 'file' : Operation not permitted
...
When making archival copies of files, it is usually best to do this under super-user (root) permissions. No only can root access almost everything without trouble, but it can certainly write-to almost everywhere as well.
Consider the following when trying to make a file copy for long term storage purposes:
--preserve=links ..... cause links to appear in the target
--preserve=mode ..... write original mode (permission) bits
--preserve=ownership ..... write original ownership data
--preserve=timestamp ..... write original time data
--no-dereference ..... copy link as a link not its contents
--recursive ..... open folders and process their contents
If you use --verbose, it will likely be slower when you watch it on your terminal STDOUT. Re-direct to a file and browse it later. You can check on progress with tail --lines=NN or tail --follow.
is it possible to partion the external hard drive to ext3 and to vfat?
What do you mean ext3 and vfat? As far as the OS is concerned an external drive is just another block storage device, so it can be formatted and partitioned just as any other drive. Typically an external drive will have a single large partition, and a single parttion can only have one file system.
So yes, you can format the drive as ext3, NTFS, ext2, FAT32, etc. However you will need to choose only one FS (keep in mind if you change to ext3 the drive will not be readable in Windows) if you keep the default partition layout. Another option is to partition so that you can split the space between multiple FS types.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.