- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- Moving a directory to a second local hard drive
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2007 11:58 AM
тАО07-31-2007 11:58 AM
The problem I am having is my root disk is getting full because the previous person that setup the system created an essential SAP ( /sap_interface ) directory at root.
I installed a second local hdd with 72G of space. What is the best way to move the /sap_interface directory to the new hdd? Of course the files will still have to keep all permissions etc.
The new disk is /dev/disk/dsk8c
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2007 02:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2007 09:38 PM
тАО07-31-2007 09:38 PM
Re: Moving a directory to a second local hard drive
You don't say whether you've created a filesystem or file domain on the new disk... As you're new to Tru64, I guess probably not...
Therefore you'll need to do something like this (untested !):
# mkfdmn dsk8c sap_if
# mkfset sap_if sap_if
# mkdir /new_sap_interface
# mount sap_if#sap_if /new_sap_interface
# vdump -0f - /sap_interface | vrestore -xf - -D /new_sap_interface
Check that everything has copied cleanly betwen /sap_interface then /new_sap_interface. Then (presumably) shutdown SAP, to stop anything new being written to /sap_interface.
# rm -rf /sap_interface
# umount /new_sap_interface
# mount sap_if#sap_if /sap_interface
Modify /etc/fstab to add the new entry for /sap_interface
Hope this helps,
Regards,
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2007 10:28 PM
тАО07-31-2007 10:28 PM
Re: Moving a directory to a second local hard drive
Am I right?
If so, try this:
1. Stop the database and make sure there are no oprn files in /sap_interface
2. Backup / file system with vdump (must be done to save you from mistake!)
3. Create advfs domain and file set (like Rob said) on new disk drive
4. Rename directory /sap_interface to something other, like /sap_interface_orig
# mv /sap_interface /sap_interface_orig
5. Create (new) directory /sap_interface
# mkdir /sap_interface
6. Mount file system from new disk drive to /sap_interface
# mount sap_if#sap_if /sap_interface
Make sure that this directory has same ownership and permitions like old one (chmod ; chown ; chgrp etc).
7. Copy files from "old" /sap_interface to "new" /sap_interface
# cd /sap_interface_orig
# cp -p -r . /sap_interface
This command should preserve permitions and ownership of files
Then try to start your database. If everything works OK, you can delete /sap_interface_orig
Please post if something is not clear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2007 03:51 AM
тАО08-01-2007 03:51 AM
Re: Moving a directory to a second local hard drive
It seems that I did not explain myself very well. I have some additional information that might help clarify my problem.
# df -k
Filesystem 1024-blocks Used Available Capacity Mounted on
root_domain#root 8198864 7485823 555880 94% /
usr_domain#usr 12392032 4808373 7319968 40% /usr
usr_domain#var 12392032 240958 7319968 4% /var
SAPexe#usrsap 17152320 3610526 13517024 22% /usr/sap
Oraclient#80464 11947392 24 11942552 1% /oracle/client/80x64
dda:/usr/sap/trans 36700160 19529906 17102336 54% /usr/sap/trans
grove:/pr_cart/nfs_prd 37748736 3992405 33756331 11% /nfs_vms
grove:/pr_cart/his_campus_prd 37748736 3992405 33756331 11% /usr/users/prdadm/his_campus
# ls
.TTauthority .new...profile UNTITLED install oracle sys
.Xauthority .osonly_tmp bin lib osf_boot tcb
.advfs_hostlist .profile cdrom logs pd.txt tmp
.cshrc .proto...cshrc cluster mdec proc usr
.dt .proto...login cslg.lic mnt quota.group var
.dtprofile .proto...profile cslgmar03unix.txt mnt1 quota.user vdumpOSfilesets
.dxlsm_pref .sh_history dev mountCD sap_interface vmunix
.local.. .ssh2 devices nfs_mounts sapmnt vmunix.PrePatch
.login .sysman df.txt nfs_vms sbin
.mrg...login .tags disks nohup.out scripts
.netscape GENERIC etc nsmail session.src
.new...cshrc NFS_VMS fsize nsr shlib
.new...login TT_DB genvmunix opt subsys
Correct me if I am wrong, It seems that /sap_interface is a directory in the / (root) file system. And move the /sap_interface directory to the new hard drive. Also, if I am creating the file system on the new hard drive, does the file domain and file system name matter on what I call it?
Also, what is the difference between vdump and vrestore compare to just copying files on Vladimir's method?
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2007 04:36 AM
тАО08-01-2007 04:36 AM
Re: Moving a directory to a second local hard drive
> in the / (root) file system.
If it's not in the "df" output, then it seems
that way to me.
> [...] does the file domain and file system
> name matter on what I call it?
Not to me. I think that you can choose them.
> Also, what is the difference between vdump
> and vrestore compare to just copying files
> on Vladimir's method?
One may work much better than the other:
urtx# ls -li src
total 2
2343 -rw-r--r-- 2 root system 25 Jun 17 11:31 fred.lnh
2485 lrwxrwxrwx 1 root system 8 Jun 17 11:23 fred.lns -> fred.txt
2343 -rw-r--r-- 2 root system 25 Jun 17 11:31 fred.txt
(One hard link, one symbolic link, one file.)
urtx# cp -p -r src dst_cpr
urtx# ls -li dst_cpr
total 3
2473 -rw-r--r-- 1 root system 25 Jun 17 11:31 fred.lnh
2466 -rw-r--r-- 1 root system 25 Jun 17 11:31 fred.lns
2463 -rw-r--r-- 1 root system 25 Jun 17 11:31 fred.txt
(Three files, no links.)
urtx# mkdir dst_vdr
urtx# ( cd src ; vdump -D -f - . ) | ( cd dst_vdr ; vrestore -x -f - )
[Note that I forgot the "-x" in my original
("untested") example.]
path : .
dev/fset : root_domain#root
type : advfs
advfs id : 0x43dad8e0.00059d50.1
vdump: Date of last level 0 dump: the start of the epoch
vdump: Dumping directories
vdump: Dumping 33 bytes, 1 directories, 3 files
vdump: Dumping regular files
vdump: Status at Sun Jun 17 11:35:28 2007
vdump: Dumped 33 of 33 bytes; 100.0% completed
vdump: Dumped 1 of 1 directories; 100.0% completed
vdump: Dumped 3 of 3 files; 100.0% completed
vdump: Dump completed at Sun Jun 17 11:35:28 2007
vrestore: Date of the vdump save-set: Sun Jun 17 11:35:28 2007
vrestore: Save-set source directory : .
vrestore: Target directory : /dst_vdr
vrestore: WARNING: may have restored directory attributes, from archive onto tar
get directory.
urtx# ls -li dst_vdr
total 2
2470 -rw-r--r-- 2 root system 25 Jun 17 11:31 fred.lnh
2461 lrwxrwxrwx 1 root system 8 Jun 17 11:35 fred.lns -> fred.txt
2470 -rw-r--r-- 2 root system 25 Jun 17 11:31 fred.txt
(One hard link, one symbolic link, one file.)
Which result do you prefer? I like the
vdump-vrestore result better. (I normally
use a similar "tar" pipeline, but if you have
ACLs or some other OS-specific stuff in the
file system, then [v]dump-[v]restore (or
whatever the OS offers) is probably safer.)
I _never_ use "cp -r". Too many wrong
answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2007 09:02 AM
тАО08-01-2007 09:02 AM
Re: Moving a directory to a second local hard drive
Stop SAP
1. make file_domain on the new disk (name does not matter)
mkfdmn /dev/disk/dsk8c sap_ifd
2. make filesystem on the new disk
mkfset sap_ifd sap_if
3. Create new sap_interface directory and make the right permission is assigned
# mkdir /new_sap_interface
4. Mount the new sap_interface directory
# mount sap_ifd#sap_if /new_sap_interface
5. use vdump and vrestore to move files
# ( cd /sap_interface ; vdump -D -f - . ) | ( cd /new_sap_interface ; vrestore -x -f - )
6. rename the old sap_interface
mv /sap_interface /sap_interface_old
7. unmount /new_sap_interface
umount /new_sap_interface
8. rename /new_sap_interface to /sap_interface
9. mount sap_ifd#sap_if /sap_interface
10. start sap
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2007 09:25 AM
тАО08-01-2007 09:25 AM
Re: Moving a directory to a second local hard drive
I'm too lazy to check all this, but ...
You shouldn't need to stop SAP until you get
to step 5.
I would create a small test directory, say,
"/sap_dummy", with a few (small) files in it.
Then I would run the whole proposed procedure
on that test directory. If that works, then
delete everything in the new destination file
system, and then try the last part again,
using the real data.
Don't ask _me_ if the procedure works, ask
the procedure. (It's _much_ more reliable
than I am.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2007 06:42 AM
тАО08-02-2007 06:42 AM
Re: Moving a directory to a second local hard drive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2007 06:43 AM
тАО08-02-2007 06:43 AM