Re: disklabel/newfs problem?

2007-08-07 Thread Otto Moerbeek
On Mon, 6 Aug 2007, btmarshall wrote:

 Thank you,that has solved the problem.
 I didn't notice anything in the man page for newfs or the platform notes for
 sparc64. Did I miss this in the documentation somewhere?
 Thanks again!

this is an MI issue, and not documented afaik. I've always learned the
rule that block devices should be used only for mounting, and nothing
else, but that does not not seem to be documented as well, except for
st(4). 

The warning printed by newfs itself is not enough. I'm thinking about
either making the warning an error or automaticaly using the raw
device, like fsck does. 

-Otto

 
 
 Otto Moerbeek wrote:
  
  On Mon, 6 Aug 2007, btmarshall wrote:
  
  When I create a disklabel and newfs the filesystem more than a few gigs
  on
  either one of my Ultra1 sparc64 boxes, I can't mount them (mount_ffs:
  invalid parameter) until I run an fsck and fix the superblock.
  Here's an example:
  
  # disklabel -E sd0
  This platform requires that partition offsets/sizes be on cylinder
  boundaries.
  Partition offsets/sizes will be rounded to the nearest cylinder
  automatically.
  
  Initial label editor (enter '?' for help at any prompt)
   p
  device: /dev/rsd0c
  type: SCSI
  disk: SCSI disk
  label: ATLAS V 18 SCA
  bytes/sector: 512
  sectors/track: 425
  tracks/cylinder: 4
  sectors/cylinder: 1700
  cylinders: 20907
  total sectors: 35566499
  free sectors: 35566499
  rpm: 7200
  
  3 partitions:
  # sizeoffset  fstype [fsize bsize  cpg]
c:  35566499 0  unused  0 0  # Cyl 0 -
  20921*
   a
  partition: [a]
  offset: [0]
  size: [35566499] 
  Rounding to nearest cylinder: 3600
  FS type: [4.2BSD]
   a
  partition: [b]
  offset: [3600]
  size: [2232899]
  Rounding to nearest cylinder: 2232100
  FS type: [swap]
   w
   q
  No label changes.
  # newfs /dev/sd0a
  newfs: /dev/sd0a: not a character-special device
  
  This is your problem. Always create filesystems on the raw partitions
  (/dev/rsd0a in this case). I can reproduce your problem here, and it
  disappears if I use the correct device. 
  
  -Otto
  
  Warning: cylinder groups must have a multiple of 16 cylinders
  /dev/sd0a:  3600 sectors in 39216 cylinders of 2 tracks, 425
  sectors
  16276.2MB in 107 cyl groups (368 c/g, 152.73MB/g, 19584 i/g)
  super-block backups (for fsck -b #) at:
   32, 313280, 625632, 938880, 1251232, 1564480, 1876832, 2190080, 2502432,
  2815680, 3128032, 3441280, 3753632, 4066880,
   4379232, 4692480, 5004832, 5318080, 5630432, 5943680, 6256032, 6569280,
  6881632, 7194880, 7507232, 7820480, 8132832,
   8446080, 8758432, 9071680, 9384032, 9697280, 10009632, 10322880,
  10635232,
  10948480, 11260832, 11574080, 11886432, 12199680,
   12512032, 12825280, 13137632, 13450880, 13763232, 14076480, 14388832,
  14702080, 15014432, 15327680, 15640032, 15953280,
   16265632, 16578880, 16891232, 17204480, 17516832, 17830080, 18142432,
  18455680, 18768032, 19081280, 19393632, 19706880,
   20019232, 20332480, 20644832, 20958080, 21270432, 21583680, 21896032,
  22209280, 22521632, 22834880, 23147232, 23460480,
   23772832, 24086080, 24398432, 24711680, 25024032, 25337280, 25649632,
  25962880, 26275232, 26588480, 26900832, 27214080,
   27526432, 27839680, 28152032, 28465280, 28777632, 29090880, 29403232,
  29716480, 30028832, 30342080, 30654432, 30967680,
   31280032, 31593280, 31905632, 32218880, 32531232, 32844480, 33156832,
  # fsck /dev/sd0a
  ** /dev/rsd0a
  BAD SUPER BLOCK: MAGIC NUMBER WRONG
  
  LOOK FOR ALTERNATE SUPERBLOCKS? [Fyn?] y
  
  USING ALTERNATE SUPERBLOCK AT 32
  ** File system is already clean
  ** Last Mounted on
  ** Phase 1 - Check Blocks and Sizes
  ** Phase 2 - Check Pathnames
  ** Phase 3 - Check Connectivity
  ** Phase 4 - Check Reference Counts
  ** Phase 5 - Check Cyl groups
  1 files, 1 used, 8200710 free (14 frags, 1025087 blocks, 0.0%
  fragmentation)
  
  UPDATE STANDARD SUPERBLOCK? [Fyn?] y
  
  
  * FILE SYSTEM WAS MODIFIED *
  #
  
  I've run this on a vanilla 4.1 install, as well as a stable
  kernel/userland
  upgraded as of last night.
  
  Any clues?
  -- 
  View this message in context:
  http://www.nabble.com/disklabel-newfs-problem--tf4226020.html#a12021995
  Sent from the openbsd user - misc mailing list archive at Nabble.com.
  
  
  
 
 -- 
 View this message in context: 
 http://www.nabble.com/disklabel-newfs-problem--tf4226020.html#a12025401
 Sent from the openbsd user - misc mailing list archive at Nabble.com.



disklabel/newfs problem?

2007-08-06 Thread btmarshall
When I create a disklabel and newfs the filesystem more than a few gigs on
either one of my Ultra1 sparc64 boxes, I can't mount them (mount_ffs:
invalid parameter) until I run an fsck and fix the superblock.
Here's an example:

