xfs
[Top] [All Lists]

Re: LWN article: 4K disk sectors

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: LWN article: 4K disk sectors
From: Martin Steigerwald <Martin@xxxxxxxxxxxx>
Date: Sat, 14 Mar 2009 20:10:44 +0100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <49B92449.90805@xxxxxxxxxxx>
References: <200903121258.51497@xxxxxx> <200903121517.48426.Martin@xxxxxxxxxxxx> <49B92449.90805@xxxxxxxxxxx> (sfid-20090312_171312_078129_6F30934B)
User-agent: KMail/1.9.9
Am Donnerstag 12 März 2009 schrieb Eric Sandeen:
> Martin Steigerwald wrote:
> > Am Donnerstag 12 März 2009 schrieb Michael Monnerie:
> >> On Donnerstag 12 März 2009 Eric Sandeen wrote:
> >>> Take a look at the mkfs.xfs man page:
> >>>
> >>>        -s sector_size
> >>>               This option specifies the fundamental  sector  size 
> >>> of the filesystem.  The sector_size is specified either as a value
> >>> in bytes with size=value or as a base two loga- rithm value with
> >>> log=value.  The default sector_size is 512 bytes. The minimum value
> >>> for sector  size  is  512; the  maximum is 32768 (32 KiB). The
> >>> sector_size must be a power of 2 size and cannot be made  larger 
> >>> than  the filesystem block size.
> >>
> >> Ugh, I felt so good this morning, until you responded ... ;-)
> >>
> >> I thought that it's a limitation of the Linux kernel in more parts
> >> than just the filesystem (like block cache), that sector sizes must
> >> be 512B. If I had a 4K drive, would that be usable with XFS already?
> >
> > I have an USB stick with 2KB hardware sector size. It worked nicely
> > when using fdisk instead of cfdisk which only supports 512 byte
> > sectors. Dunno remember exactly which filesystems I tried back then.
>
> really?  what kind of usb stick?  I've never seen such a thing.

Its a stick I got from a customer.

shambhala:~> tail -fn0 /var/log/syslog
Mar 14 20:07:53 localhost kernel: usb 2-4: new high speed USB device using 
ehci_hcd and address 18
Mar 14 20:07:53 localhost kernel: usb 2-4: configuration #1 chosen from 1 
choice
Mar 14 20:07:53 localhost kernel: scsi16 : SCSI emulation for USB Mass 
Storage devices
Mar 14 20:07:53 localhost kernel: usb 2-4: New USB device found, 
idVendor=17ef, idProduct=3815
Mar 14 20:07:53 localhost kernel: usb 2-4: New USB device strings: Mfr=1, 
Product=2, SerialNumber=3
Mar 14 20:07:53 localhost kernel: usb 2-4: Product: Flash Disk
Mar 14 20:07:53 localhost kernel: usb 2-4: Manufacturer:
Mar 14 20:07:53 localhost kernel: usb 2-4: SerialNumber: ABCDEF1234000423
Mar 14 20:07:53 localhost kernel: usb-storage: device found at 18
Mar 14 20:07:53 localhost kernel: usb-storage: waiting for device to 
settle before scanning
Mar 14 20:07:58 localhost kernel: usb-storage: device scan complete
Mar 14 20:07:58 localhost kernel: scsi 16:0:0:0: Direct-Access              
Flash Disk       5.00 PQ: 0 ANSI: 2
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: [sdb] 504832 2048-byte 
hardware sectors: (1.03 GB/986 MiB)
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: [sdb] Write Protect is off
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: [sdb] Mode Sense: 0b 00 00 
08
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: [sdb] Assuming drive cache: 
write through
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: [sdb] 504832 2048-byte 
hardware sectors: (1.03 GB/986 MiB)
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: [sdb] Write Protect is off
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: [sdb] Mode Sense: 0b 00 00 
08
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: [sdb] Assuming drive cache: 
write through
Mar 14 20:07:58 localhost kernel: sdb: sdb1
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: [sdb] Attached SCSI 
removable disk
Mar 14 20:07:58 localhost kernel: sd 16:0:0:0: Attached scsi generic sg2 
type 0
^C

Hmmm, it appears to be from Lenovo.

shambhala:~> lsusb | grep USB
Bus 002 Device 018: ID 17ef:3815 Lenovo ChipsBnk 2GB USB Stick

But its definately not 2 GB... strange. Its branded for the customer, no 
manufacturer logo on it.

-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

<Prev in Thread] Current Thread [Next in Thread>