[Lustre-discuss] Find all files on a specific OST
Andreas Dilger
adilger at sun.com
Tue Jan 29 15:03:56 PST 2008
On Jan 29, 2008 19:57 +0100, Anselm Strauss wrote:
> I want to know all files that are located on a specific OST, but
> neither 'lfs find ...' nor 'lfs getstripe ...' can give me an answer.
> I do not use striping. This is what I tried:
>
> gnode30 ~ # lfs df -h
> UUID bytes Used Available Use% Mounted on
> scratch-MDT0000_UUID 710.0G 41.0G 668.9G 5% /mnt/
> lustre[MDT:0]
> scratch-OST0001_UUID 6.3T 327.3G 5.9T 5% /mnt/
> lustre[OST:1]
> scratch-OST0002_UUID 6.3T 327.3G 5.9T 5% /mnt/
> lustre[OST:2]
> scratch-OST0003_UUID 6.3T 328.3G 5.9T 5% /mnt/
> lustre[OST:3]
> scratch-OST0004_UUID 6.3T 327.3G 5.9T 5% /mnt/
> lustre[OST:4]
> scratch-OST0006_UUID 6.3T 327.3G 5.9T 5% /mnt/
> lustre[OST:6]
> scratch-OST0007_UUID 6.3T 326.3G 5.9T 5% /mnt/
> lustre[OST:7]
>
> filesystem summary: 37.6T 1.9T 35.7T 5% /mnt/lustre
>
> gnode30 lustre # lfs find -O scratch-OST0003_UUID /mnt/lustre
> gnode30 lustre # lfs find -O 7 /mnt/lustre
> gnode30 lustre # lfs getstripe -O scratch-OST0003_UUID /mnt/lustre
> error: setup_obd_uuid: unknown obduuid: scratch-OST0003_UUID
> /mnt/lustre/zero1
> /mnt/lustre/zero2
> /mnt/lustre/zero3
> /mnt/lustre/zero4
> /mnt/lustre/zero5
> /mnt/lustre/zero6
Try using just "lfs getstripe /mnt/lustre" as a starter. It will print
out the list of OST UUIDs at the start. It would appear that your syntax
is correct, so I'm not sure what is going wrong...
$ lfs df
UUID 1K-blocks Used Available Use% Mounted on
mds-myth-0_UUID 9174328 677728 8496600 7% /myth[MDT:0]
ost-myth-0_UUID 292223856 247877024 44346832 84% /myth[OST:0]
ost-myth-1_UUID 94442984 91277176 3165808 96% /myth[OST:1]
ost-myth-2_UUID 487388376 332816808 154571568 68% /myth[OST:2]
ost-myth-3_UUID 487865304 347373400 140491904 71% /myth[OST:3]
filesystem summary: 1361920520 1019344408 342576112 74% /myth
$ cat /proc/fs/lustre/version
lustre: 1.6.4.2
kernel: 47
build: b_release_1_6_4-20080123034511-CHANGED-.usr.src.linux-2.6.16.46-0.14
$ lfs getstripe /myth/tv/1017_20080129100000.mpg
OBDS:
0: ost-myth-0_UUID ACTIVE
1: ost-myth-1_UUID ACTIVE
2: ost-myth-2_UUID ACTIVE
3: ost-myth-3_UUID ACTIVE
/myth/tv/1017_20080129100000.mpg
obdidx objid objid group
2 527023 0x80aaf 0
1 531093 0x81a95 0
$ lfs getstripe -O ost-myth-1_UUID /myth/tv | head
/myth/tv/1017_20080129100000.mpg
/myth/tv/1017_20071101143000.mpg.png
/myth/tv/1037_20080119013000.mpg.png
/myth/tv/1017_20071219103000.mpg
/myth/tv/1008_20080102200000.mpg
/myth/tv/1039_20080123131300.mpg.png
/myth/tv/1014_20070905170000.mpg.png
/myth/tv/1039_20070914160000.mpg.png
/myth/tv/1014_20071009090000.mpg.png
/myth/tv/1017_20070917180000.mpg
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
More information about the lustre-discuss
mailing list