does each 'cylinder group'  mean a slice in UFS(sparc)?

stock99 used Ask the Experts™
From the book SCSA 10 study guide by Paul Sanghera , it mentions that " a slice (or a partition) is a group of cylinders of the disk set aside for use by a specific file system"

But on the sun docs site, it look like each slice can comprise of multiple cylinder groups :
"When you create a UFS file system, the disk slice is divided into cylinder groups."

Can someone help me to understand this concept?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Principle Software Engineer
A cylinder group is just another unit of storage size, like a block or a track.  Recall that a disk drive may have more than one platter. For one platter, a track is the circle of storage that is the same distance from the center on that platter. You move the head to that distance and then read for one revolution, and you have a track. A track will consist of one or more blocks. Now, if you imagine a stack of platters, all moving together and set of heads, one per platter, also moving together, then a cylinder is just the set of tracks that are all the same address on the platter, but on different patters. That is, a cylinder is exactly the set of storage that can be read in one revolution of the platters but without moving the heads.

Now, a cylinder group is a set of adjacent cylinders. It is a large amount of contiguous storage and is assumed to be able to be read efficiently while also also being physically co-located.  This means you want to allocate serially read data on the same CG, but if you want redundant data (i.e. a file system super-block) you want the copies on different CG's.

In abstract form, a CG is just another set of discrete data units, like blocks and tracks before them, nothing more. Like tracks, then are an artifact of the physical design of disks and are only important in the few areas (like redundancy) where the physical layout impinges on the
data abstraction. You can't assign CG's to different file systems, or anything, any more than you can do that to different blocks.


so I can have a slice with one or more CG(s) ?

Besides, how do i tell how many cg in one slice?  if I just print a partition, it onnly tell me how many cylinders..

partition> print
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -    90      128.37MB    (91/0/0)      262899
  1       swap    wu      91 -   181      128.37MB    (91/0/0)      262899
  2     backup    wu       0 - 24619       33.92GB    (24620/0/0) 71127180
  3 unassigned    wm       0                0         (0/0/0)            0
  4 unassigned    wm       0                0         (0/0/0)            0
  5 unassigned    wm       0                0         (0/0/0)            0
  6        usr    wm     182 - 24619       33.67GB    (24438/0/0) 70601382
  7 unassigned    wm       0                0         (0/0/0)            0

Artysystem administrator
Top Expert 2007
> stock99: so I can have a slice with one or more CG(s) ?

Yes. CGs are used in formatted filesystem. I mean slice is to be aligned by cylinder boundary, but within one slice you may have either one or many cylinder groups (you can see it while doing  newfs).
> Besides, how do i tell how many cg in one slice?

AFAIK you can do it with 'newfs -N /dev/rdsk/cXtXdXsX it's non-destructive.

I have no Solaris right now to check, so test it yourself :-)


Thanks for the clarification!  Look like my 280R box has about 139 CG's and each CG got about 16 cylinders.

bash-3.00# newfs -N /dev/dsk/c1t0d0s0
Warning: 3562 sector(s) in last cylinder unallocated
/dev/rdsk/c1t0d0s0:     13586966 sectors in 2212 cylinders of 48 tracks, 128 sectors
        6634.3MB in 139 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
 12681376, 12779808, 12878240, 12976672, 13075104, 13173536, 13271968,
 13370400, 13468832, 13567264
bash-3.00# uname -a
SunOS unknown 5.10 Generic_139555-08 sun4u sparc SUNW,Sun-Fire-280R

Artysystem administrator
Top Expert 2007

Thank you for points :-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial