dionysus69 2017-03-05 22:31:54
why do I get segmentation fault when I run arp-scan command?
jelly 2017-03-05 22:47:10
tdn: understanding the layers and order of growing from bottom to top ought to make it safe enough, barring bugs
tdn 2017-03-05 22:47:10
jelly, I am looking for a described process. A HOWTO or something like that.
velix 2017-03-05 22:47:10
Is /tmp/ in Debian mounted to tmpfs ?
bezaban 2017-03-05 22:47:10
it should be safe enough, especially growing. The luks part is transparent iirc. However, any operation on filesystems with data you don't want to lose should be preceded by a backup
tdn 2017-03-05 22:50:59
bezaban, I have a backup. What I am most worried about is doing the operation having everything appearantly go fine but then finding out that something did not go right and filesystem or LUKS become corrupted. Like, say, if I resized to over the physical size or something like that
jelly 2017-03-05 22:51:36
tdn: the process will vary based on the order of layers in your particular setup
bezaban 2017-03-05 22:51:53
tdn: yeah, you need to resize the lvm and then grow the filesystem, of course you need to stay within the boundaries of the drive
CeBe 2017-03-05 22:52:05
velix: by default it is not, but afair there is some fallback to tmpfs if the disk is full on boot.
bezaban 2017-03-05 22:52:08
hm. can the layers be ordered differently+
jelly 2017-03-05 22:52:12
yes
bezaban 2017-03-05 22:52:19
yay, more complexity
jelly 2017-03-05 22:52:41
I have md raid with LVs as members. Because.
tdn 2017-03-05 22:52:46
jelly, the order is the normal order that is done when installing debian with encrypted luks and lvm via the installer
bezaban 2017-03-05 22:52:49
oh, I see
jelly 2017-03-05 22:52:55
reasons!
velix 2017-03-05 22:53:00
CeBe: thx
tdn 2017-03-05 22:53:10
jelly, raid is done via md. Also via the installer
jelly 2017-03-05 22:53:19
tdn: I have no idea what the "normal" order results in, sorry
jelly 2017-03-05 22:53:29
tdn: lsblk output will be of help
tdn 2017-03-05 22:54:30
jelly, lsblk --> http://pastebin.com/WePcrZeD
jelly 2017-03-05 22:54:58
something sane might look like: disks <- partitions <- md <- luks <- lvm(pv) <- lvm(lv) <- filesystem
jelly 2017-03-05 22:56:27
and you have first lvm, _then_ luks
tdn 2017-03-05 22:57:17
jelly, why is it more sane to have LVM inside LUKS instead of LUKS inside LVM?
tdn 2017-03-05 22:57:30
jelly, please note that I have a few volumes in LVM that is NOT encrypted.
jelly 2017-03-05 22:57:51
tdn: and what are you triyng to grow?
jelly 2017-03-05 22:58:39
(it's slightly easier to have FDE with luks first, then use that as LVM PV so that all the LVs inside are crypted)
tdn 2017-03-05 22:58:46
jelly, the encrypted volume of 1 TB.
jelly 2017-03-05 22:58:56
tdn: using which free space?
tdn 2017-03-05 22:59:27
jelly, first I need to shrink the clear data volume to make space
jelly 2017-03-05 22:59:49
right
jelly 2017-03-05 23:00:15
then you don't have a lot of layers to deal with for the grow process, just lv and luks and filesystem
jelly 2017-03-05 23:01:06
tdn: shrinking is messier than growing btw. Need to be done offline for ext4 (unmounted).
jelly 2017-03-05 23:01:35
and is done from top to bottom
jelly 2017-03-05 23:02:06
so roughly: umount, fsck -f, resize2fs, then lvresize
tdn 2017-03-05 23:02:20
jelly, by offline you mean just umount the ext4 fs, right? That is no problem
jelly 2017-03-05 23:02:21
also it's fucking slow
tdn 2017-03-05 23:03:03
jelly, I have a 4 TB USB disk. Would it be better, faster, safer to just copy everything onto that and then recreate partitions, etc. and copy back?
jelly 2017-03-05 23:03:28
tdn: how much of that clear fs is in use?
tdn 2017-03-05 23:04:01
jelly, right now 95 %, but I am cleaning up and hoping to get to about 80 % usage.
tdn 2017-03-05 23:04:07
So about 100 GB free now
jelly 2017-03-05 23:04:07
ouch
tdn 2017-03-05 23:04:25
jelly, my hope is to increase crypt to 1200 GB
tdn 2017-03-05 23:04:50
Or maybe I should just buy bigger disks...
jelly 2017-03-05 23:05:45
anectodal data: with about 50% used, shrinking with resize2fs took about 4 times as much time as it would take top copy everything somewhere else, repartition, reformat and put back
tdn 2017-03-05 23:05:56
jelly, yikes
jelly 2017-03-05 23:10:51
also the files get defragmented with a "backup, reformat, restore" cycle which is useful if you still have HDD media
tdn 2017-03-05 23:11:01
jelly, this is still HDD
jelly 2017-03-05 23:15:46
tdn: what I'd do is backup and lvremove the filesystem planned to be shrunk, grow the lv, luks and filesystem that needs growing, then recreate and restore the other one
tdn 2017-03-05 23:16:10
jelly, ok
jelly 2017-03-05 23:17:34
but I'm reasonably comfortable doing it, having grown luks at home a couple times now
tdn 2017-03-05 23:20:13
jelly, ok. Thanks for input. I will sit down at write down a plan to prepare.