mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Silence e2fsck warning in zconfig.sh
When running zconfig.sh test 7 and 8 cause the following warning to be printed to the console. It's caused because we're snapshoting a mounted ext2 filesystem which is not in a 'clean' state. This is to be expected since we have no guarentees about the on-disk consistency of the filesystem. EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended To silence the warning and preserve the intent of these test cases they have been updated to unmount the filesystem prior to snapshoting them. This ensures the ext2 filesystem is in a consistent state when the snapshot is taken. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ned Bass <bass6@llnl.gov> Closes #1972
This commit is contained in:
parent
ce37ebd2eb
commit
c2d439dffd
@ -403,14 +403,16 @@ test_7() {
|
|||||||
partition /dev/zvol/${FULL_ZVOL_NAME} primary 1 -1 || fail 4
|
partition /dev/zvol/${FULL_ZVOL_NAME} primary 1 -1 || fail 4
|
||||||
format /dev/zvol/${FULL_ZVOL_NAME}-part1 ext2 || fail 5
|
format /dev/zvol/${FULL_ZVOL_NAME}-part1 ext2 || fail 5
|
||||||
|
|
||||||
# Mount the ext2 filesystem and copy some data to it.
|
# Snapshot the pristine ext2 filesystem.
|
||||||
mkdir -p /tmp/${ZVOL_NAME}-part1 || fail 6
|
${ZFS} snapshot ${FULL_SNAP_NAME} || fail 6
|
||||||
mount /dev/zvol/${FULL_ZVOL_NAME}-part1 /tmp/${ZVOL_NAME}-part1 \
|
wait_udev /dev/zvol/${FULL_SNAP_NAME}-part1 30 || fail 7
|
||||||
|| fail 7
|
|
||||||
|
|
||||||
# Snapshot the pristine ext2 filesystem and mount it read-only.
|
# Mount the ext2 filesystem so some data can be copied to it.
|
||||||
${ZFS} snapshot ${FULL_SNAP_NAME} || fail 8
|
mkdir -p /tmp/${ZVOL_NAME}-part1 || fail 7
|
||||||
wait_udev /dev/zvol/${FULL_SNAP_NAME}-part1 30 || fail 8
|
mount /dev/zvol/${FULL_ZVOL_NAME}-part1 \
|
||||||
|
/tmp/${ZVOL_NAME}-part1 || fail 8
|
||||||
|
|
||||||
|
# Mount the pristine ext2 snapshot.
|
||||||
mkdir -p /tmp/${SNAP_NAME}-part1 || fail 9
|
mkdir -p /tmp/${SNAP_NAME}-part1 || fail 9
|
||||||
mount /dev/zvol/${FULL_SNAP_NAME}-part1 \
|
mount /dev/zvol/${FULL_SNAP_NAME}-part1 \
|
||||||
/tmp/${SNAP_NAME}-part1 &>/dev/null || fail 10
|
/tmp/${SNAP_NAME}-part1 &>/dev/null || fail 10
|
||||||
@ -496,11 +498,14 @@ test_8() {
|
|||||||
mount /dev/zvol/${FULL_ZVOL_NAME1}-part1 \
|
mount /dev/zvol/${FULL_ZVOL_NAME1}-part1 \
|
||||||
/tmp/${FULL_ZVOL_NAME1}-part1 || fail 7
|
/tmp/${FULL_ZVOL_NAME1}-part1 || fail 7
|
||||||
cp -RL ${SRC_DIR} /tmp/${FULL_ZVOL_NAME1}-part1 || fail 8
|
cp -RL ${SRC_DIR} /tmp/${FULL_ZVOL_NAME1}-part1 || fail 8
|
||||||
sync || fail 9
|
|
||||||
|
|
||||||
# Snapshot the ext2 filesystem so it may be sent.
|
# Unmount, snapshot, mount the ext2 filesystem so it may be sent.
|
||||||
${ZFS} snapshot ${FULL_SNAP_NAME1} || fail 11
|
# We only unmount to ensure the ext2 filesystem is clean.
|
||||||
wait_udev /dev/zvol/${FULL_SNAP_NAME1} 30 || fail 11
|
umount /tmp/${FULL_ZVOL_NAME1}-part1 || fail 9
|
||||||
|
${ZFS} snapshot ${FULL_SNAP_NAME1} || fail 10
|
||||||
|
wait_udev /dev/zvol/${FULL_SNAP_NAME1} 30 || fail 10
|
||||||
|
mount /dev/zvol/${FULL_ZVOL_NAME1}-part1 \
|
||||||
|
/tmp/${FULL_ZVOL_NAME1}-part1 || 11
|
||||||
|
|
||||||
# Send/receive the snapshot from POOL_NAME1 to POOL_NAME2
|
# Send/receive the snapshot from POOL_NAME1 to POOL_NAME2
|
||||||
(${ZFS} send ${FULL_SNAP_NAME1} | \
|
(${ZFS} send ${FULL_SNAP_NAME1} | \
|
||||||
|
Loading…
Reference in New Issue
Block a user