| View previous topic :: View next topic |
| Author |
Message |
Kaso_da_Zmok Apprentice


Joined: 19 Aug 2004 Posts: 176 Location: Cork, Ireland
|
Posted: Mon Feb 06, 2012 11:00 pm Post subject: |
|
|
i have two xfs fs on /dev/sda4 and /dev/sdb1 looks like above 150 mil inodes on both. both are around 160GB in size.
| Code: | risko-t3400 ~ # df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
rootfs 151919424 553661 151365763 1% /
udev 1012914 825 1012089 1% /dev
/dev/sda4 151919424 553661 151365763 1% /
rc-svcdir 1013156 82 1013074 1% /libexec/rc/init.d
none 1013156 1 1013155 1% /dev/shm
/dev/sda1 25688 206 25482 1% /boot
/dev/sdb1 156248896 1621 156247275 1% /vms |
| Code: | risko-t3400 ~ # mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=1012914,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
/dev/sda4 on / type xfs (rw,noatime,attr2,delaylog,noquota)
rc-svcdir on /libexec/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)
none on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /boot type ext2 (rw,noatime)
/dev/sdb1 on /vms type xfs (rw,noatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
risko-t3400 ~ # |
|
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Mon Feb 06, 2012 11:05 pm Post subject: |
|
|
| Kaso_da_Zmok wrote: | | why parted? ppl use gdisk |
i am completly confused.. sample pls how to use gdisk CORRECTLY, thx..
i see plenty different howtos and manuals about those new 4K drives, this is very confusing.. |
|
| Back to top |
|
 |
Kaso_da_Zmok Apprentice


Joined: 19 Aug 2004 Posts: 176 Location: Cork, Ireland
|
Posted: Mon Feb 06, 2012 11:14 pm Post subject: |
|
|
it seems to be nearly exactly the same as fdisk.
| Code: | gdisk /dev/sda
Command (? for help): p
Disk /dev/sda: 234441648 sectors, 111.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 234441614
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 206847 500.0 MiB 8300 Linux filesystem
2 206848 272383 32.0 MiB EF02 BIOS boot partition
3 272384 8660991 4.0 GiB 8200 Linux swap
4 8660992 234441614 107.7 GiB 8300 Linux filesystem
Command (? for help):
Create Partition 4 (root):
Command: n ↵
Partition Number: 4 ↵
First sector: ↵
Last sector: ↵ (for rest of disk)
Hex Code: ↵
Write Partition Table To Disk:
Command: w ↵ |
|
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Mon Feb 06, 2012 11:18 pm Post subject: |
|
|
but thats wrong!
| Code: |
Logical sector size: 512 bytes
|
this should be 4096.. how? |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 27783 Location: 56N 3W
|
Posted: Mon Feb 06, 2012 11:27 pm Post subject: |
|
|
Dieter.Soltau,
Some drives lie about thier physical sector size. You just have to live with it.
If your start sector numbers are all exactly divible by 8, you are good.
2048 works, 206848 works - you check the rest. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
Kaso_da_Zmok Apprentice


Joined: 19 Aug 2004 Posts: 176 Location: Cork, Ireland
|
Posted: Mon Feb 06, 2012 11:32 pm Post subject: |
|
|
i don't know maybe it is the alcohol in my blood somehow i also do not see any problems with the | Code: | | Logical sector size: 512 bytes |
| Code: | risko-t3400 ~ # gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.2
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sdb: 312500000 sectors, 149.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): D496855C-DE25-43CB-A966-3DE894E58CA4
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 312499966
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 312499966 149.0 GiB 8300 Linux filesystem
Command (? for help): q
risko-t3400 ~ #
|
|
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Mon Feb 06, 2012 11:48 pm Post subject: |
|
|
| NeddySeagoon wrote: | Dieter.Soltau,
Some drives lie about thier physical sector size. You just have to live with it.
If your start sector numbers are all exactly divible by 8, you are good.
2048 works, 206848 works - you check the rest. |
my physical sector size is reported correctly.. it is the logical sector size that worries me. if 512 is assumed and 4096 is the actual size, there might be loss in writespeed like hell.. ??
did anyone actually bother to read this:
http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/ |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 27783 Location: 56N 3W
|
Posted: Tue Feb 07, 2012 11:33 am Post subject: |
|
|
Dieter.Soltau,
Your drive fakes 512b sectors by reading a 4096 byte physical sector, modifying 512b then writing the changed 4096b physical sector.
If you partition your drive randomly, it has to do this at least twice for every sector written, and as you say, there is a huge speed penalty for this.
To make sure your writes will be aligned, partitions must start at logical sector counts that are exactly divisible by eight.
So ... 2048 is good. 2048/8=256 exactly - no remainder.
Parted knows this and unless you tell it otherwise, will always choose correct starting sectors.
Modern fdisk does too but thats not an option for you. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Tue Feb 07, 2012 5:35 pm Post subject: |
|
|
okay.. wil give it another try .. thx folx  |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Tue Feb 07, 2012 8:20 pm Post subject: |
|
|
so this looks good?
| Code: |
(parted) unit s
(parted) p
Modell: ATA WDC WD25EZRX-00A (scsi)
Festplatte /dev/sdc: 4883781168s
Sektorgröße (logisch/physisch): 512B/4096B
Partitionstabelle: gpt
Nummer Anfang Ende Größe Dateisystem Name Flags
1 2048s 4883779583s 4883777536s xfs primary
(parted)
|
|
|
| Back to top |
|
 |
Simba7 Guru


Joined: 22 Jan 2007 Posts: 598 Location: Billings, MT, USA
|
Posted: Tue Feb 07, 2012 8:41 pm Post subject: |
|
|
| Dieter.Soltau wrote: | | Kaso_da_Zmok wrote: | Filesystems (such as JFS, or XFS) escape this limitation with extents and/or dynamic inode allocation, which can 'grow' the filesystem and/or increase the number of inodes.
my favorite is XFS |
XFS sounds good too.. |
Just be careful with XFS. It does NOT like to be shutdown improperly. _________________ Router(2xP3@1GHz,2GB RAM,18GB HD,Allied Telesyn AT-2560FX,2xDigital DE504,Sun X1034A,2xSun X4444A,SMC 8432BTA,Gentoo)
Mine(PhmIIx3 720@3.3GHz,8GB RAM,500GB+1.5TB+2TB HDDs,GFGTS250,LG BD-RE,Win7)
Wife(A64@2GHz,2GB RAM,120GB HDD,DVD/CD-RW,Win7) |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Tue Feb 07, 2012 9:04 pm Post subject: |
|
|
| Simba7 wrote: | | Dieter.Soltau wrote: | | Kaso_da_Zmok wrote: | Filesystems (such as JFS, or XFS) escape this limitation with extents and/or dynamic inode allocation, which can 'grow' the filesystem and/or increase the number of inodes.
my favorite is XFS |
XFS sounds good too.. |
Just be careful with XFS. It does NOT like to be shutdown improperly. |
oh now WTF... powerfailures happen.. rarely.. tho..
would i be better of using ext4? |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 27783 Location: 56N 3W
|
Posted: Tue Feb 07, 2012 9:17 pm Post subject: |
|
|
Dieter.Soltau,
You need stable kernels and a UPS if you want to use XFS. It is not tolerant of unclean shutdowns - whatever the reason.
ext4 is a much better choice.
If its going to be a single filesystem, it may bw worth using b-trees and it will be safer with write barriers enabled.
I think write barriers are the default. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Tue Feb 07, 2012 9:20 pm Post subject: |
|
|
| well, it is just a backup drive, tho.. i beter go ext4 then.. |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Tue Feb 07, 2012 9:48 pm Post subject: |
|
|
| Code: |
soltau ~ # mkfs.ext4 -T huge /dev/sdc1
mke2fs 1.41.14 (22-Dec-2010)
Warning: the fs_type huge is not defined in mke2fs.conf
Dateisystem-Label=
OS-Typ: Linux
Blockgröße=4096 (log=2)
Fragmentgröße=4096 (log=2)
Stride=1 Blöcke, Stripebreite=1 Blöcke
152625152 Inodes, 610472192 Blöcke
30523609 Blöcke (5.00%) reserviert für den Superuser
Erster Datenblock=0
Maximale Dateisystem-Blöcke=4294967296
18631 Blockgruppen
32768 Blöcke pro Gruppe, 32768 Fragmente pro Gruppe
8192 Inodes pro Gruppe
Superblock-Sicherungskopien gespeichert in den Blöcken:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776
Schreibe Inode-Tabellen: erledigt
Erstelle Journal (32768 Blöcke): erledigt
Schreibe Superblöcke und Dateisystem-Accountinginformationen: erledigt
Das Dateisystem wird automatisch nach jeweils 22 Einhäng-Vorgängen bzw.
alle 180 Tage überprüft, je nachdem, was zuerst eintritt. Dies kann durch
tune2fs -c oder -i geändert werden.
soltau ~ #
|
|
|
| Back to top |
|
 |
