Task: Extend the filesystem by 20GB
OS: Redhat 5.10
Issue: Unable to extend the filesystem.
Solution: Had to unmount the filesystem and fsck the filesystem. Remount worked fine.
Error message recerived,
[root@aiglxapp22 ~]# resize2fs /dev/mapper/DB2-VG-UDB--USERTEMP
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/DB2-VG-UDB--USERTEMP is mounted on /udb/usertemp; on-line resizing requir
Performing an on-line resize of /dev/mapper/DB2-VG-UDB--USERTEMP to 10485760 (4k) blocks.
resize2fs: Inappropriate ioctl for device While trying to add group #160
brief tasks performed and solution.
[root@aiglxapp22 ~]# echo "- - -">/sys/class/scsi_host/host3/scan
[root@aiglxapp22 ~]# fdisk -l
[root@aiglxapp22 ~]# fdisk /dev/sdg
[root@aiglxapp22 ~]# pvcreate /dev/sdg1
[root@aiglxapp22 ~]# vgextend UDB-MISC /dev/sdg1
[root@aiglxapp22 ~]# lvextend -L 20G /dev/mapper/DB2-VG-UDB--USERTEMP
[root@aiglxapp22 ~]# vgs
[root@aiglxapp22 ~]# resize2fs /dev/mapper/DB2-VG-UDB--USERTEMP
[root@aiglxapp22 ~]# df -h /udb/usertemp
[root@aiglxapp22 ~]# lvs
[root@aiglxapp22 ~]# resize2fs /dev/mapper/DB2-VG-UDB--USERTEMP
[root@aiglxapp22 ~]# cat /etc/redhat-release
[root@aiglxapp22 ~]# dmesg
fstab has ext4 instead ext3, changed but got the same error.
[root@aiglxapp22 ~]# vi /etc/fstab
[root@aiglxapp22 ~]# mount -o remount /udb/usertemp
[root@aiglxapp22 ~]# df -h /udb/usertemp
[root@aiglxapp22 ~]# resize2fs /dev/mapper/DB2-VG-UDB--USERTEMP
still same error
[root@aiglxapp22 ~]# fuser /udb/usertemp
[root@aiglxapp22 ~]# umount /udb/usertemp
[root@aiglxapp22 ~]# lvscan
[root@aiglxapp22 ~]# e2fsck /dev/mapper/DB2-VG-UDB--USERTEMP
[root@aiglxapp22 ~]# e2fsck -f /dev/mapper/DB2-VG-UDB--USERTEMP
[root@aiglxapp22 ~]# mount /udb/usertemp
[root@aiglxapp22 ~]# df -h /udb/usertemp
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/DB2-VG-UDB--USERTEMP
40G 16G 23G 41% /udb/usertemp
====================== Detail ===================
# dmesg
............
acpiphp: Slot [228] registered
acpiphp: Slot [229] registered
acpiphp: Slot [230] registered
acpiphp: Slot [231] registered
acpiphp: Slot [257] registered
acpiphp: Slot [258] registered
acpiphp: Slot [259] registered
acpiphp: Slot [260] registered
acpiphp: Slot [261] registered
acpiphp: Slot [262] registered
acpiphp: Slot [263] registered
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
SCSI device sdb: 65011712 512-byte hdwr sectors (33286 MB)
sdb: Write Protect is off
sdb: Mode Sense: 61 00 00 00
sdb: cache data unavailable
sdb: assuming drive cache: write through
sdb: sdb1
SCSI device sdb: 65011712 512-byte hdwr sectors (33286 MB)
sdb: Write Protect is off
sdb: Mode Sense: 61 00 00 00
sdb: cache data unavailable
sdb: assuming drive cache: write through
sdb: sdb1
EXT4-fs (dm-5): mounted filesystem with ordered data mode
EXT4-fs (dm-4): mounted filesystem with ordered data mode
EXT4-fs (dm-6): mounted filesystem with ordered data mode
EXT4-fs (dm-7): mounted filesystem with ordered data mode
EXT4-fs (dm-8): mounted filesystem with ordered data mode
EXT4-fs (dm-9): mounted filesystem with ordered data mode
EXT4-fs (dm-10): mounted filesystem with ordered data mode
EXT4-fs (dm-11): mounted filesystem with ordered data mode
EXT4-fs (dm-12): mounted filesystem with ordered data mode
EXT4-fs (dm-13): VFS: Can't find ext4 filesystem
EXT4-fs (dm-13): mounted filesystem with ordered data mode
JBD: barrier-based sync failed on dm-13-8 - disabling barriers
JBD: barrier-based sync failed on dm-7-8 - disabling barriers
JBD: barrier-based sync failed on dm-11-8 - disabling barriers
JBD: barrier-based sync failed on dm-9-8 - disabling barriers
JBD: barrier-based sync failed on dm-12-8 - disabling barriers
JBD: barrier-based sync failed on dm-8-8 - disabling barriers
JBD: barrier-based sync failed on dm-4-8 - disabling barriers
JBD: barrier-based sync failed on dm-6-8 - disabling barriers
JBD: barrier-based sync failed on dm-5-8 - disabling barriers
JBD: barrier-based sync failed on dm-10-8 - disabling barriers
svc: unknown version (-1 for prog 100021 lockd)
svc: unknown version (-1 for prog 100021 lockd)
Vendor: VMware Model: Virtual disk Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
target3:0:1: Beginning Domain Validation
target3:0:1: Domain Validation skipping write tests
target3:0:1: Ending Domain Validation
target3:0:1: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)
SCSI device sdg: 41943040 512-byte hdwr sectors (21475 MB)
sdg: Write Protect is off
sdg: Mode Sense: 61 00 00 00
sdg: cache data unavailable
sdg: assuming drive cache: write through
SCSI device sdg: 41943040 512-byte hdwr sectors (21475 MB)
sdg: Write Protect is off
sdg: Mode Sense: 61 00 00 00
sdg: cache data unavailable
sdg: assuming drive cache: write through
sdg: unknown partition table
sd 3:0:1:0: Attached scsi disk sdg
sd 3:0:1:0: Attached scsi generic sg6 type 0
SCSI device sdg: 41943040 512-byte hdwr sectors (21475 MB)
sdg: Write Protect is off
sdg: Mode Sense: 61 00 00 00
sdg: cache data unavailable
sdg: assuming drive cache: write through
sdg: sdg1
SCSI device sdg: 41943040 512-byte hdwr sectors (21475 MB)
sdg: Write Protect is off
sdg: Mode Sense: 61 00 00 00
sdg: cache data unavailable
sdg: assuming drive cache: write through
sdg: sdg1
[root@aiglxapp22 ~]# pwd
/root
[root@aiglxapp22 ~]# cat /etc/fstab
/dev/root_VG/ROOT / ext3 defaults 1 1
/dev/root_VG/VAR /var ext3 defaults 1 2
/dev/root_VG/TMP /tmp ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/root_VG/SWAP swap swap defaults 0 0
#############################################################################
#############################################################################
/dev/root_VG/OPT-IBM /opt/ibm ext4 defaults 1 2
/dev/UDB-MISC/UDB-XINSD /udb/home/udbxinsd ext4 defaults 1 2
/dev/root_VG/DBS-UDB /dbs/udb ext4 defaults 1 2
/dev/DATA/UDB-DATA /udb/data ext4 defaults 1 2
/dev/DATA2/UDB-DATA2 /udb/data2 ext4 defaults 1 2
/dev/LOG/UDB-LOG /udb/log ext4 defaults 1 2
/dev/UDB-MISC/UDB-USERTEMP /udb/usertemp ext4 defaults 1 2
/dev/UDB-MISC/UDB-SYSTEMP /udb/systemp ext4 defaults 1 2
/dev/UDB-MISC/UDB-DIAG /udb/diag ext4 defaults 1 2
/dev/UDB-MISC/UDB-SYSCAT /udb/syscat ext4 defaults 1 2
he3vtl106-bk:/backup/dbdump/udb /dbsdata/database_backup nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,nolock,tcp,timeo=600 0 0
[root@aiglxapp22 ~]# mkf
mkfifo mkfs mkfs.cramfs mkfs.ext2 mkfs.ext3
[root@aiglxapp22 ~]# vi /etc/fstab
[root@aiglxapp22 ~]# resize2fs /dev/mapper/DB2-VG-UDB--USERTEMP
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/DB2-VG-UDB--USERTEMP is mounted on /udb/usertemp; on-line resizing requir
Performing an on-line resize of /dev/mapper/DB2-VG-UDB--USERTEMP to 10485760 (4k) blocks.
resize2fs: Inappropriate ioctl for device While trying to add group #160
[root@aiglxapp22 ~]# pwd
/root
[root@aiglxapp22 ~]# df -h /udb/usertemp
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/DB2-VG-UDB--USERTEMP
20G 16G 3.6G 82% /udb/usertemp
[root@aiglxapp22 ~]# mount -o remount /udb/usertemp
[root@aiglxapp22 ~]# df -h /udb/usertemp
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/DB2-VG-UDB--USERTEMP
20G 16G 3.6G 82% /udb/usertemp
[root@aiglxapp22 ~]# resize2fs /dev/mapper/DB2-VG-UDB--USERTEMP
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/DB2-VG-UDB--USERTEMP is mounted on /udb/usertemp; on-line resizing requir
Performing an on-line resize of /dev/mapper/DB2-VG-UDB--USERTEMP to 10485760 (4k) blocks.
resize2fs: Inappropriate ioctl for device While trying to add group #160
[root@aiglxapp22 ~]# lvscan
ACTIVE '/dev/UDB-MISC/UDB-USERTEMP' [40.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-SYSTEMP' [40.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-DIAG' [10.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-SYSCAT' [10.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-XINSD' [2.00 GB] inherit
ACTIVE '/dev/LOG/UDB-LOG' [20.00 GB] inherit
ACTIVE '/dev/DATA2/UDB-DATA2' [60.00 GB] inherit
ACTIVE '/dev/DATA/UDB-DATA' [60.00 GB] inherit
ACTIVE '/dev/root_VG/ROOT' [24.00 GB] inherit
ACTIVE '/dev/root_VG/VAR' [23.78 GB] inherit
ACTIVE '/dev/root_VG/TMP' [8.00 GB] inherit
ACTIVE '/dev/root_VG/SWAP' [8.00 GB] inherit
ACTIVE '/dev/root_VG/DBS-UDB' [25.00 GB] inherit
ACTIVE '/dev/root_VG/OPT-IBM' [5.00 GB] inherit
[root@aiglxapp22 ~]# pwd
/root
[root@aiglxapp22 ~]# fuser /udb/usertemp
[root@aiglxapp22 ~]# umount /udb/usertemp
[root@aiglxapp22 ~]# df -h /udb/usertemp
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/root_VG-ROOT
24G 3.0G 20G 14% /
[root@aiglxapp22 ~]# e2fsck /dev/mapper/DB2-VG-UDB--USERTEMP
e2fsck 1.39 (29-May-2006)
/dev/mapper/DB2-VG-UDB--USERTEMP: clean, 16/2621440 files, 4062330/5242880 blocks
[root@aiglxapp22 ~]# e2fsck /dev/mapper/DB2-VG-UDB--USERTEMP
e2fsck 1.39 (29-May-2006)
/dev/mapper/DB2-VG-UDB--USERTEMP: clean, 16/2621440 files, 4062330/5242880 blocks
[root@aiglxapp22 ~]# resize2fs /dev/mapper/DB2-VG-UDB--USERTEMP
resize2fs 1.39 (29-May-2006)
Please run 'e2fsck -f /dev/mapper/DB2-VG-UDB--USERTEMP' first.
[root@aiglxapp22 ~]# lvscan
ACTIVE '/dev/UDB-MISC/UDB-USERTEMP' [40.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-SYSTEMP' [40.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-DIAG' [10.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-SYSCAT' [10.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-XINSD' [2.00 GB] inherit
ACTIVE '/dev/LOG/UDB-LOG' [20.00 GB] inherit
ACTIVE '/dev/DATA2/UDB-DATA2' [60.00 GB] inherit
ACTIVE '/dev/DATA/UDB-DATA' [60.00 GB] inherit
ACTIVE '/dev/root_VG/ROOT' [24.00 GB] inherit
ACTIVE '/dev/root_VG/VAR' [23.78 GB] inherit
ACTIVE '/dev/root_VG/TMP' [8.00 GB] inherit
ACTIVE '/dev/root_VG/SWAP' [8.00 GB] inherit
ACTIVE '/dev/root_VG/DBS-UDB' [25.00 GB] inherit
ACTIVE '/dev/root_VG/OPT-IBM' [5.00 GB] inherit
[root@aiglxapp22 ~]# e2fsck -f /dev/mapper/DB2-VG-UDB--USERTEMP
e2fsck 1.39 (29-May-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/DB2-VG-UDB--USERTEMP: 16/2621440 files (6.3% non-contiguous), 4062330/5242880 blocks
[root@aiglxapp22 ~]# e2fsck -f /dev/mapper/DB2-VG-UDB--USERTEMP
e2fsck 1.39 (29-May-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/DB2-VG-UDB--USERTEMP: 16/2621440 files (6.3% non-contiguous), 4062330/5242880 blocks
[root@aiglxapp22 ~]# resize2fs /dev/mapper/DB2-VG-UDB--USERTEMP
resize2fs 1.39 (29-May-2006)
Resizing the filesystem on /dev/mapper/DB2-VG-UDB--USERTEMP to 10485760 (4k) blocks.
The filesystem on /dev/mapper/DB2-VG-UDB--USERTEMP is now 10485760 blocks long.
[root@aiglxapp22 ~]# lvscan
ACTIVE '/dev/UDB-MISC/UDB-USERTEMP' [40.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-SYSTEMP' [40.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-DIAG' [10.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-SYSCAT' [10.00 GB] inherit
ACTIVE '/dev/UDB-MISC/UDB-XINSD' [2.00 GB] inherit
ACTIVE '/dev/LOG/UDB-LOG' [20.00 GB] inherit
ACTIVE '/dev/DATA2/UDB-DATA2' [60.00 GB] inherit
ACTIVE '/dev/DATA/UDB-DATA' [60.00 GB] inherit
ACTIVE '/dev/root_VG/ROOT' [24.00 GB] inherit
ACTIVE '/dev/root_VG/VAR' [23.78 GB] inherit
ACTIVE '/dev/root_VG/TMP' [8.00 GB] inherit
ACTIVE '/dev/root_VG/SWAP' [8.00 GB] inherit
ACTIVE '/dev/root_VG/DBS-UDB' [25.00 GB] inherit
ACTIVE '/dev/root_VG/OPT-IBM' [5.00 GB] inherit
[root@aiglxapp22 ~]# mount /udb/usertemp
[root@aiglxapp22 ~]# df -h /udb/usertemp
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/DB2-VG-UDB--USERTEMP
40G 16G 23G 41% /udb/usertemp
[root@aiglxapp22 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/root_VG-ROOT
24G 3.0G 20G 14% /
/dev/mapper/root_VG-VAR
24G 724M 22G 4% /var
/dev/mapper/root_VG-TMP
7.8G 211M 7.2G 3% /tmp
/dev/sda1 190M 30M 151M 17% /boot
tmpfs 16G 4.0K 16G 1% /dev/shm
df: `/dbsdata/database_backup': Stale NFS file handle
/dev/mapper/root_VG-OPT--IBM
5.0G 1.1G 3.6G 24% /opt/ibm
/dev/mapper/root_VG-DBS--UDB
25G 173M 24G 1% /dbs/udb
/dev/mapper/DATA-UDB--DATA
60G 7.7G 49G 14% /udb/data
/dev/mapper/DATA2-UDB--DATA2
60G 7.7G 49G 14% /udb/data2
/dev/mapper/LOG-UDB--LOG
20G 4.4G 15G 24% /udb/log
/dev/mapper/DB2-VG-UDB--SYSTEMP
40G 21G 18G 55% /udb/systemp
/dev/mapper/DB2-VG-UDB--DIAG
9.9G 151M 9.2G 2% /udb/diag
/dev/mapper/DB2-VG-UDB--SYSCAT
9.9G 497M 8.9G 6% /udb/syscat
/dev/mapper/DB2-VG-UDB--XINSD
2.0G 1.5G 391M 80% /udb/home/udbxinsd
re2aixut1:/software 186G 146G 40G 79% /mnt
re2unxpv013:/usapool/export/VAS
186G 146G 40G 79% /mnt
/dev/mapper/DB2-VG-UDB--USERTEMP
40G 31G 7.2G 81% /udb/usertemp
aignas225:/vol/aignas225v12dump/dbdump1
4.0T 3.7T 346G 92% /auto/dbdump1
[root@aiglxapp22 ~]# umount /mnt
[root@aiglxapp22 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/root_VG-ROOT
24G 3.0G 20G 14% /
/dev/mapper/root_VG-VAR
24G 724M 22G 4% /var
/dev/mapper/root_VG-TMP
7.8G 211M 7.2G 3% /tmp
/dev/sda1 190M 30M 151M 17% /boot
tmpfs 16G 4.0K 16G 1% /dev/shm
df: `/dbsdata/database_backup': Stale NFS file handle
/dev/mapper/root_VG-OPT--IBM
5.0G 1.1G 3.6G 24% /opt/ibm
/dev/mapper/root_VG-DBS--UDB
25G 173M 24G 1% /dbs/udb
/dev/mapper/DATA-UDB--DATA
60G 7.7G 49G 14% /udb/data
/dev/mapper/DATA2-UDB--DATA2
60G 7.7G 49G 14% /udb/data2
/dev/mapper/LOG-UDB--LOG
20G 4.4G 15G 24% /udb/log
/dev/mapper/DB2-VG-UDB--SYSTEMP
40G 21G 18G 55% /udb/systemp
/dev/mapper/DB2-VG-UDB--DIAG
9.9G 151M 9.2G 2% /udb/diag
/dev/mapper/DB2-VG-UDB--SYSCAT
9.9G 497M 8.9G 6% /udb/syscat
/dev/mapper/DB2-VG-UDB--XINSD
2.0G 1.5G 391M 80% /udb/home/udbxinsd
re2aixut1:/software 375G 327G 49G 87% /mnt
/dev/mapper/DB2-VG-UDB--USERTEMP
40G 31G 7.2G 81% /udb/usertemp
aignas225:/vol/aignas225v12dump/dbdump1
4.0T 3.7T 346G 92% /auto/dbdump1
[root@aiglxapp22 ~]# umount /mnt
[root@aiglxapp22 ~]# df -h /auto/dbdump1
Filesystem Size Used Avail Use% Mounted on
aignas225:/vol/aignas225v12dump/dbdump1
4.0T 3.7T 346G 92% /auto/dbdump1
[root@aiglxapp22 ~]# df -hP /auto/dbdump1
Filesystem Size Used Avail Use% Mounted on
aignas225:/vol/aignas225v12dump/dbdump1 4.0T 3.7T 346G 92% /auto/dbdump1
[root@aiglxapp22 ~]# man df
[root@aiglxapp22 ~]# fdisk -l