copying a large filesystem


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers copying a large filesystem
# 1  
Old 10-08-2003
copying a large filesystem

Hi there

In my organisation we have a solaris network with /home being automounted from /export/home on a central file server (usual stuff) however, the guy who originally set this up only allocated 3gb to /export/home and now we are really struggling for space. I have a new 18gb disk installed on the same box, it has been formatted and is ready to go. My problem is once i make sure everyone is out of their home directory, what would be the best procedure to copy all the data over to the new disk whilst retaining all folder and file permissions and then of course making it live !. I presume that I dont have to worry about it being called /export/home on the file server as i could share it out even if it was called /newhome ?. What changes to NIS would i need to make ? (automount files etc)

Apologies if this sounds dumb, its just that I have to make sure i dont mess it up, as we have production systems running from /home and it HAS to work in the morning

Cheers
Gary
# 2  
Old 10-08-2003
...........

hiho,

i prefer an ufsdump when transfering filesystems from maschine to maschine.....
# ufsdump -f <name> <path>
# ufsrestore <name>

you said the new disk is already in the maschine.... so you could copy the files directly. i would do it this way to keep the permissions:
# mount /dev/dsk/c?t?d0s? /mnt/newdisk
# find /export/home -print -depth | cpio -pdmu /mnt/newdisk

you don't need to change any shares, because now you could mount the "newdisk" to /export/home
# umount /export/home ; mount /dev/dsk/c?t?d0s? /export/home
fix your entry in /etc/vfstab and everyone can work unconsciously.

greetings Preßy
# 3  
Old 10-09-2003
As far as the NIS part of your question - if you wanted to bring the one drive up and push users over to it - you would want to change the auto_home map
I moved from a Network Applicance server to a SUN E450 for home directories -
Original map:
-bg,soft,intr toast1.my.com:/vol/home0/home/jfneal
-bg,soft,intr toast1.my.com:/home/&


Final map:
-bg,soft,intr toast1.my.com:/vol/home0/home/jfneal
-bg,soft,intr toaster.my.com:/home1/&

Note that the server changes from toast1 to toaster and /home to /home1. This left all the 'old' home directories intact so I had an on-line backup on the old system. Even if your disk is on the same system you can leave it around for awhile in case users aren't off completely. I moved them during the day and the only ones I had a problem with were the ones that normally never log out (developers and SAs).
{For all of you about to say I should have waited - this was brought about due to upper management stating "You will move out of this building by the end of the week". It actually went pretty smooth considering they had no concern for our problems for doing it - and of course we got big raises and bonuses for our hard work...they just seem to have gotten lost in the mail - but they saved their millions in rent - I bet they got bonuses!}.
# 4  
Old 10-10-2003
This is what I would do (not that the other recommendations wouldn't work).

1. Create a filesystem on the new disk, maybe call it newhome.
2. Make sure everyone is logged out and stop sharing the current home directory.
3. Use this tar command to copy everything:

tar cvfp - /export/home/* | (cd /newhome; tar xvfp - )

You may have to adjust the paths and may not want to use the 'v' option on the tar commands. I like the v so I can see the progress.

4. Share the newhome as /export/home.

I use this often when moving files between filesystems on the same system. We have 1 filesystem shared out as a home directory per group in combination with NIS. We often have people change groups which requires us to move their home directory to a different share. I just make sure they log out, rename their original home directory, move it with tar, update their passwd entry, push the changes, and they are ready to go.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copying large files in a bash script stops execution

Hello, I'm new to this forum and like to first of all say hello to everyone. I've got a really annoying problem at the moment. I'm trying to rsync some files (about 200MB with one file of 120MB) from a Raspberry PI with raspbian to a debian server via rsync. This procedure is stored in a... (3 Replies)
Discussion started by: wex_storm
3 Replies

2. Shell Programming and Scripting

Copying number by looking a large file

Hi All, I have a big file which looks like this: abc 34.32 cdf 343.45 computer 1.34 ladder 2.3422 I have some 100000 .TXT files which look like this: computer cdf align I have to open each of the text files and read the words from the text files. Then I have to look into that... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

3. UNIX for Dummies Questions & Answers

find large files in root filesystem and exclude others

I am wondering if there is a way to search for top 10 files in size in root filesystem but exclude all other mounts including nfs mounts . For example excluded /var /boot /app /app1 /u01/ (1 Reply)
Discussion started by: gubbu
1 Replies

4. Shell Programming and Scripting

Start copying large file while its still being restored from tape

Hello, I need to copy a 700GB tape-image file over a network. I want to start the copy process before the tape-image has finished being restored from the tape. The tape restore speed is about 78 Mbps and the file transfer speed over the network is about 45 Mbps I don't want to use a pipe, since... (7 Replies)
Discussion started by: swamik
7 Replies

5. UNIX for Dummies Questions & Answers

Copying files to a remote NFS filesystem

Hi guys Maybe a stupid question.. IS possible, in unix, to copy files to a remote NFS shared filesystem without mounting it? Just like windows does: copy * \\folderA\folderB Thanks.. (4 Replies)
Discussion started by: iga3725
4 Replies

6. UNIX for Dummies Questions & Answers

Copying a Large File

I have a large file that I append entries to the end of every few seconds. Its grown to >150MB. Its basically a log file but a perl script is writing to it. I need to make a copy of it to a new directory. I realize the latest entries occuring while the copy is taking place will not be recorded... (1 Reply)
Discussion started by: lforum
1 Replies

7. Shell Programming and Scripting

Copying of large files fail

Hi, I have a process which duplicates files for different environments. As the files arrive, my script (korn shell) makes copies of them (giving a unique name) and then renames the original file so that my process won't get triggered again. I don't like it either, but it's what we were told to... (4 Replies)
Discussion started by: GoldenEye4ever
4 Replies

8. UNIX for Dummies Questions & Answers

Copying large file problem on SVR4 Unix

We have 3 Unix servers all running SVR4 Unix 1.4. I have no problems copying files to and from 2 of the servers using either the rcp command or ftp but when i come to transfer large files to the third server the copy gives up part way through and crashes this server. Copying smaller files using RCP... (7 Replies)
Discussion started by: coatesd
7 Replies

9. Solaris

Copying the content of a filesystem to different Harddrive

my server runs solaris 10 , one of the partition in my primary harddrive is 99% full , i want to move the contents of it to the second harddrive which has higher capacity. what is the best way to move the contents to 2nd drive ? which command should i use cpio/dd/tar/ufsdump .... please guide me... (1 Reply)
Discussion started by: skamal4u
1 Replies

10. UNIX for Dummies Questions & Answers

Copying the content of a filesystem to different Harddrive

my server runs solaris 10 , one of the partition in my primary harddrive is 99% full , i want to move the contents of it to the second harddrive . what is the best way to move the contents to 2nd drive ? which command should i use cpio/dd/tar/ufsdump .... please guide me with the command and the... (0 Replies)
Discussion started by: skamal4u
0 Replies
Login or Register to Ask a Question