Simba7 Guru


Joined: 22 Jan 2007 Posts: 598 Location: Billings, MT, USA
|
Posted: Tue Feb 07, 2012 9:48 pm Post subject: |
|
|
| Dieter.Soltau wrote: | | Code: | | soltau ~ # mkfs.ext4 -T huge /dev/sdc1 |
|
If this is just a backup system, you might get away with "mkfs.ext4 -T huge -m 0 /dev/sdc1"
Also, your e2fsprogs looks rather old (more than a year). You might want to update it. _________________ Router(2xP3@1GHz,2GB RAM,18GB HD,Allied Telesyn AT-2560FX,2xDigital DE504,Sun X1034A,2xSun X4444A,SMC 8432BTA,Gentoo)
Mine(PhmIIx3 720@3.3GHz,8GB RAM,500GB+1.5TB+2TB HDDs,GFGTS250,LG BD-RE,Win7)
Wife(A64@2GHz,2GB RAM,120GB HDD,DVD/CD-RW,Win7) |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Tue Feb 07, 2012 9:53 pm Post subject: |
|
|
| Code: |
soltau mnt # emerge -pDv e2fsprogs
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-fs/e2fsprogs-1.41.14 USE="nls" 4,407 kB
Total: 1 package (1 reinstall), Size of downloads: 4,407 kB
soltau mnt #
|
hmm.. last stable in portage.. |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Tue Feb 07, 2012 9:56 pm Post subject: |
|
|
| Code: |
mkfs.ext4 -T huge -m 0 /dev/sdc1
|
bloody hell, this is fast. ty |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Tue Feb 07, 2012 10:01 pm Post subject: |
|
|
| hmm.. slow on large files.. navigon maps, etc.. |
|
| Back to top |
|
 |
Kollin l33t


Joined: 25 Feb 2006 Posts: 951 Location: Sofia/Bulgaria
|
Posted: Tue Feb 07, 2012 10:04 pm Post subject: |
|
|
| Simba7 wrote: | | Dieter.Soltau wrote: | | Kaso_da_Zmok wrote: | Filesystems (such as JFS, or XFS) escape this limitation with extents and/or dynamic inode allocation, which can 'grow' the filesystem and/or increase the number of inodes.
my favorite is XFS |
XFS sounds good too.. |
Just be careful with XFS. It does NOT like to be shutdown improperly. |
+++++++++++ _________________ "Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..." |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Tue Feb 07, 2012 10:07 pm Post subject: |
|
|
ext4 FTW  |
|
| Back to top |
|
 |
Simba7 Guru


Joined: 22 Jan 2007 Posts: 598 Location: Billings, MT, USA
|
Posted: Tue Feb 07, 2012 10:15 pm Post subject: |
|
|
| Dieter.Soltau wrote: | ext4 FTW  |
Actually, I prefer ZFS.. Unfortunately, it's not stable on Linux yet. _________________ Router(2xP3@1GHz,2GB RAM,18GB HD,Allied Telesyn AT-2560FX,2xDigital DE504,Sun X1034A,2xSun X4444A,SMC 8432BTA,Gentoo)
Mine(PhmIIx3 720@3.3GHz,8GB RAM,500GB+1.5TB+2TB HDDs,GFGTS250,LG BD-RE,Win7)
Wife(A64@2GHz,2GB RAM,120GB HDD,DVD/CD-RW,Win7) |
|
| Back to top |
|
 |
Dieter.Soltau n00b


Joined: 27 Nov 2011 Posts: 54
|
Posted: Wed Feb 08, 2012 4:13 pm Post subject: |
|
|
mmm.. ext4 is really slow on large files.. 22MB/sec from sata2 -> sata2 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|