Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

swap space

Status
Not open for further replies.

copperslim

Technical User
Dec 13, 2002
101
GB
Hi
I
f I create a temporary swap space on /dev/vx/dsk/var. My question is, will this delete all file in /dev/vx/dsk/var

Example swap –a /dev/vx/dsk/var

Please advice

 
I can see /var when I rewind tape then read content.
Code:
# ufsrestore -tvf /dev/rmt/0cn

Level 0 dump of / on FINSRV0003:/dev/md/dsk/d12
Label: none
dir          2  .
dir          3  ./lost+found
[COLOR=blue]dir          4  ./var[/color] [COLOR=red]should I fsf 4?[/color]
dir          5  ./export
dir          6  ./export/home
dir          7  ./opt
dir          8  ./platform
dir          9  ./platform/SUNW,Netra-T12
leaf        10  ./platform/SUNW,Netra-T12/kadb
dir       7691  ./platform/SUNW,Netra-T12/kernel
leaf      7692  ./platform/SUNW,Netra-T12/kernel/cpu
dir       7693  ./platform/SUNW,Netra-T12/kernel/drv
 
no, it's - I guess - the blocksize of /var in this dump

run 'mt -f /dev/rmt/0n fsf 1' and run 'ufsrestore tvf /dev/rmt/0n' untill you see it is dump of /var; next run 'cd /var; ufsrestore xvf /dev/rmt/0cn .' or doublecheck like mentioned above...


Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Should I run the first command from /Root ot /var the run the 2 command from /var.
 
Hate to say this, but this looks like only the directory label /var has been saved to tape, not it's contents. If this wasn't the case, surely you'd have leaf entries within ./var? I don't suppose the backup was taken (inadvertently possibly) after the swap shennanigans?
 
>> Should I run the first command from /Root ot /var the run the 2 command from /var.

as long as you do not run any restores the basedir of the command does not matter...

find out which dump is your /var dump (as Ken mentioned, IS there a var dump on this tape - I think yes, because you posted above
>> Level 0 dump of /var on FINSRV0003:/dev/md/dsk/d32)

I suggest to go to /var and do a restore interactively (ufsrestore if /dev/rmt/0cn)


Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Re-reading this epic, I think daFranze is right (yet again!) and that /var is on the second logical tape. In that case do:

mt -f /dev/rmt/0c rewind

mt -f /dev/rmt/0cn fsf 1

cd /var

ufsrestore tvf /dev/rmt/0c (to list the files and confirm that they are indeed /var files)

mt -f /dev/rmt/0cn fsf 1 (to position the tape again for the restore).

ufsrestore xvf /dev/rmt/0c

To restore the files. Then and mt -f /dev/rmt/0 rewoff to eject the tape.
 
Chatting to other people here, they agree that I need to take the system to single user mode, unmount /var and try an fsck. If that doesn't fix your problem, then you will need to newfs /var and restore it from tape as /var is damaged..
 
Go ahead. Just a further thought - have you tried deleting the swap space you added in the first place with the -d option?
 
Chatting to other people here, they agree that I need to take the system to single user mode, unmount /var and try an fsck. If that doesn't fix your problem, then you will need to newfs /var and restore it from tape as /var is damaged..


aehm, I suggest to boot from CDROM and do the ufsrestore on an unbooted system; remember when booting from CD you can mount a FS only on /a and /mnt, this means /var mounted on CD is /a then...

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top