how to reformat a hard disk


 
Thread Tools Search this Thread
Operating Systems Solaris how to reformat a hard disk
# 8  
Old 08-13-2007
Quote:
Originally Posted by mr_balodoy
is labeled to have 2.1G capacity but when I invoke the format command, it only has 1.05G of memory.
It may be a count of 512 byte sectors, not a count of kilobytes.
# 9  
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  
Old 08-15-2007
Bug

Hi Joerg

Thanks for the inputs you gave me. However, I still have some questions/favors to ask of you...

1> What are the file systems from the root disk that I need to back up using the ufsdump command?
2> I also tried to create a back up using "mirror", however, after doing the mirror process, I got this message:
/usr/platform//lib/fs/ufs/bootblk : file not found
and the when I try to boot form the new disk, it won't boot...

I'm very grateful for the inputs you gave me and I'm exploring these things and I'm trying my best to learn/catch-up. So please bear with me if I still have confusions. Thanks and God Bless!!!
# 11  
Old 08-16-2007
For the complete backup you need the following slices:
/root on slice 0
/usr on slice 6
/export on slice 5
/w.local on slice 7

If you have mount the second disk at /mnt you can use this:
ufsdump -f /mnt/dump_root /root
ufsdump -f /mnt/dump_usr /usr
ufsdump -f /mnt/dump_export /export
ufsdump -f /mnt/dump_w.local /w.local

Now on the second disk are four new files :
cd /mnt
ls

dump_root
dump_usr
dump_export
dump_w.local


The reason that the mirrored disk can not boot is the not available boot sector at the second disk.
This command to create a boot block.
installboot /usr/platform/sun4m/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0

Best regards
joerg
# 12  
Old 08-17-2007
Hi Joerg,

I still have a problem...
I tried this commandinstallboot /usr/platform/sun4m/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
and rebooted disk 1 but to no avail...
This is the message that I got...
bootblk : can't find the boot program.

What do you think I should do next with my problem?
Thank you very for all the inputs you gave me and just keep them coming.
Thanks and God Bless!!!
# 13  
Old 08-17-2007
Hi,
you are sure that you are boot from the right disk?
Please send the complete Output From the OK Prompt level till the error messages.
You are using the right devalias?

If you want to mirror the complete root disk then please follow the complete description.
BigAdmin - Submitted Tech Tip: Boot Disk Mirroring Using Solaris Volume Manager Software

Best regards joerg
# 14  
Old 08-22-2007
hi joerg,

I still can't get it to work right. I have been studying about UNIX lately to finds ways/alternative options where I can solve my problem and found dd an interesting topic...
The thing that I'm trying to do now is to create a clone of my working disk using this command...
Can you show me how to do it if for example I just want to clone the important slices from my working disk? Will this work?
Your response is surely appreciated.
Thanks and God Bless!!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question