# disklabel -E sd0
This platform requires that partition offsets/sizes be on cylinder
boundaries.
Partition offsets/sizes will be rounded to the nearest cylinder
automatically.

Initial label editor (enter '?' for help at any prompt)
 p
device: /dev/rsd0c
type: SCSI
disk: SCSI disk
label: ATLAS V 18 SCA
bytes/sector: 512
sectors/track: 425
tracks/cylinder: 4
sectors/cylinder: 1700
cylinders: 20907
total sectors: 35566499
free sectors: 35566499
rpm: 7200

3 partitions:
# sizeoffset  fstype [fsize bsize  cpg]
  c:  35566499 0  unused  0 0  # Cyl 0 -
20921*
 a
partition: [a]
offset: [0]
size: [35566499] 
Rounding to nearest cylinder: 3600
FS type: [4.2BSD]
 a
partition: [b]
offset: [3600]
size: [2232899]
Rounding to nearest cylinder: 2232100
FS type: [swap]
 w
 q
No label changes.
# newfs /dev/sd0a
newfs: /dev/sd0a: not a character-special device
Warning: cylinder groups must have a multiple of 16 cylinders
/dev/sd0a:  3600 sectors in 39216 cylinders of 2 tracks, 425 sectors
16276.2MB in 107 cyl groups (368 c/g, 152.73MB/g, 19584 i/g)
super-block backups (for fsck -b #) at:
 32, 313280, 625632, 938880, 1251232, 1564480, 1876832, 2190080, 2502432,
2815680, 3128032, 3441280, 3753632, 4066880,
 4379232, 4692480, 5004832, 5318080, 5630432, 5943680, 6256032, 6569280,
6881632, 7194880, 7507232, 7820480, 8132832,
 8446080, 8758432, 9071680, 9384032, 9697280, 10009632, 10322880, 10635232,
10948480, 11260832, 11574080, 11886432, 12199680,
 12512032, 12825280, 13137632, 13450880, 13763232, 14076480, 14388832,
14702080, 15014432, 15327680, 15640032, 15953280,
 16265632, 16578880, 16891232, 17204480, 17516832, 17830080, 18142432,
18455680, 18768032, 19081280, 19393632, 19706880,
 20019232, 20332480, 20644832, 20958080, 21270432, 21583680, 21896032,
22209280, 22521632, 22834880, 23147232, 23460480,
 23772832, 24086080, 24398432, 24711680, 25024032, 25337280, 25649632,
25962880, 26275232, 26588480, 26900832, 27214080,
 27526432, 27839680, 28152032, 28465280, 28777632, 29090880, 29403232,
29716480, 30028832, 30342080, 30654432, 30967680,
 31280032, 31593280, 31905632, 32218880, 32531232, 32844480, 33156832,
# fsck /dev/sd0a
** /dev/rsd0a
BAD SUPER BLOCK: MAGIC NUMBER WRONG

LOOK FOR ALTERNATE SUPERBLOCKS? [Fyn?] y

USING ALTERNATE SUPERBLOCK AT 32
** File system is already clean
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 8200710 free (14 frags, 1025087 blocks, 0.0% fragmentation)

UPDATE STANDARD SUPERBLOCK? [Fyn?] y


* FILE SYSTEM WAS MODIFIED *
#

I've run this on a vanilla 4.1 install, as well as a stable kernel/userland
upgraded as of last night.

Any clues?
-- 
View this message in context: 
http://www.nabble.com/disklabel-newfs-problem--tf4226020.html#a12021995
Sent from the openbsd user - misc mailing list archive at Nabble.com.



Re: disklabel/newfs problem?

2007-08-06 Thread Otto Moerbeek
On Mon, 6 Aug 2007, btmarshall wrote:

 When I create a disklabel and newfs the filesystem more than a few gigs on
 either one of my Ultra1 sparc64 boxes, I can't mount them (mount_ffs:
 invalid parameter) until I run an fsck and fix the superblock.
 Here's an example:
 
 # disklabel -E sd0
 This platform requires that partition offsets/sizes be on cylinder
 boundaries.
 Partition offsets/sizes will be rounded to the nearest cylinder
 automatically.
 
 Initial label editor (enter '?' for help at any prompt)
  p
 device: /dev/rsd0c
 type: SCSI
 disk: SCSI disk
 label: ATLAS V 18 SCA
 bytes/sector: 512
 sectors/track: 425
 tracks/cylinder: 4
 sectors/cylinder: 1700
 cylinders: 20907
 total sectors: 35566499
 free sectors: 35566499
 rpm: 7200
 
 3 partitions:
 # sizeoffset  fstype [fsize bsize  cpg]
   c:  35566499 0  unused  0 0  # Cyl 0 -
 20921*
  a
 partition: [a]
 offset: [0]
 size: [35566499] 
 Rounding to nearest cylinder: 3600
 FS type: [4.2BSD]
  a
 partition: [b]
 offset: [3600]
 size: [2232899]
 Rounding to nearest cylinder: 2232100
 FS type: [swap]
  w
  q
 No label changes.
 # newfs /dev/sd0a
 newfs: /dev/sd0a: not a character-special device

