Snippets

Tom Roche `fstransform` install/use transcript

Created by Tom Roche

File snippet.txt Added

  • Ignore whitespace
  • Hide word diff
+me@it:~$ date ; sudo aptitude install fstransform
+> Thu Feb  4 17:56:46 MST 2016
+> The following NEW packages will be installed:
+>   fstransform 
+> 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+> Need to get 115 kB of archives. After unpacking 302 kB will be used.
+...
+> Preparing to unpack .../fstransform_0.9.3-1_amd64.deb ...
+> Unpacking fstransform (0.9.3-1) ...
+> Setting up fstransform (0.9.3-1) ...
+
+me@it:~$ date ; sudo info fstransform
+> Thu Feb  4 17:57:33 MST 2016
+# neither `info` nor `man` found
+
+me@it:~$ date ; sudo fstransform --help
+> Thu Feb  4 17:57:41 MST 2016
+> Usage: /usr/sbin/fstransform [OPTION]... DEVICE NEW-FILE-SYSTEM-TYPE
+> Transform file system inside DEVICE to NEW-FILE-SYSTEM-TYPE,
+> preserving its contents and without need for backup
+
+> Options:
+>   --help                        Print this help and exit
+>   --new-size=SIZE               Set new file system length. default: device length
+>   --old-file-system=OLD-TYPE    Override current (old) file system type autodetection
+>   --force-untested-file-systems Transform also untested file systems (DANGEROUS)
+>   --list-source-file-systems    Print list of file systems supported as source
+>   --list-target-file-systems    Print list of file systems supported as target
+>   --reversible[=yes|no]   Create zero-file, fsremap will do a reversible transformation
+>                                 default: no
+>   --no-questions          Never ask any question or confirmation
+>   --show-time[=yes|=no]   Show current time before each message. default: yes
+>   --loop-file=LOOP-FILE   Override loop-file path
+>   --loop-mount-point=PATH Override loop-file mount point
+>   --zero-file=ZERO-FILE   Override zero-file path
+>   --cmd-CMD-NAME=CMD-PATH Set external command CMD-NAME to use. default: autodetected
+>   --opts-fsmove=OPTS      Pass OPTS as additional options to 'fsmove'
+>   --opts-fsremap=OPTS     Pass OPTS as additional options to 'fsremap'
+>   --opts-mkfs=OPTS        Pass OPTS as options to 'mkfs'. default: '-q'
+>   --opts-fsck-source=OPTS Override 'fsck' options for old file system. default: '-p -f'
+>   --opts-fsck-target=OPTS Override 'fsck' options for new file system. default: '-p -f'
+>   --x-OPTION=VALUE        Set internal, undocumented option. For maintainers only.
+
+me@it:~$ date ; sudo fstransform /dev/sda3 ext4
+> Thu Feb  4 17:58:22 MST 2016
+> fstransform: starting version 0.9.3, checking environment
+> fstransform: checking for which...  '/usr/bin/which'
+> fstransform: checking for expr...   '/usr/bin/expr'
+> fstransform: checking for id...   '/usr/bin/id'
+> fstransform: parsing command line arguments
+> fstransform: checking for stat...   '/usr/bin/stat'
+> fstransform: checking for mkfifo...   '/usr/bin/mkfifo'
+> fstransform: checking for blockdev...   '/sbin/blockdev'
+> fstransform: checking for losetup...  '/sbin/losetup'
+> fstransform: checking for fsck...   '/sbin/fsck'
+> fstransform: checking for mkfs...   '/sbin/mkfs'
+> fstransform: checking for mount...  '/bin/mount'
+> fstransform: checking for umount...   '/bin/umount'
+> fstransform: checking for mkdir...  '/bin/mkdir'
+> fstransform: checking for rmdir...  '/bin/rmdir'
+> fstransform: checking for rm...   '/bin/rm'
+> fstransform: checking for dd...   '/bin/dd'
+> fstransform: checking for sync...   '/bin/sync'
+> fstransform: checking for fsmove...   '/usr/sbin/fsmove'
+> fstransform: checking for fsremap...  '/usr/sbin/fsremap'
+> fstransform: checking for fsck(source file-system)... '/sbin/fsck'
+> fstransform: checking for fsck(target file-system)... '/sbin/fsck'
+> fstransform: looking for optional commands
+> fstransform: checking for sleep...  '/bin/sleep'
+> fstransform: checking for date...   '/bin/date'
+> 17:58:22 fstransform: environment check passed.
+> 17:58:22 fstransform: saving output of this execution into /var/tmp/fstransform/fstransform.log.7374
+> 17:58:22 fstransform: preparing to transform device '/dev/sda3' to file-system type 'ext4'
+> 17:58:22 fstransform: device is mounted at '/boot' with file-system type 'ext2'
+> 17:58:22 fstransform: device raw size = 524288000 bytes
+> 17:58:22 fstransform: creating sparse loop file '/boot/.fstransform.loop.7374' inside device '/dev/sda3'...
+> 17:58:22 dd: 1+0 records in
+> 17:58:22 dd: 1+0 records out
+> 17:58:22 dd: 1 byte (1 B) copied, 0.00984217 s, 0.1 kB/s
+> 17:58:22 fstransform: device file-system block size = 1024 bytes
+> 17:58:22 fstransform: device usable size = 524288000 bytes
+> 17:58:22 dd: 1+0 records in
+> 17:58:22 dd: 1+0 records out
+> 17:58:22 dd: 1 byte (1 B) copied, 0.00015026 s, 6.7 kB/s
+> 17:58:22 fstransform: connected loop device '/dev/loop0' to file '/boot/.fstransform.loop.7374'
+> 17:58:22 fstransform: formatting loop device '/dev/loop0' with file-system type 'ext4'...
+> 17:58:23 fstransform: mounting loop device '/dev/loop0' on '/tmp/fstransform.loop.7374' ...
+> 17:58:23 fstransform: loop device '/dev/loop0' mounted successfully.
+> 17:58:23 fstransform: preliminary steps completed, now comes the delicate part:
+> 17:58:23 fstransform: fstransform will move '/dev/sda3' contents into the loop file.
+         
+> 17:58:23 fstransform: WARNING: THIS IS IMPORTANT! if either the original device '/dev/sda3'
+>                       or the loop device '/dev/loop0' become FULL,
+                      
+>                        YOU  WILL  LOSE  YOUR  DATA !
+                      
+>                       fstransform checks for enough available space,
+>                       in any case it is recommended to open another terminal, type
+>                         watch df /dev/sda3 /dev/loop0
+>                       and check that both the original device '/dev/sda3'
+>                       and the loop device '/dev/loop0' are NOT becoming full.
+>                       if one of them is becoming full (or both),
+>                       you MUST stop fstransform with CTRL+C or equivalent.
+                      
+>                       this is your chance to quit.
+>                       press ENTER to continue, or CTRL+C to quit: 
+> 17:59:20 fstransform: moving '/dev/sda3' contents into the loop file.
+> 17:59:20 fstransform: this may take a long time, please be patient...
+> 17:59:20 fsmove: progress: 5.0% done,  74.8 megabytes still to move
+> 17:59:20 fsmove: progress: 10.0% done,  70.8 megabytes still to move, estimated  2 seconds left
+> 17:59:20 fsmove: progress: 15.0% done,  66.9 megabytes still to move, estimated  1 second left
+> 17:59:20 fsmove: progress: 20.0% done,  63.0 megabytes still to move, estimated  1 second left
+> 17:59:20 fsmove: progress: 25.0% done,  59.0 megabytes still to move, estimated  1 second left
+> 17:59:20 fsmove: progress: 30.0% done,  55.1 megabytes still to move, estimated  1 second left
+> 17:59:20 fsmove: progress: 35.1% done,  51.1 megabytes still to move, estimated  1 second left
+> 17:59:21 fsmove: progress: 40.1% done,  47.2 megabytes still to move, estimated  1 second left
+> 17:59:21 fsmove: progress: 45.1% done,  43.2 megabytes still to move, estimated  1 second left
+> 17:59:21 fsmove: move() skipped `/boot/.fstransform.loop.7374', matches exclude list
+> 17:59:21 fsmove: progress: 50.2% done,  39.2 megabytes still to move, estimated  1 second left
+> 17:59:22 fsmove: progress: 55.3% done,  35.2 megabytes still to move, estimated  1 second left
+> 17:59:22 fsmove: WARN: failed to create target directory `/tmp/fstransform.loop.7374/lost+found': File exists
+> 17:59:22 fsmove: progress: 60.3% done,  31.2 megabytes still to move, estimated  1 second left
+> 17:59:22 fsmove: progress: 65.3% done,  27.3 megabytes still to move, estimated  1 second left
+> 17:59:22 fsmove: progress: 70.3% done,  23.3 megabytes still to move, estimated  1 second left
+> 17:59:22 fsmove: progress: 75.3% done,  19.4 megabytes still to move, estimated  0 seconds left
+> 17:59:22 fsmove: progress: 80.3% done,  15.5 megabytes still to move, estimated  0 seconds left
+> 17:59:22 fsmove: progress: 85.4% done,  11.5 megabytes still to move, estimated  1 second left
+> 17:59:22 fsmove: job completed.
+> 17:59:22 fstransform: unmounting and running '/sbin/fsck' (disk check) on loop file '/boot/.fstransform.loop.7374'
+> 17:59:24 fsck: fsck from util-linux 2.25.2
+> 17:59:24 fsck: /dev/loop0: 334/128016 files (1.5% non-contiguous), 98258/512000 blocks
+> 17:59:24 fstransform: disconnected loop device '/dev/loop0' from file '/boot/.fstransform.loop.7374'
+> 17:59:24 fstransform: unmounting device '/dev/sda3' before disk check
+> 17:59:24 fstransform: running '/sbin/fsck' (disk check) on device '/dev/sda3'
+> 17:59:24 fsck: fsck from util-linux 2.25.2
+> 17:59:25 fsck: boot: 12/128016 files (0.0% non-contiguous), 99058/512000 blocks
+> 17:59:26 fstransform: mounting again device '/dev/sda3' read-only
+> 17:59:26 fstransform: launching '/usr/sbin/fsremap' in simulated mode
+> 17:59:26 fsremap: starting job 1, persistence data and logs are in '/var/tmp/fstransform/fsremap.job.1'
+> 17:59:26 fsremap: if this job is interrupted, for example by a power failure,
+> 17:59:26 fsremap: you CAN RESUME it with: /usr/sbin/fsremap -n -q --resume-job=1 -- /dev/sda3
+> 17:59:26 fsremap: analysis completed: 78.35 megabytes must be relocated
+> 17:59:26 fsremap: allocated 78.35 megabytes RAM as memory buffer
+> 17:59:26 fsremap: primary-storage is 10.00 megabytes, initialized and mmapped() to contiguous RAM
+> 17:59:26 fsremap: (simulated) starting in-place remapping. this may take a LONG time ...
+> 17:59:26 fsremap: (simulated) progress:  6.4% done,  78.4 megabytes still to relocate
+> 17:59:26 fsremap: (simulated) clearing 421.65 megabytes free-space from device ...
+> 17:59:26 fsremap: (simulated) job completed.
+> 17:59:26 fstransform: launching '/usr/sbin/fsremap' in REAL mode to perform in-place remapping.
+> 17:59:26 fsremap: starting job 2, persistence data and logs are in '/var/tmp/fstransform/fsremap.job.2'
+> 17:59:26 fsremap: if this job is interrupted, for example by a power failure,
+> 17:59:26 fsremap: you CAN RESUME it with: /usr/sbin/fsremap -q --resume-job=2 -- /dev/sda3
+> 17:59:26 fsremap: analysis completed: 78.35 megabytes must be relocated
+> 17:59:26 fsremap: allocated 78.35 megabytes RAM as memory buffer
+> 17:59:27 fsremap: primary-storage is 10.00 megabytes, initialized and mmapped() to contiguous RAM
+> 17:59:27 fsremap: successfully unmounted device '/dev/sda3'
+> 17:59:27 fsremap: everything ready for in-place remapping, this is your LAST chance to quit.
+> 17:59:27 fsremap: WARN: press ENTER to proceed, or CTRL+C to quit
+
+> 17:59:36 fsremap: starting in-place remapping. this may take a LONG time ...
+> 17:59:37 fsremap: progress: 6.4% done,  78.4 megabytes still to relocate
+> 17:59:40 fsremap: clearing 421.65 megabytes free-space from device ...
+> 17:59:46 fsremap: job completed.
+> 17:59:46 fstransform: running again '/sbin/fsck' (disk check) on device '/dev/sda3'
+> 17:59:46 fsck: fsck from util-linux 2.25.2
+> 17:59:47 fsck: /dev/sda3: 334/128016 files (1.5% non-contiguous), 98258/512000 blocks
+> 17:59:47 fstransform: mounting transformed device '/dev/sda3'
+> 17:59:47 fstransform: completed successfully. your new 'ext4' file-system is mounted at '/boot'
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.