can't set ext2 volume label with tune2fs
Miroslav Lachman
000.fbsd at quip.cz
Wed Dec 1 13:57:47 UTC 2010
Hi,
I have an external disk WD320 connected by USB to machine running
FreeBSD 8.1-RELEASE i386 GENERIC. I need to use this disk for rsync
backups. I tried to set label on existing filesystem, but label is still
empty:
Order of commands:
root at kapo ~/# tune2fs -l /dev/da0s1
tune2fs 1.41.12 (17-May-2010)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: e17f87a5-8448-4518-b899-4e2ce2918354
Filesystem magic number: 0xEF53
.
.
root at kapo ~/# tune2fs -L usbWD320m5Sbkp1 /dev/da0s1
tune2fs 1.41.12 (17-May-2010)
root at kapo ~/# tune2fs -l /dev/da0s1
tune2fs 1.41.12 (17-May-2010)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: e17f87a5-8448-4518-b899-4e2ce2918354
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 39075840
Block count: 78142160
Reserved block count: 3907108
Free blocks: 11412001
Free inodes: 38767335
First block: 0
Block size: 4096
Fragment size: 4096
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Filesystem created: Tue May 23 15:24:24 2006
Last mount time: Sun Apr 29 23:09:04 2007
Last write time: Thu Oct 7 11:30:43 2010
Mount count: 21
Maximum mount count: 34
Last checked: Tue May 23 15:24:24 2006
Check interval: 15552000 (6 months)
Next check after: Sun Nov 19 14:24:24 2006
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group wheel)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Directory Hash Seed: 8ff346bb-24c2-4ea4-b07f-993fd3f21f61
As you can see, this is rather old disk formated on an old Linux machine
(4 years ago).
Is it a known bug, that label can't be set by tune2fs?
I need to mount external disks by label instead of device name as the
mount and backup will be scripted and I can't be sure what the device
number (da0, da1, da2...) will be if somebody connect another disk
device to this machine.
Setting volume label with mke2fs works fine (on new disks), but I don't
want to do it on this disk because it contains valuable data.
Next strange thing is error message when I run `ls` command on /dev/ext2fs
root at kapo ~/# ls -al /dev/ext2fs/
ls: : No such file or directory
total 1
dr-xr-xr-x 3 root wheel 512 Oct 22 04:04 .
dr-xr-xr-x 10 root wheel 512 Oct 22 06:04 ..
As you can see, /dev/ext2fs exists. Plain `ls /dev/ext2fs/` is OK, but
if I add '-l', it prints error "ls: : No such file or directory"
Miroslav Lachman
More information about the freebsd-fs
mailing list