Question about UFS (russian)

Vazhnov Alexey vazhnov at inbox.ru
Sat Jan 12 12:03:00 UTC 2008


Hello!
  Sorry for my English, if you can't read next test, pleas tell me and
I try translate to English.

  In FAQ http://www.freebsd.org/doc/ru_RU.KOI8-R/books/faq/disks.html
"9.26. Почему FreeBSD считает, что размер моего диска меньше, чем
заявляет его производитель?" написано, что размер меньше из-за разницы
между 1000 и 1024. Однако, есть ещё одна проблема: когда я форматирую
диск в UFS2, я получаю объём меньше на ~3%, чем если в NTFS. Я стал
изучать эту проблему, и выяснил что объём становится меньше именно
после команды newfs, вот рассчёты:

  fdisk и bsdlabel показывают полный объём,
625 142 369 секторов = 320 072 892 928 байт, а вот df - уже меньший,
и через samba тоже доступно 309 796 141 843 байт.

  Пробовал форматировать в UFS1, получил примерно 315 000 000 000 байт
доступно, но терять 5 гигабайт тоже не хочется.

  Как мне получить полную ёмкость (или почти полную)?

  вот листинги:

Server1# fdisk ad4
******* Working on device /dev/ad4 *******
parameters extracted from in-core disklabel are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 625142385 (305245 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 660/ head 15/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

Server1# bsdlabel ad4s1
# /dev/ad4s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 625142369       16    4.2BSD     2048 16384 28552
  c: 625142385        0    unused        0     0         # "raw" part, don't edit

Server1# tunefs -p /dev/ad4s1a
tunefs: ACLs: (-a)                                         disabled
tunefs: MAC multilabel: (-l)                               disabled
tunefs: soft updates: (-n)                                 disabled
tunefs: maximum blocks per file in a cylinder group: (-e)  2048
tunefs: average file size: (-f)                            3000000
tunefs: average number of files in a directory: (-s)       64
tunefs: minimum percentage of free space: (-m)             0%
tunefs: optimization preference: (-o)                      space
tunefs: volume label: (-L)                                 ST3201

Server1# df -h /dev/ad4s1a
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad4s1a    289G    289G     13M   100%    /ST3201

Server1# df /dev/ad4s1a
Filesystem  1K-blocks      Used Avail Capacity  Mounted on
/dev/ad4s1a 302732038 302719006 13032   100%    /ST3201



-- 
   С уважением,
   Алексей Важнов
   8-962-526-3221
   (34791)6-48-78
   ICQ 224-142-198
   mailto:vazhnov at inbox.ru




More information about the freebsd-doc mailing list