This is your problem. Always create filesystems on the raw partitions
(/dev/rsd0a in this case). I can reproduce your problem here, and it
disappears if I use the correct device. 

-Otto

 Warning: cylinder groups must have a multiple of 16 cylinders
 /dev/sd0a:  3600 sectors in 39216 cylinders of 2 tracks, 425 sectors
 16276.2MB in 107 cyl groups (368 c/g, 152.73MB/g, 19584 i/g)
 super-block backups (for fsck -b #) at:
  32, 313280, 625632, 938880, 1251232, 1564480, 1876832, 2190080, 2502432,
 2815680, 3128032, 3441280, 3753632, 4066880,
  4379232, 4692480, 5004832, 5318080, 5630432, 5943680, 6256032, 6569280,
 6881632, 7194880, 7507232, 7820480, 8132832,
  8446080, 8758432, 9071680, 9384032, 9697280, 10009632, 10322880, 10635232,
 10948480, 11260832, 11574080, 11886432, 12199680,
  12512032, 12825280, 13137632, 13450880, 13763232, 14076480, 14388832,
 14702080, 15014432, 15327680, 15640032, 15953280,
  16265632, 16578880, 16891232, 17204480, 17516832, 17830080, 18142432,
 18455680, 18768032, 19081280, 19393632, 19706880,
  20019232, 20332480, 20644832, 20958080, 21270432, 21583680, 21896032,
 22209280, 22521632, 22834880, 23147232, 23460480,
  23772832, 24086080, 24398432, 24711680, 25024032, 25337280, 25649632,
 25962880, 26275232, 26588480, 26900832, 27214080,
  27526432, 27839680, 28152032, 28465280, 28777632, 29090880, 29403232,
 29716480, 30028832, 30342080, 30654432, 30967680,
  31280032, 31593280, 31905632, 32218880, 32531232, 32844480, 33156832,
 # fsck /dev/sd0a
 ** /dev/rsd0a
 BAD SUPER BLOCK: MAGIC NUMBER WRONG
 
 LOOK FOR ALTERNATE SUPERBLOCKS? [Fyn?] y
 
 USING ALTERNATE SUPERBLOCK AT 32
 ** File system is already clean
 ** Last Mounted on
 ** Phase 1 - Check Blocks and Sizes
 ** Phase 2 - Check Pathnames
 ** Phase 3 - Check Connectivity
 ** Phase 4 - Check Reference Counts
 ** Phase 5 - Check Cyl groups
 1 files, 1 used, 8200710 free (14 frags, 1025087 blocks, 0.0% fragmentation)
 
 UPDATE STANDARD SUPERBLOCK? [Fyn?] y
 
 
 * FILE SYSTEM WAS MODIFIED *
 #
 
 I've run this on a vanilla 4.1 install, as well as a stable kernel/userland
 upgraded as of last night.
 
 Any clues?
 -- 
 View this message in context: 
 http://www.nabble.com/disklabel-newfs-problem--tf4226020.html#a12021995
 Sent from the openbsd user - misc mailing list archive at Nabble.com.



Re: disklabel/newfs problem?

2007-08-06 Thread btmarshall
Thank you,that has solved the problem.
I didn't notice anything in the man page for newfs or the platform notes for
sparc64. Did I miss this in the documentation somewhere?
Thanks again!


Otto Moerbeek wrote:
 
 On Mon, 6 Aug 2007, btmarshall wrote:
 
 When I create a disklabel and newfs the filesystem more than a few gigs
 on
 either one of my Ultra1 sparc64 boxes, I can't mount them (mount_ffs:
 invalid parameter) until I run an fsck and fix the superblock.
 Here's an example:
 
 # disklabel -E sd0
 This platform requires that partition offsets/sizes be on cylinder
 boundaries.
 Partition offsets/sizes will be rounded to the nearest cylinder
 automatically.
 
 Initial label editor (enter '?' for help at any prompt)
  p
 device: /dev/rsd0c
 type: SCSI
 disk: SCSI disk
 label: ATLAS V 18 SCA
 bytes/sector: 512
 sectors/track: 425
 tracks/cylinder: 4
 sectors/cylinder: 1700
 cylinders: 20907
 total sectors: 35566499
 free sectors: 35566499
 rpm: 7200
 
 3 partitions:
 # sizeoffset  fstype [fsize bsize  cpg]
   c:  35566499 0  unused  0 0  # Cyl 0 -
 20921*
  a
 partition: [a]
 offset: [0]
 size: [35566499] 
 Rounding to nearest cylinder: 3600
 FS type: [4.2BSD]
  a
 partition: [b]
 offset: [3600]
 size: [2232899]
 Rounding to nearest cylinder: 2232100
 FS type: [swap]
  w
  q
 No label changes.
 # newfs /dev/sd0a
 newfs: /dev/sd0a: not a character-special device
 
 This is your problem. Always create filesystems on the raw partitions
 (/dev/rsd0a in this case). I can reproduce your problem here, and it
 disappears if I use the correct device. 
 
   -Otto
 
 Warning: cylinder groups must have a multiple of 16 cylinders
 /dev/sd0a:  3600 sectors in 39216 cylinders of 2 tracks, 425
 sectors
 16276.2MB in 107 cyl groups (368 c/g, 152.73MB/g, 19584 i/g)
 super-block backups (for fsck -b #) at:
  32, 313280, 625632, 938880, 1251232, 1564480, 1876832, 2190080, 2502432,
 2815680, 3128032, 3441280, 3753632, 4066880,
  4379232, 4692480, 5004832, 5318080, 5630432, 5943680, 6256032, 6569280,
 6881632, 7194880, 7507232, 7820480, 8132832,
  8446080, 8758432, 9071680, 9384032, 9697280, 10009632, 10322880,
 10635232,
 10948480, 11260832, 11574080, 11886432, 12199680,
  12512032, 12825280, 13137632, 13450880, 13763232, 14076480, 14388832,
 14702080, 15014432, 15327680, 15640032, 15953280,
  16265632, 16578880, 16891232, 17204480, 17516832, 17830080, 18142432,
 18455680, 18768032, 19081280, 19393632, 19706880,
  20019232, 20332480, 20644832, 20958080, 21270432, 21583680, 21896032,
 22209280, 22521632, 22834880, 23147232, 23460480,
  23772832, 24086080, 24398432, 24711680, 25024032, 25337280, 25649632,
 25962880, 26275232, 26588480, 26900832, 27214080,
  27526432, 27839680, 28152032, 28465280, 28777632, 29090880, 29403232,
 29716480, 30028832, 30342080, 30654432, 30967680,
  31280032, 31593280, 31905632, 32218880, 32531232, 32844480, 33156832,
 # fsck /dev/sd0a
 ** /dev/rsd0a
 BAD SUPER BLOCK: MAGIC NUMBER WRONG
 
 LOOK FOR ALTERNATE SUPERBLOCKS? [Fyn?] y
 
 USING ALTERNATE SUPERBLOCK AT 32
 ** File system is already clean
 ** Last Mounted on
 ** Phase 1 - Check Blocks and Sizes
 ** Phase 2 - Check Pathnames
 ** Phase 3 - Check Connectivity
 ** Phase 4 - Check Reference Counts
 ** Phase 5 - Check Cyl groups
 1 files, 1 used, 8200710 free (14 frags, 1025087 blocks, 0.0%
 fragmentation)
 
 UPDATE STANDARD SUPERBLOCK? [Fyn?] y
 
 
 * FILE SYSTEM WAS MODIFIED *
 #
 
 I've run this on a vanilla 4.1 install, as well as a stable
 kernel/userland
 upgraded as of last night.
 
 Any clues?
 -- 
 View this message in context:
 http://www.nabble.com/disklabel-newfs-problem--tf4226020.html#a12021995
 Sent from the openbsd user - misc mailing list archive at Nabble.com.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/disklabel-newfs-problem--tf4226020.html#a12025401
Sent from the openbsd user - misc mailing list archive at Nabble.com.