Sponsored Content
Full Discussion: how to reformat a hard disk
Operating Systems Solaris how to reformat a hard disk Post 302131609 by joerg on Monday 13th of August 2007 01:59:17 AM
Old 08-13-2007
Hi,
I hope that I can help you because there are one or two confusing thinks.Smilie

To make a note:
c0t3d0 --> This is your actual root disk.
c0t1d0 --> Your backup disk.

So fare I understand you want to backup the information of the root disk.

First of all you have four used partition on the root disk.
/root on slice 0
/usr on slice 6
/export on slice 5
/w.local on slice 7

By the way you forgot the swap -l command so I am not sure if the swap area is on 1,3 or slice 4.
Never mind! Because no one dump a swap deviceSmilie!


First step:
Partition of the backup disk:
format
0 # just type and return
p # just type and return
p # just type and return

If there is no data on this disk we have to partition the disk.
Now you can see something like this:

Part Tag Flag Cylinders Size Blocks
0 swap wu 0 - 550 1.95GB (551/0/0) 4099440
1 root wm 551 - 54520 191.47GB (53970/0/0) 401536800
2 backup wm 0 - 65532 232.49GB (65533/0/0) 487565520
3 var wm 54521 - 60026 19.53GB (5506/0/0) 40964640
4 unassigned wm 60027 - 65532 19.53GB (5506/0/0) 40964640
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0


With h you can get the help:

partition> h
Expecting one of the following: (abbreviations ok):
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit

Because you have limited disk space on the backup disk I I would say use one partition for the whole disk.
So first delete all partition like you can see in this example
!!!! But not the second partition !!!!!

So do this for all slices except the slice 2!
partition> 2 # this is for the slice 2
Part Tag Flag Cylinders Size Blocks
4 unassigned wm 60027 - 65532 19.53GB (5506/0/0) 40964640

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[60027]:0
Enter partition size[40964640b, 5506c, 65532e, 20002.27mb, 19.53gb]:0

Now create on slice 0 one partition with the whole free disk space.
It is the same procedure as delete partition but now you must insert a value for the size.


then label the disk with the label command.

then exit the format utility.
q
q


Creating of a file system:
newfs /dev/rdsk/c0t1d0s0
Mount it on the filesystem.
mount /dev/dsk/c0t1d0s0 /mnt

and use the ufsdump command to backup all the mentioned file systems at the root disk. to the /mnt folder.

Example for the /var filesystem.
ufsdump -f /mnt/dump_var /var

After you backup all the slices of the root disk you have a complete backup of the old system on the backup disk
So feel free to delete modify or new install the root disk!

Best regards and post questions if there are some!Smilie

joerg
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Hard Disk Problem

Does anyone know of any commands that offer the same sort of facilities of scandisk on windows. My Linux server (Mandrake 6.2) keeps crashing and gives hard disk errors when I reboot. I've used fcsk to fix any problems that arise but when I use dumpe2fs to display disk information it says that... (1 Reply)
Discussion started by: DGM
1 Replies

2. UNIX for Dummies Questions & Answers

hard disk problems

Hi all I am facing a strange problem. I am using a sun ultra10 spark machine. first i took a 20gb IDE hard disk and installed solaris 5.8. But due to some requirement i have to reinstall the OS but this time solaris 2.6. and now the hard disk capacity is only showing 8gb. Where the 12gb... (3 Replies)
Discussion started by: Prafulla
3 Replies

3. Filesystems, Disks and Memory

hard disk meltdown

I had an issue with a second hard disk in my machine. I have a sparc station running solaris 7. It was working fine but now it wont mount on boot up and when you try to mount it manually it gives an I/O error. I tried a different disk as a control which was fine. What I want to know is if my... (3 Replies)
Discussion started by: Henrik
3 Replies

4. UNIX Desktop Questions & Answers

Hard Disk

I have a cuestion. How Can I to add other hard disk to my computer? I need to configurate anyone? (4 Replies)
Discussion started by: hmaraver
4 Replies

5. UNIX for Dummies Questions & Answers

Hard Disk at 99% Help!

:eek: I use this Solaris to run CMS a call acounting software package for my job. No one could run reports today because it said the this when you logged on "The following file systems are low, and could adversely affect server performance: File system /: 99%full" Can some one please explain... (9 Replies)
Discussion started by: mannyisme
9 Replies

6. UNIX for Dummies Questions & Answers

Reformat WD 500 GB hard drive for Linux machine

Linux Red Hat machine GNOME version 2.16.0 External hard drive is a Western Digital 500 GB My Book Essential. How can I reformat the external hard drive so that I can backup my Linux machine? Thanks (1 Reply)
Discussion started by: jm4smtddd
1 Replies

7. SCO

declare disk driver for IDE hard disk

hi I've a fresh installation of SCO 5.0.7 on the IDE hard disk. For SCSI hard disk I can declare, for example blc disk driver using: # mkdev hd 0 SCSI-0 0 blc 0but it works for IDE hard disk? (3 Replies)
Discussion started by: ccc
3 Replies

8. Red Hat

Need help for getting hard-disk traces

When we write a programme,we declare variables and compiler allocates memory to them.I want to get access to the physical block number of hard-disk where actually the data is stored by the programme " Some one help me out... (1 Reply)
Discussion started by: nagraz007
1 Replies

9. UNIX for Advanced & Expert Users

Need help for getting hard-disk traces

When we write a programme,we declare variables and compiler allocates memory to them.I want to get access to the physical block number of hard-disk where actually the data is stored by the programme " Some one help me out... (3 Replies)
Discussion started by: nagraz007
3 Replies

10. Linux

C++ Code to Access Linux Hard Disk Sectors (with a LoopBack Virtual Hard Disk)

Hi all, I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
Discussion started by: shen747
23 Replies
All times are GMT -4. The time now is 01:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy