newfs and parttion command
As I know, on the Solaris 9, the "newfs" command is used to create a file system. Example :
# newfs /dev/rdsk/c1t3d0s0 newfs: construct a new file system /dev/rdsk/c1t3d0s0: (y/n)? y /dev/rdsk/c1t3d0s0: 410720 sectors in 302 cylinders 17 tracks 80 sectors 200.5MB in 19 cyl groups (16 c/g, 10.62MB/g, 5120 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 21872, 43712, 65552, 87392, 109232, 131072, 152912, 174752, 196592, 218432, 240272, 262112, 283952, 305792, 327632, 349472, 371312, 393152 But "parttion" command from the format utility is also used to parttion for a disk slice ( a parttion ). What's the differency between "newfs" and "parttion" command ? |
The real difference is between the concept of "partition" and "file system". A partition is a logical division, or partition, of an hard disk over which you can apply logical formatting.
Check this article from wikipedia for basic definitions. A file system is a mean which allows storing and organizing files in the disk. Read this for basic definition. The short story: you partition your disk to divide it into pieces which behave (roughly) as independent storage devices. Into the partition you create a file system and the choice will depend on the OS you want to use: UFS, XFS, ext, Reiser, ntfs, etc. |
As a reminder, all of this complexity disappear with ZFS, where partition, slice, newfs, vfstab and the likes are obsoleted.
|
I don't understand your mean.
With parttion command, I also can assign a directory name for a disk slice. Example: partition> 0 Enter partition id tag[unassigned]: ? Expecting one of the following: (abbreviations ok): unassigned boot root swap usr backup stand var home alternates Enter partition id tag[unassigned]: home I think that this above command can assign "/home" directory name for disk slice number 0. Thefore, we can create, delete,modify files on directory "/home" If so, why do we need use "newfs" command to create a file system ? |
Hi.
You're wrong about the ID tag. It's an old concept, which is almost unused today. See /usr/include/sys/vtoc.h. for all the possibilities. As far as I know, the installer program when you upgrade the system, for examples, still uses it: it checks for slices tagged as root and checks if it's really a root slice. I'm told that Veritas uses tags, too. The point is: your OS is not going to use it. Bye, Enrico. |
All times are GMT -5. The time now is 09:32 AM. |