• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

what happened to my format

Hi,

I ran format:

Searching for disks...done


AVAILABLE DISK SELECTIONS:
       (list of disks)
         ..............
      11. c1t13d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf781a87,0
      12. c8t24d0 <HITACHI-DF600F-0000 cyl 3001 alt 2 hd 50 sec 768>
          /pci@9,700000/JNI,FCR@3/sd@18,0
      13. c9t24d0 <HITACHI-DF600F-0000 cyl 3001 alt 2 hd 50 sec 768>
          /pci@9,600000/JNI,FCR@2/sd@18,0
Specify disk (enter its number): 12
selecting c8t24d0
[disk formatted]

...........

Here it says disk formatted, I am wondering what does it mean -- am I losing all data on this disk?

Another question is, if I lose data, will the system automatically copy everything from its mirror.

Thanks
0
ebi168
Asked:
ebi168
4 Solutions
 
neteducationCommented:
disk formatted means that it found a vtoc (volume table of contents, this is where the partitioning information is stored)

This does not mean that any data was deleted, it just means that it found a partitioning information

format in solaris is kind of the same as fdisk in windows
newfs in solaris is kind of the same as format in windows


If you play around in format you can change partitions, and if you have mirroring active this may actually lead to non-predictable results (the system may think that one submirror is out of sync, will try to resync and possibly overwrite data on other partitions), so be carefull about this.


0
 
tfewsterCommented:
Don't panic - "[disk formatted]" just means it's already partitioned for Solaris; If you now type "partition" and then "print" you'll see the partition layout.

>  if I lose data, will the system automatically copy everything from its mirror.

Not in the sense I think you mean.  If you have 2 partitions mirrored, e.g. with Disk Suite or Veritas, any file operations on one like deleting a file) will be replicated to both mirrors This is because you're operating on the meta (virtual) device which keeps both plexes (copies) synchronized.

What mirroring DOES give you is that if one disk fails or you remove a partition or do anything else at a raw disk level, its mirror still contains the data.  
0
 
tfewsterCommented:
neteducation, you're too quick for me ;-)   By the way, what happens if I "newfs" or otherwise corrupt one plex addressing it directly? - Will disksuite fix it automagically or does it not recognise operations that don't go via the metadevice?

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
ebi168Author Commented:
This is because you're operating on the meta (virtual) device which keeps both plexes (copies) synchronized.

--then why not sync in the other way, so lost data will be made up!

if you have mirroring active this may actually lead to non-predictable results (the system may think that one submirror is out of sync, will try to resync and possibly overwrite data on other partitions), so be carefull about this.

-- overwrite data on other partitions: so what does other partitions mean here?
0
 
neteducationCommented:
Ok, let try getting things a little clearer:

Let's suppose you are using disksuite to mirror.

This works i.e. like this:

You have 2 Disks, let's say 18GB each. Let's further take as an example that those disks have 18'000 Cylinders each

You partition disk 1 to have a 4GB Partition, a 2GB Partition and a 12GB Partition, so the first partition starts at cylinder 0, the second at cylinder 4000 and the third at cylinder 6000)
You partition disk 2 to have the very same partitioning (4GB/2GB/12GB, also starting at Cylinder 0/4000/6000)

Then you mirror Partition 1 from disk 1 to Partition 1 on Disk 2 (the mirror will be the first metadevice)
Next you mirror Partition 2 from disk 1 to Partition 2 on Disk 2 (the mirror will be the second metadevice)
Finally you mirror Partition 3 from disk 1 to Partition 3 on Disk 2 (the mirror will be the third metadevice)

Now the first metadevice is mounted, i.e. as / (root)
The second mirror is mounted i.e. as /opt
The third mirror is mounted i.e. as /export/home

Now suppose you write into a file on /export/home, then the (metadevice) mirror driver will write this data onto disk1, 3rd partition (so somewhere near cylinder 6000) and on disk2, 3rd partition (same place as before)

Coming to your questions, ebi168:

If you delete a file on /export/home, then the (metadevice) mirror driver will delete it on both disks.

--then why not sync in the other way, so lost data will be made up!

Well, you explicitly wanted to delete it. Mirroring is not meant to save data that was unintentionally deleted. it is meant for harddrive-failures.


-- overwrite data on other partitions: so what does other partitions mean here?

Suppose you reconfigured your second harddrive (using format), so that you newly have 3 other partitions (let's say, 3GB, 2GB and 13GB, so these partitions start at Cylinder 0, 3000 and 5000), then the (metadevice) mirror driver thinks that for /export/home one copy of the mirror is on disk1 cylinder 6000 and up, and the other copy on disk 2 cylinder 5000 and up... but it was originally written to disk 2 cylinder 6000 and up -> the driver recognizes that the data is not in sync, will resync the data from disk 1 and therefore overwrites the data that was stored on the cylinders 5000-6000 (which may be data from the /usr partition)


Coming to your question, tfewster

>> By the way, what happens if I "newfs" or otherwise corrupt one plex addressing it directly? - Will disksuite fix it automagically or does it not recognise operations that don't go via the metadevice?

At the next read / write operation the metadevice-driver should find out that one of the submirrors is not in sync and will remirror it. However you can't be sure it recognizes the right submirror to be intact (if you have bad luck, it thinks that the newly formatted partition is the correct one and will mirror the empty onto the full one... however under normal circumstances that should not be a problem as the driver will, in case it is not sure, verify with the filsystem cache which one is the correct one so this most often works correct)
 
0
 
yuzhCommented:
"format" in Solaris can do more task than fdisk in Windows, you can use it to format,
repair, partition .....etc. if you cahnge the partion size the data in that partion will lost.

Please read the following doc to learn some thing about The "format" Utility:
http://www.sun.com/bigadmin/content/submitted/format_utility.html

In a disk array situation, it you setup mirroring disk in pairs, eg:

    1. [1,0]
        [2,0]
     .........
    6. [1,5]
        [2,5]

    if any one of the HD dead, when you replace with a new HD, the array manager can
auto recover the data, to the new HD, if the source and target HD in the same group dead
in the same time, eg disk [1,0] and [2,0] you have to restore the data from backup.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now